New ASP.NET Web Site CSS Not Rendering

Using Visual Studio 2010, I just created a brand new .net 4.0 "WebSite" (File--> "New Web Site..."), converted it to an Application in IIS 7, set the app pool to a .net 4.0 app pool that works fine with a couple other applications on this machine.

When I hit F5 to debug it, it works fine, but when I browse to http://localhost/WebAppName none of the CSS renders, and every time I click a link it goes to the login page.  The rendered source does include the reference to the CSS file, and I've been able to browse to a test file in the same folder as the css file.  When I try to browse directly to the css file itself, it automatically forwards me to the Login page, so I have a feeling it's a permission thing somewhere in IIS.

Anyone have experience with this?

LVL 9
joshbulaAsked:
Who is Participating?
 
Kyle AbrahamsSenior .Net DeveloperCommented:
Using a user account would indicate that it's a permission related error.  #35242863 is a valid answer.
0
 
Kyle AbrahamsSenior .Net DeveloperCommented:
are you using the same web address in both cases or the internal debugging IIS (usually known because you have a random port number)?

Make sure your css is deployed to the physical location of the virtual directory and that the appropriate permissions are there.
0
 
joshbulaAuthor Commented:
The internal debugging IIS works fine.  I'm trying to get it to work with the regular IIS on port 80.

The css is deployed.  What specific permissions should I check?  The application pool's username, networks service, and iis_iusers all have read, modify, & execute permissions.
0
 
joshbulaAuthor Commented:
Figured it out... I created a new app pool for it, and used specific user credentials instead of pass-through authentication and everything now works.
0
 
Kyle AbrahamsSenior .Net DeveloperCommented:
You can configure VS to work off of IIS's settings, so just wanted to clarify you were using 2 different "environments" (one being the internal debugger and one being IIS).

Would check the relative link for the css is correct.  If you open a streamreader can you write out the contents of the css file via response.write?  Would make sure there are no permission or link errors.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.