Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

CSS Not working on production server

Posted on 2010-01-11
13
Medium Priority
?
596 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
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Screencast - Getting to Know the Pipeline
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month14 days, 20 hours left to enroll

577 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