473,545 Members | 2,639 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CSS styles and images not applied on login page

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/
Oct 11 '07 #1
4 7702
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\I mageDir\image.g if"

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"R.A.M." <r_********@poc zta.onet.plwrot e in message
news:fe******** **@news2.task.g da.pl...
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/

Oct 11 '07 #2
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
Oct 11 '07 #3
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/

Oct 11 '07 #4
Uzytkownik "bruce barker" <no****@nospam. comnapisal w wiadomosci
news:uQ******** ******@TK2MSFTN GP05.phx.gbl...
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:

<authenticati on mode="Forms">

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

</authentication>

<authorizatio n>

<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/
Oct 12 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
5852
by: Greg Raven | last post by:
I styled my links just the way I want them using CSS, but now my linked images have picked up these same styles. I've tried turning the styles off for the images with: a img { text-decoration: none; outline: none; margin: 0px; padding: 0px;
7
6834
by: codeslayer | last post by:
Greetings to everyone in ‘forum-land': I have a problem that has plaguing me to no end. It is a CSS-related question, and I have not seen this question posted anywhere in forums or through Google search. So here is my problem: I want to use CSS to apply images as bullet styles. However, I want to be able to apply VARIOUS, MULTIPLE...
9
46714
by: Chandy | last post by:
Hi, Is there any way to apply a style that will effectively block the application of any applied or inherited styles for that object and any contained objects? E.g., CSS: P {backgro...}
0
1192
by: Scott | last post by:
I have a custom base page class for my app. In the OnInit, I add a ref to a CSS using RegisterClientScriptBlock. When the page is loaded, the styles that apply to BODY are not being applied. However, if I refresh the page, the styles are applied. Is this because RegisterClientScriptBlock puts the CSS ref after the body tag? Is there a way...
2
1400
by: Sky Sigal | last post by:
Hello: I'm currently messing around, and need as much feedback/help as I can get, trying to find the most economical/graceful way to build usercontrols that rely on styling to look any good... It's the last part that has got me all frazzled (the 'rely on...to look good')... Let me explain -- and please bear with me as it's a bit longer...
7
3483
by: sasquatch | last post by:
Hi, I've a a site with nested master pages and content pages. I tried using a theme with a stylesheet in the app_themes directory referencing it in the web.config file from a pages tag theme attribute. This works for the content pages, but it doesn't seem able to apply the styles to the top master page even though I did set the master head...
1
4342
by: Eric Lindsay | last post by:
I am trying to understand the differences between and uses of persistent, default and alternate styles. I have read http://www.w3.org/TR/REC-html40/present/styles.html section 14.3.2 on specifying external style sheets in link using combinations of rel and using or not using the title attribute. I think I sort of understand rel="alternate...
8
13502
by: Amit | last post by:
I have a master page and a content page but the stylesheet isnt getting applied like how it looks in visual studio design view. The master page is defined like this: <%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
4
2706
by: splounx | last post by:
Hi there, I am a relative CSS & JavaScript novice and I have a particular problem that is beyond my level of knowledge so I thought I'd tap the collective wisdom of this group. I would like to know if there is a means of writing JavaScript that will dynamically display the styles which are currently applied to any DOM element on a web...
0
7490
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7425
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7682
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7449
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7780
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5351
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
1911
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1037
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
734
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.