I'm working in a MVC3 application using Custom Membership Provider. The problem is when I get the display of the login page, for some reason the page doesn't load the style sheet neither the javascripts. Is something that I need to add and I'm missing? Something on the Global.asax or the config file? Thanks in advance.
Asked
Active
Viewed 560 times
2 Answers
0
Your view is being rendered but you're not seeing the styles applied, correct?
So, check your page and see what path is being generated for the scripts, and verify that the path is correct. It sounds like a routing issue.
Are you using the following method to resolve your stylesheet?
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
Depending on your browser, you'll want to invoke developer tools (IE/Chrome) or Firebug (FireFox) and see what network requests are being made.
Hope this helps.

MisterJames
- 3,306
- 1
- 30
- 48
-
Yes, I'm using Firebug and the path on the code behind is fine, but firebug also show a message: Failed to load source for: http://localhost/MyApplication/Content/Site.css. – Gradile Sep 13 '11 at 23:29
-
Also the same thing occurs with the javascripts for the page : Failed to load source for: http://localhost/MyApplication/Scripts/jquery-1.5.1.min.js. If I go to the path manually, the file is there. – Gradile Sep 13 '11 at 23:30
-
Can you repro this in a sample project? I would be happy to walk through it. – MisterJames Sep 14 '11 at 18:10
0
Well, finally I get the solution. The problem was the permission on the Content folder, where the style sheet resides. Adding authorization to all users for that folder on the config file fixed the problem.

Gradile
- 104
- 1
- 9