ASP.NET MVC 3 error when using forms authentication?

In your web. Config, you are restricting access to everyone but administrators in all cases. Check out this link to give you more options on what you can do.(like allowing access to specific folders) weblogs.asp.net/gurusarkar/archive/2008/....

Thank you. The link is extremely valuable for forms authentication. – Shahzad May 13 at 17:04.

The problem is, as you seem to have guessed, that the CSS files are protected by your authorization rules. The reason that this differs between applying the rules in web. Config and applying via Authorize attributes, is that since the MVC framework doesn't send requests for files that exist on disc via your controllers, the requests for the CSS files (which exist on disc) never see the attribute.

They do, however, see the authorization rules in web.config. There are a couple of ways you can solve this. Either one will work fine.

Use the tag to allow any users to request your CSS files. Skip authorization in web. Config and use the Authorize attribute instead.

If you do this, you can apply the attribute globally in global.asax. Cs so you won't have to remember doing it on every controller.

I am adding authentication to my web application. It is an asp.net mvc single page application. Currently the web application is using the asp.net mvc for only one thing, authentication.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions