Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
701 views
in Technique[技术] by (71.8m points)

iis 8 - IIS8 Default Document yields 404 not found error

I have a new Windows Server 2012 machine with IIS 8. I have installed an application that uses Windows Authentication for the login page. The application uses .NET 2.0 (which was a bit of a pain to configure, but that is a different story) The application works perfectly if you specify the login page in the URL. This login page is the default document for the application which verifies the user and logs them in automatically if they are registered. If they are not registered then it redirects them to a Forms authentication login page where they can enter local application credentials.

The problem I have is that the login page only works when you browse to it directly I.E. type the name in the URL. If you use the Default document from IIs it returns a 404 error.

I have seen other articles here which are for IIS 7 or IIS 7.5 which appear on the surface to be the same as IIS 8 but the solutions for those problems do not resolve my problem.

The application pool is currently configured as Classic (have also tried Integrated) and uses NetworkService as the application Account and has 32 bit enabled. It is configured for .NET Framework v2.0. Default documents are enabled for both the site and the application virtual directory.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I think I have solved this problem. IIS 8 does not seem to respect the order of documents in the list of default documents and was always selecting default.aspx which was shown as the last document in the list.
My main application does not have a default.aspx page. When I removed all the entries in the list of default documents so that only the one and only document I needed for the main application was shown it worked correctly. This is a bit of a pain as my application has lots of sub-applications that use different landing pages. One of which uses default.aspx. We usually specified them all at the top level and used inheritance on the sub-applications, but now it seems each sub-application will need to be configured individually.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...