aspx page won't run

Anne Marie

Member
Joined
Jul 13, 2006
Messages
16
Location
United States
Programming Experience
5-10
I've developed a web app using vstudio .net 2002 on Windows XP. My app runs perfectly fine on my machine.

I've copied my project files to a windows 2000 web server. I've created an application and the aspx filter is visible for all the extensions. Still, IIS 5.0 on web server won't run default.aspx, but if I rename it default.htm it will run.

I suspect there is a configuration issue somewhere. Can someone point me in a direction. I've tried several things already for a week and still no luck. I need help. Thank you.
 
There is a Documents Default Pages tab in website properties dialog in IIS, found the attached screenshot on the web. I think usually aspx defaults are added when .Net is installed correctly to IIS, there should also be a .Net tab in that dialog then.
 

Attachments

  • iis15.gif
    iis15.gif
    15.6 KB · Views: 64
I have added Default.aspx to the list of default documents. I have both a default.htm and default.aspx. If I move default.htm to the top of the list, it will run. If I move default.aspx to the top of the list, I get an error.
 
I could be wrong, but if you added Default.aspx yourself it sound as .Net is not installed to your IIS.

If, so usually the solution is to run "aspnet_regiis.exe -i" from the folder "\WINDOWS\Microsoft.NET\Framework\-yourversion-\", basically -i registers and sets version on all iis sites and this is important to consider, it could be limited, run with -? to see help.
 
I ran aspnet_regiis -i on the web server, but still get "the page cannot be found" when I try to run Default.aspx. (Default.htm displays fine). The surprise to me was that IIS stopped after I ran the command and I had to restart IIS (all of our sites stopped!!!) .

Another strange thing -- I ran aspnet_regiis from v1.0.3705 directory, but when I look at the application mappings in IIS, it says v1.1.4322 for aspx, etc. Should I change them all manually to v1.0.3705 aspnet_isapi.dll?

Thanks,
 
Maybe you have to reinstall the whole server for the framework to work. Isn't there a technician you could call to have a on-site review of the server configuration... when you regiis it remaps it all sites to the version you are enforcing configuration for, unless you specify which site in parameter, so it's strange with what you say about versioning.
 
Yes, I'm waiting for a response from one of our consultants who is very busy, so in the meantime, I'm trying to figure this out.

Just wondering, should the aspnet_isapi.dll be listed for the site under isapi filters tab. I have one filter for front page -- fpexedll.dll . It is not listed in my development computer's IIS (where the app works like a charm!).
 
I just found something interesting in documentation for aspnet_regiis.exe -i parameter:
"Only the script maps for applications that use an earlier version of ASP.NET are updated. Applications that use a later version are not affected."

That should explain why .Net 1.1 maps were not changed. Even though there could be other configuration issues, I would say you should try to re-configure the problem site with .Net 1.1 version of aspnet_regiis.exe. Do check the documentation, there are loads of options for this tool. -i switch is the most common fix-it-all. Online too: http://msdn2.microsoft.com/en-us/library/k6h9cz8h.aspx

You haven't stated what kind of error occur, only that default.aspx 'won't run' and you 'get an error'. (don't say it's the debugger error page saying script error on your asp.net page. lol :)) The other most common error source is that the application isn't mapped, but you did first state that this was done. I'm just throwing in another one here: I actually read somewhere someone stating to remove the other 'defaults' pages and only leave 'default.aspx', because of precedence of other extensions disregarding the order they are listed, but I have no documentation confirming this.
 
I was reading the article "Side-By-Side Execution of the .net framework" at msdn microsoft com. There near the end it talks about the aspnet_filter dll. I added this filter under my applications's isapi filters tab. I was trying to add aspnet_isapi.dll which was apparently the wrong one.

Now it seems that asp is processing my page, but am getting an access error. See attached At least it's a step forward.

Thank you for all the help!
 

Attachments

  • AccDen_Failed.txt
    1.7 KB · Views: 32
That'd be a security configuration issue, the asp user (IUSR_ is the default anonymous access account) must have access to that directory, and you must server.mappath to gain access to local filesystem from asp.net script anyway. Another common one, it's all over the web if you search 'asp.net access denied'.
 
I don't understand what this means: " you must server.mappath to gain access to local filesystem from asp.net script anyway."

I did the first part -- On the virtual directory, I gave permission to the IUSR_machinename account, but still get the access denied error. I've left anonymous access in IIS. Am trying to understand this security stuff. Am assuming IIS let it through, but now asp.net security is stopping the page from displaying.
 
MapPath is a function that "Retrieves the physical path that a virtual path". ASP.Net is a virtual environment not attached to the servers physical file system (only indirectly via IIS). ASP.Net have no knowledge of the environment outside its application scope, so when you specify path "E:\Analyst\" ASP.Net have no understanding of this, you must use the MapPath function to link the virtual and physical worlds.
 
Thanks for the explanation, but I don't know where I'm supposed to perform the mappath function. Can it be done in IIS, or is it code that needs to be put in the .aspx.vb file. Or is it a setting somewhere in a config file?

Also, my app runs fine on my development machine. I didn't have to tell asp where the physical directory is. I suppose Visual Studio took care of that for me?!!

So many questions. Thanks again,
 
Did you make your web folder an application? (see attached on where to create one)
 

Attachments

  • Image1.jpg
    Image1.jpg
    80.5 KB · Views: 61
Nice screenshot TPM, but we have already established the fact and confirmed that the application was mapped. Also, Anne Marie reported a script path access denied error, which could not have occurred if the application didn't start in the first place.

Anne Marie, did you look up MapPath function in documentation yet? You wondered where to "put it", it is for code-behind ASP.Net code, use it in the code where you reference that physical file system path.

About the page running in local system is because the debugger runs in another user context than the default anonymous internet user (IUSR), impersonating the local user I think. So VS took care of that.
 
Back
Top