Skip to content Skip to sidebar Skip to footer

Allowing Access To My Site.css On My Login Form Mvc

I need my css to show for my login page, but it's not showing at the moment. How would I go about allowing access to my login page with the css included? Im using forms authenticat

Solution 1:

the <deny users="?"/> denies anonymous users from accessing the css file. (read here)

so you'll need to put the following into your <configuration> block within web.config

<locationpath="Content"><system.web><authorization><allowusers="?"/></authorization></system.web></location>

you can read some more about this here

Solution 2:

I work this out by the followings steps: IIS Manager Authentication Right Click Anonymous Authentication.

Switch to application pool identity

Solution 3:

Stumbled across this, cause I needed the same thing. Here is a solution:

<locationpath="Content"><system.web><authorization><allowusers="*"/></authorization></system.web></location>

As is writer here (I used the link from the previous answer) this will give the unauthenticated user access to all the files in the Content folder, and the css file is in this folder. P.S. sorry guys, this is the same as the previous answer, just ignore this

Post a Comment for "Allowing Access To My Site.css On My Login Form Mvc"