?
Solved

CSS Not working on production server

Posted on 2010-01-11
13
Medium Priority
?
592 Views
Last Modified: 2012-05-08
Hi

Ive written a website using VS2010 and all works fine in there, but when i package the solution and move it to a production server the css is not working at all.

The production server is a Win 2008 Std running IIS7

Can anyone help?

Many thanks

Brasso
0
Comment
Question by:brasso_42
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
13 Comments
 
LVL 11

Expert Comment

by:princeatapi
ID: 26284820
Well make sure that the relative path is disabled in IIS7 by default you must have to enable from the Application settings , probably your link path might have ignored due to relative path
0
 
LVL 11

Expert Comment

by:princeatapi
ID: 26284824
Try using Absolute path to link your style sheet
0
 
LVL 1

Author Comment

by:brasso_42
ID: 26284839
Currently I use
<link href="../Styles/site.css" rel="stylesheet" type="text/css" media="screen" />
toload my css.

How would i modify this to use absolute path?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 11

Expert Comment

by:princeatapi
ID: 26284877
Rather Enable the Parent Path

Refer this link will help you out how to enable the parent path
http://learn.iis.net/page.aspx/566/classic-asp-parent-paths-are-disabled-by-default/
0
 
LVL 10

Expert Comment

by:krunal_shah
ID: 26284904
Hi,

do it like,
<link href="~/Styles/site.css" rel="stylesheet" type="text/css" media="screen" />

Thanks
0
 
LVL 11

Expert Comment

by:princeatapi
ID: 26285188
Yes even you can try as mentioned by Krunal
0
 
LVL 10

Expert Comment

by:codingbeaver
ID: 26288013
>>>but when i package the solution and move it to a production server
How did you "move" it?
0
 
LVL 14

Expert Comment

by:robasta
ID: 26290524
"...the css is not working at all..."

Like all comments suggest, there is a problem with the path.

Since it works in VS, it could be that your directory structure is different in IIS. Are you running the site as a virtual directory or is it inside another site?
0
 
LVL 1

Author Comment

by:brasso_42
ID: 26291236
In a virtual directory
0
 
LVL 11

Expert Comment

by:princeatapi
ID: 26291254
Have you enabled the relative path in IIS 7 ? for your application ?
0
 
LVL 1

Author Comment

by:brasso_42
ID: 26291990
no i dont know what that is :)
0
 
LVL 11

Expert Comment

by:princeatapi
ID: 26292011
Fine
   1. Click Start, click Administrative Tools, and then click Internet Information Services (IIS) Manager.
   2. Double-click your computer name in the left pane, and then double-click Web Sites.
   3. Locate the Web site and directory that houses the ASP application.
   4. Right-click the application site or directory, and then click Properties.
   5. Select Home Directory, and then click Configuration.
   6. Click Options, and then click to select the Enable Parent Paths check box.
   7. Click OK two times.
0
 
LVL 11

Accepted Solution

by:
princeatapi earned 2000 total points
ID: 26292015
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question