CSS styles and images not applied on login page

  • Thread starter Thread starter R.A.M.
  • Start date Start date
R

R.A.M.

Hi,
I have created ASP.NET application with forms authentication (Login.aspx).
The problem is that although Login.aspx contains CSS styles and JPEG/GIF
images, usually the styles are not applied and images are not displayed. I
mean, if I run application from Visual Studio at about 80% of times the
styles and images are not applied - black and white page without images
(only rectangular ares). I am not sure but I think I saw this effect on my
friend's computer where I installed my application.
Please help.
/RAM/
 
Hello R.A.M.,
Hi,
I have created ASP.NET application with forms authentication
(Login.aspx).
The problem is that although Login.aspx contains CSS styles and
JPEG/GIF
images, usually the styles are not applied and images are not
displayed. I
mean, if I run application from Visual Studio at about 80% of times
the
styles and images are not applied - black and white page without
images
(only rectangular ares). I am not sure but I think I saw this effect
on my
friend's computer where I installed my application.
Please help.

Make sure you set a allow all rule for the directory with images and stylesheets
in your web.config file. Otherwise the url for the image is redirected to
the login page as well.
 
you probably have your site configured to require authentication for
css and images files. thus they can not appear on the login page.

-- bruce (sqlwork.com)
 
Uzytkownik "bruce barker said:
you probably have your site configured to require authentication for css
and images files. thus they can not appear on the login page.

In application root folder I have Web.config with:

<authentication mode="Forms">

<forms name="MIM-Magazyn" loginUrl="Login.aspx"/>

</authentication>

<authorization>

<deny users="?"/>

</authorization>

Styles.css are placed in the root folder. Images are placed in Images
subfolder but this subfolder doesn't contain any Web.config.

Is my configuration incorrect?

/RAM/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top