Firefox doesn't display ASP.NET

S

simchajoy2000

Hi,

I've got a webpage in ASP.NET that displays just fine in IE but when I
try to open it in Firefox it just displays all the code instead of
rendering the webpage. What's the deal?

Joy
 
S

simchajoy2000

I created a webpage in asp.net on my computer and then when I
right-click on the file and say "open in mozilla" it opens up mozilla
but mozilla only displays the actual code in the browser. It doesn't
make any sense to me either - maybe there is a setting I have wrong in
my mozilla browser?

Joy
 
J

john smith

Hi,

I've got a webpage in ASP.NET that displays just fine in IE but when I
try to open it in Firefox it just displays all the code instead of
rendering the webpage. What's the deal?

Joy
Like Mr Bromberg already mentioned, it makes no sense. And I'm not 100%
sure of what you're saying happens here - it shows the markup (markup
tags with all the angle brackets) instead of rendering it, or it shows
the code as in the page (server-side) source? The first sounds like a
MIME problem to me (it's definitely worth looking into - the
LiveHTTPHeader extension or one of the various debugging proxies can
help), and the 2nd sounds pretty much impossible.
 
G

gerry

sure - browsers have no idea what the .aspx extension is - so they display
it as text
I am sure that IE is doing either exactly the same thing or opening the file
with visual studio but no way it is displaying it as an html page.
 
G

gerry

scratch that - the browsers do attempt to dusplay any file as html
for the most part this generates a lot of errors or a lot of nothing.
 
J

john smith

gerry said:
sure - browsers have no idea what the .aspx extension is - so they display
it as text
I am sure that IE is doing either exactly the same thing or opening the file
with visual studio but no way it is displaying it as an html page.
It has nothing to do with that. File extension is totally irrelevant -
the browser doesn't care one bit if it's .htm or .php3 or .aspx or
whatever else (it only matters to the server). What matters to the
browser is the MIME type (text/html usually for a web page). This is
what the browser looks for.
 
J

john smith

gerry said:
scratch that - the browsers do attempt to dusplay any file as html
for the most part this generates a lot of errors or a lot of nothing.
No they don't, you're still wrong. They only try to render what they
received as a (html) web page if the mime type says so, if the mime says
otherwise (image/jpeg, application/msword, etc) they'll react
accordingly (display image, offer to download or open file, etc).
 
G

gerry

the OP stated that right clicking on the file and specifying "Open With"
displayed the code.
This implies that he is opening a disk file and not browsing to a page - so
there is no mime type for the browser to react to.
 
G

gerry

read the op again - he accessing the file via "Open With" not by browsing
via http
there is no server and no mime-type involved
 
S

simchajoy2000

Well here is what my asp.net page looks like:

<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="request.aspx.vb" Inherits="BV.request"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>Building Visions</title>
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
<style type="text/css">@import url( BV.css );</style>
</HEAD>
<body>

</body>
</HTML>
In the body tag I just have html - no asp controls at all - I have a
form with a table and some divs and some textboxes which include
"runat=server" for all the html. Does any of that look or sound
incorrect - I don't get it either guys but it's happening so any
suggestions, crazy though they might be, would be very helpful. By the
way, I don't have a real web server - just IIS installed on my machine.

Thanks!!

Joy
 
G

gerry

In an earlier post you said :

"I created a webpage in asp.net on my computer and then when I
right-click on the file and say "open in mozilla" it opens up mozilla
but mozilla only displays the actual code in the browser. It doesn't
make any sense to me either - maybe there is a setting I have wrong in
my mozilla browser?

Joy"

Is this correct : when I right-click on the file and say "open in mozilla"
?
If so then you are opening the file as a file , not as a web page.
In order for anything that is not standard html to be rendered/interpreted
it has to be served by a server - ie. you have to browse to it via the http
protocol rather than open it as a disk file.
opening this exact file that you just posted
iexplorer , netscape & firefox all generate XML parser errors on the
@Page directive
opera displays the @Page directive making no attempt at interpreting it.

what exactly do you see ?
 
M

Marina

Opening a file using an application is one thing.
Browsing to a web site is completely different.

Browsing to a web site involves making a request to the server, the server
processing that request, and returning a bunch of HTML.

When you open a file none of that happens. It's just a file and displayed as
is.

So, you need to browse to the web site that happens to be on your local
machine using mozilla. You machine is the web server.

If you were to do what you are describing with IE, it would do the same
thing.
 
S

simchajoy2000

It doesn't do the same thing in IE and when I open html files in the
same way it displays them just fine - I will see if it works properly
when I post it to the web server.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top