Click here to Skip to main content
15,884,986 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi

In my current Project I am using MVC1 and ASPX Engine. After Completion of Project I want to host on IIS. I m using Windows 7 OS.

Once Hosted, I tried to to access the application. But the application doesn't load Jquery files, Js Files and CSS Files.

What I have tried:

Currently I am using following Code.

<link href="../../Content/css/base.css" rel="stylesheet" type="text/css" />
<script src="../../Content/Scripts/js/global.js" type="text/javascript"></script>


I tried replacing "../.." with"~" but doen't work. As well as I checked MIME type in IIS. It also doesn't work.

Please help me.
I am new to IIS configuration.

Thanks in advance.
Posted
Updated 10-Jul-17 10:07am
v2
Comments
Suvendu Shekhar Giri 10-Jul-17 3:44am    
By putting "../../", you are expecting to move back to 2 level of folders than your current folder. Is that correct?
F-ES Sitecore 10-Jul-17 4:48am    
It's most likely because the paths are wrong. We don't know your file structure or site structure so we can't tell you what they should be. Use the browser's dev tools to look at the network calls to see if you can work out what is going wrong. Usually it is better to get the framework to make the urls for you so you don't need to use things like "../../". I have no idea what support MVC1 has for this as I don't remember technology that's 10 years old, but there will be *something* that generates the url for you.

1 solution

As Sitecore says, it may be your paths are wrong. There usually is no need to do anything in IIS other than turn on the site. You usually won't change anything so you'll have to figure out what it is doing. For example, how do you know it is not loading those resources? Use your browsers dev tools and check the console. You'll probably have an error for each of those resource files and a 404 but it will indicate where it is trying to access them.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900