CSS Not working on production server

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
LVL 1
brasso_42Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

princeatapiCommented:
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
princeatapiCommented:
Try using Absolute path to link your style sheet
0
brasso_42Author Commented:
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
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

princeatapiCommented:
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
krunal_shahCommented:
Hi,

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

Thanks
0
princeatapiCommented:
Yes even you can try as mentioned by Krunal
0
codingbeaverCommented:
>>>but when i package the solution and move it to a production server
How did you "move" it?
0
robastaCommented:
"...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
brasso_42Author Commented:
In a virtual directory
0
princeatapiCommented:
Have you enabled the relative path in IIS 7 ? for your application ?
0
brasso_42Author Commented:
no i dont know what that is :)
0
princeatapiCommented:
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
princeatapiCommented:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.