IIS won't recognize Default.aspx

D

David Veeneman

I'm just getting started with ASP.NET, using VS 2005. As an exercise, I
opened the root web site in VS 2005 and created a simple welcome page. I
saved the page as Default.aspx and made sure that name was the first name on
the list id the default documents in the IIS control panel.

IIS doesn't recognize Default.aspx as the default page for the IIS root web.
It will open the page if I type http://localhost/Default.aspx, and if I
create an HTML-only Default.htm page, it will recognize that as the default
page. But it won't take Default.aspx as the default.

Anybody know why? Thanks.
 
V

Vipul Patel

Is your IIS configured to run with ASP.NET?

Go to c:\Windows\Microsoft.NET\framework\v2.0xxxx
and then give to command
aspnet_regiis -i

restart your computer and let me know it if still does not recognize.
 
W

William LaMartin

In the properties for the default website or the particular website in IIS,
under the Documents tab, you need to add Default.aspx
 
D

David Veeneman

No, that didn't change anything. The command ran successfully, but as
before, http://localhost/Default.aspx brings up the default page, but
http://localhost brings up the localstart ("You do not have a default page")
page.

Any other suggestions? Thanks.






Vipul Patel said:
Is your IIS configured to run with ASP.NET?

Go to c:\Windows\Microsoft.NET\framework\v2.0xxxx
and then give to command
aspnet_regiis -i

restart your computer and let me know it if still does not recognize.
 
J

Joey

1. Open IIS Admin
2. Stop the site
3. Right-click then open properties
4. If there is an asp.net tab, make sure the correct version (1.1 or
2.0, etc..) is running
5. Create default.aspx on the documents tab and move it to the top of
the list
6. Remove the others (default.htm, etc...)
7. Remove the default.htm, index.html, etc documents in the site
8. Close properties and start the site.
9. If you type http://localhost, it should work.
 
T

tdavisjr

David said:
I'm just getting started with ASP.NET, using VS 2005. As an exercise, I
opened the root web site in VS 2005 and created a simple welcome page. I
saved the page as Default.aspx and made sure that name was the first name on
the list id the default documents in the IIS control panel.

IIS doesn't recognize Default.aspx as the default page for the IIS root web.
It will open the page if I type http://localhost/Default.aspx, and if I
create an HTML-only Default.htm page, it will recognize that as the default
page. But it won't take Default.aspx as the default.

Anybody know why? Thanks.

Did you create you project as a virtual directory or did you use the
new file-based model?
If using file based then by default, no virtual directory is created.
To view your webform you use the built in web server by pressing
Ctrl-F5 (Debug menu, Start without debugging)
 
J

Joey

I think that you might have to reboot if you change versions of
asp.net. It doesn't matter if you stop and start IIS. At least, that
has been my experience.
 
J

Joey

Good point. If you are using the file-based model, then use "Publish
Web Site" from the build menu and then type "http://localhost" as the
destination. You can also uncheck the "Allow site to be updateable..."
checkbox if you want the code behind AND aspx pages compiled before it
copies them. After this, you should be able to access it with
"http://localhost".
 

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,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top