Browser won't show the default page

Let me start by saying I’m a newbie to this .Net development and I’m currently assigned to crack into an old ASP.NET v1.134 website source to rebuild it. The website is part of a solution consisting of 11 projects. The website project where the default.aspx is located, say projA, has a project file called projA.csproj with the url http://localhost/appname/projA.csproj in it. There’s another suspicious project file called appname.csproj I found in the same folder with the url http://localhost/appname/appname.csproj. The website configuration file has http://localhost/appname/projA.csproj. Now in the IIS the virtual directories for a default website called projA and another one called appname are set up pointing to the same local directory for this website. When I browse into projA in IIS the default.htm doesn’t come up. When I tried to initiate a debug instance in VS .Net 2003 for this website project I have the same issue with the starting page, or any page for that matter, not showing up on the browser (IE) brought up by the debugger. I know the localhost is working because I can see the IIS page when I type http://localhost/. But when I type http://localhost/projA or http://localhost/projA/default.aspx it won’t work. If I type http://localhost/appname some default page came up (I don’t even know where it is but it looks similar to the default page!) but all the links on it are not working. I did some research on the web and I made sure these things are done:

  1. Put localhost into the trusted zone in internet security options.
  2. Used integrated Windows authentication.
  3. Deleted those default websites in IIS and created new ones, albeit with the same results.
  4. Made sure the correct .Net version is used in IIS website properties. I know it works because the debugger does come up with no errors.
  5. The entire solution for those 11 projects is rebuilt with no errors. I also rebuilt projA a few times to make sure it’s compiled correctly.
    Any pointers are much appreciated!

can you try adding a text aspx file, see if you can see that page.

I’ll try it on Thurs. What’s the reasoning behind it? You’re suspecting that some ASP.NET elements on my aspx pages are not compatible with the ASP.NET version? It’s an old website which was developed by the original web team on this same machine, that’s why I have no clue what’s going on with the local browsing. What other things I should also try?

I try to browse the website in three different ways, all having the 404 error:

  1. From within IIS using the browse option on the website.

  2. From IE address bar. http://locahost/sco or http://localhost/sco/default.aspx

  3. From the VS 2003 debugger that brings up the IE automatically.

I can display any html or htm files from http://localhost/sco but not aspx. By the way my development machine is on XP sp3.

Yes I added default.aspx and default.htm in the IIS website property.

first thing i would check if the virtual directory is created; if not create it.
check the default document. see if .htm or whatever the default document you want is listed; if not add it.

let know how this goes.

I’m moving closer to the bottom of the issue. Now I could get the project up at the localhost by configuring IIS virtual directory. But my old IIS 5.1 still won’t display any aspx files, default page included. I suspect it’s the file/folder permission issue. What you think?

Maybe you should trying browsing those pages from within IIS to see if it runs, right click the page and choose browse

Ok forget about all the IIS 5.1 and VS 2003 issues. I’m moving on with IIS 7.0 and VS 2010. It still doesn’t display any of my aspx files at localhost/ (why??). But at least I can see the website working within the VS web browser now at localhost:2772. Now the only issue is any aspx files I downloaded from the live web or copied from the portable drive, if there’re special characters such as ’ or >> originally, I get junk instead. Moreover in those html files the web code generates the character ’ gets changed into ’ so my javascript code is broken. I’m suspecting it has to do with my vista environment but I don’t know what to look for. I do have this
<globalization requestEncoding=“utf-8” responseEncoding=“utf-8” fileEncoding=“utf-8” />
in my Web.config.

i would highly suspect your virtual directory wasn’t created for this website.

this is what I would try:

  • create a totally new website using VS.
  • make a test aspx, check if its working.
  • now get the files from your other project folder. test with a simple file first, see if it works. if it works proceed with others.

Yes I created an aspx file in my project with plain html text in it. It still won’t display.

Ok I’ve created a new website called webapplication1 and added the same simple aspx file there as its start page and it works both in IE and IIS. What my next step should be?

have you tried viewing the pages from within IIS like i said earlier?

But when I changed the extension of that same simple aspx file into html it would display in IE. That tells me the virtual directory for app sco was created.
The difficult part of this all is the project references 10 other projects in different directories. Even if I successfully create a new website and make it work with IIS what does it help me with the old project and its linked solution?