Home All Groups Group Topic Archive Search About

Firefox doesn't display ASP.NET

Author
6 Jan 2006 5:06 PM
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

Author
6 Jan 2006 5:52 PM
Peter Bromberg [C# MVP]
Joy,
this does not make any sense. Are you requesting the XXX.aspx page via an
HTTP url (e.g. http://myserver/myweb/mypage.aspx") ?

Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com




Show quote
"simchajoy2***@yahoo.com" wrote:

> 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
>
>
Author
6 Jan 2006 5:57 PM
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
Author
6 Jan 2006 6:08 PM
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.


<simchajoy2***@yahoo.com> wrote in message
Show quote
news:1136570257.253846.66400@o13g2000cwo.googlegroups.com...
> 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
>
Author
6 Jan 2006 6:16 PM
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.


Show quote
"gerry" <g***@canada.com> wrote in message
news:up4LuwuEGHA.2036@TK2MSFTNGP14.phx.gbl...
> 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.
>
>
> <simchajoy2***@yahoo.com> wrote in message
> news:1136570257.253846.66400@o13g2000cwo.googlegroups.com...
> > 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
> >
>
>
Author
6 Jan 2006 6:32 PM
john smith
gerry wrote:
> 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).
Author
6 Jan 2006 6:48 PM
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.



Show quote
"john smith" <j***@smith.com> wrote in message
news:OVUPM#uEGHA.2704@TK2MSFTNGP15.phx.gbl...
> gerry wrote:
> > 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).
Author
6 Jan 2006 6:58 PM
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
Author
6 Jan 2006 7:12 PM
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 ?


<simchajoy2***@yahoo.com> wrote in message
Show quote
news:1136573933.267927.116000@g43g2000cwa.googlegroups.com...
> 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
>
Author
6 Jan 2006 7:42 PM
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.

Show quote
"gerry" <g***@canada.com> wrote in message
news:ugUfnUvEGHA.1312@TK2MSFTNGP09.phx.gbl...
> 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 ?
>
>
> <simchajoy2***@yahoo.com> wrote in message
> news:1136573933.267927.116000@g43g2000cwa.googlegroups.com...
>> 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
>>
>
>
Author
6 Jan 2006 8:03 PM
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.
Author
6 Jan 2006 6:17 PM
john smith
gerry wrote:
> 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.
Author
6 Jan 2006 6:50 PM
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


Show quote
"john smith" <j***@smith.com> wrote in message
news:eRyVs1uEGHA.3700@TK2MSFTNGP15.phx.gbl...
> gerry wrote:
> > 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.
Author
6 Jan 2006 6:03 PM
john smith
simchajoy2***@yahoo.com wrote:
> 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.

AddThis Social Bookmark Button