PC Review


Reply
Thread Tools Rate Thread

CSS styles and images not applied on login page

 
 
R.A.M.
Guest
Posts: n/a
 
      11th Oct 2007
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/


 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      11th Oct 2007
Make sure you are using virtual path to the images and css rather than
physical one. I mean it should be something like
"~/ImageDir/image.gif"
rather than
"c:\mywebroot\ImageDir\image.gif"

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


"R.A.M." <(E-Mail Removed)> wrote in message
news:fekivh$r32$(E-Mail Removed)...
> 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/
>



 
Reply With Quote
 
Jesse Houwing
Guest
Posts: n/a
 
      11th Oct 2007
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.


> /RAM/


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.

--
Jesse Houwing
jesse.houwing at sogeti.nl


 
Reply With Quote
 
bruce barker
Guest
Posts: n/a
 
      11th Oct 2007
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)

R.A.M. wrote:
> 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/
>
>

 
Reply With Quote
 
R.A.M.
Guest
Posts: n/a
 
      12th Oct 2007
Uzytkownik "bruce barker" <(E-Mail Removed)> napisal w wiadomosci
news:uQ$(E-Mail Removed)...
> 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/


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW TO HAVE THE STYLES BE APPLIED PARTIALLY Faraz Ahmed Qureshi Microsoft Word Document Management 3 30th Apr 2010 08:45 AM
2.0: Gridview row styles applied to TR, does not work HoustonFreeways Microsoft ASP .NET 1 17th Feb 2006 04:14 PM
Forms authentication with images on the login page Brian Muth Microsoft ASP .NET 2 25th Nov 2005 09:52 PM
two styles applied to the same paragraph =?Utf-8?B?Qm9i?= Microsoft Word Document Management 1 21st Oct 2005 04:42 AM
Styles not being applied with RegisterClientScriptBlock Scott Microsoft ASP .NET 0 27th Jul 2003 01:23 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:08 AM.