0

I have MVC3 app. When I run it under ASP.NET Development Server from Visual Studio, everything is fine. But, when I run it under IIS, the CSS is not loading at all.

Any manipulation with permission didnt help, even if I sent full access to everyone for the whole solution folder. I have IIS 5.1 on Windows XP. I enabled MVC3 support (.*) in IIS, the application runs fine, except CSS is not loading for some reason.

When running under IIS - doesnt pick up static content.

Actually, no static content work - not css, not javascript files from the Script folders. And this is weird, since I have another MVC3 app with exactly same Web.Config and exactly the same VirtuialDirectory configuration that works just fine, all JS and CSS are loaded correctly.

And I dont see any difference, except one works, another one -doesnt ;(

UPDATE

After playing with creating default MVC3 applications in different folder and with different names, I found that the problem ONLY happens when the application name contains DOT :)

Something like "MyCompany.MyApplication" WILL not work correctly under IIS 5.1.

If I call it just "MyApplication1" - everything works ! Go guess....

4

1 回答 1

0

在我的情况下,原来是 UrlScan 错误:我将“UrlScan.ini”中的“AllowDotInPath”选项更改为 0,瞧!这是参考:www.iis.net/learn/extensions/working-with-urlscan/urlscan-3-reference

于 2013-02-13T14:55:52.833 回答