I spent almost 2-3 good hours on this and im here now, as the question states. The project works fine in VS but when I deploy/publish it through IIS (to access it on local network) some files (well most of them) aren't accessible. This happened when I added the Metronic theme within my web project. The files are like:
<!-- BEGIN GLOBAL MANDATORY STYLES -->
<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css" />
<link href="../../assets/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="../../assets/global/plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css" />
<link href="../../assets/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="../../assets/global/plugins/bootstrap-switch/css/bootstrap-switch.min.css" rel="stylesheet" type="text/css" />
<!-- END GLOBAL MANDATORY STYLES -->
OR
<img src="../assets/pages/img/logo.png" alt="place Logo Here" />
Now once its published, it throws me a pile of errors that it could not find any of those files.
Notice: the url in both the pictures, the deployed project is under another folder. is it the culprit?
I am trying to figure out a solution that works for both VS debugging and the deployed project.
What I have tried is:
2: Deploying asp.net application to root directory in IIS
3: How to avoid deploying ASP.NET MVC3 application in subpath on IIS 7.5
4: ASP.NET WebForms: Why do relative paths within user controls work locally, but not when deployed?