0

I have created a mvc3 application which work fine locally. I work for a department where all websites sits under single url. when i deployed my website to test environment than page are coming up but all java script and content (images,css) folder path is not right.

I work for a department where all websites sits under single url eg https://abcd.test.hosts.network/application1 ,https://abcd.test.hosts.network/application2

When i check location of images it shows following path http://abcd.test.hosts.network/Content/Images/Master/masterBannerLeft5.jpg

What should i do or how i should deploy my application to fix the problem of java script and content folder.

1 Answer 1

1

Are you using the following for referencing content files:

<link href="@Url.Content("~/content/css/normalize.css")" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="@Url.Content("~/content/js/jquery.js")"></script>

rather than:

<link href="/content/css/normalize.css" rel="stylesheet" type="text/css" />

See http://msdn.microsoft.com/en-us/library/system.web.mvc.urlhelper.content.aspx for the details, it basically resolves the path within your application.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.