So I have an ASP.NET MVC4 page working in IIS:
Only issue is that the static content is not served... (css, js, ... files)
This is the check-list that I've already done:
- Enable the "Static" component in the "Enable/Disable Windows Features" dialog inside Control Panel, underneath the IIS tree node.
- Have a <add path="*.css" verb="GET" type="System.Web.StaticFileHandler" /> inside the <system.web><httpHandlers> tag of my web.config.
- Have a <add name="CSS" path="*.css" verb="GET" type="System.Web.StaticFileHandler" preCondition="foo"/> inside the <system.webServer><handlers> tag of my web.config (foo being 'integratedMode' or 'ManagedHandler').
- Adding the "Impersonate a Client AfterAuthentication" privilege to my user (http://support.microsoft.com/kb/821546).
- Also tried adding entries in IIS directly, in the dialog "Module mappings". In fact @lex-li is telling me that this is not needed so long as I see the "*" mapping, which is this one:
And it still doesn't serve the f**g files (404). What else am I missing?
In the log file (C:\inetpub\logs\LogFiles\W3SVC2\u_ex140313.log
) I can see:
2014-03-13 18:21:09 192.168.0.161 GET /Content/Site.css - 80 - 192.168.0.150 Mozilla/5.0+(X11;+Ubuntu;+Linux+x86_64;+rv:26.0)+Gecko/20100101+Firefox/26.0 404 0 0 15
StatusFileModule,DefaultDocumentModule,DirectoryListingModule
. I don't think you need another handler in this case. Meanwhile, when "it still doesn't serve", what is the status code logged in IIS log files? – Lex Li