Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Asp.Net MVC missing style and defaults to logon page

I just setup an out of the box "W2K8 R2 Web" server and installed IIS 7 out of the box. Then I installed the .NET4 framework and ran "aspnet_regiis -i" command.

I created a site using .NET 4.0 Integrated app pool.

I created an MVC application using the default MVC project template, without modifying I compiled the project and deploy the files using (Publish) to the virtual directory.

I can pull the site up, but the styles are missing from the page and for some reason it routing to the /Account/LogOn?ReturnUrl=/

like image 585
Kwan Cheng Avatar asked Feb 23 '10 18:02

Kwan Cheng


1 Answers

For a new site you need to check the authentication for the Anonymous Authentication.

Right Click "Anonymous Authentication" select "Edit..."

Make sure the "Application pool identity" is selected. It defaults to IUSR for some reason. this should fix your problem.

If not try the attribute without the path attribute, it'll allow everything in the directory of web.config and any sub directories.

like image 174
Kwan Cheng Avatar answered Nov 15 '22 10:11

Kwan Cheng