|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Firefox doesn't display ASP.NETHi,
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 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 -- Show quoteCo-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com UnBlog: http://petesbloggerama.blogspot.com "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 > > 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 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 > 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 > > > > gerry wrote:
> scratch that - the browsers do attempt to dusplay any file as html No they don't, you're still wrong. They only try to render what they > for the most part this generates a lot of errors or a lot of nothing. > 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). 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). 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 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 > 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 >> > > 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. gerry wrote:
> sure - browsers have no idea what the .aspx extension is - so they display It has nothing to do with that. File extension is totally irrelevant - > 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. > 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. 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. simchajoy2***@yahoo.com wrote:
> Hi, Like Mr Bromberg already mentioned, it makes no sense. And I'm not 100% > > 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 > 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.
Other interesting topics
|
|||||||||||||||||||||||