0

When I upload my MVC 4 project to my WebServer, I saw that all my CSS and JavaScript references that I put on BundleConfig wasn't loaded to the page, instead this, appears on my rendered page the following path

<link rel="stylesheet" href="fw14/Content/css?v=kSepHHq11FdR1tRAJySyLFezI3fwYIn7a12kdamDI-w1">

In localhost works fine,

BundleConfig

 bundles.Add(new StyleBundle("~/Content/css").Include(
                        "~/fw14/Content/css/san.css",
                        "~/fw14/Content/css/bootstrap.css"
                        ));  

My application are in

wwwroot/fw14/

When I open the <link> when is rendered, I can saw this

<h2>403 - Forbidden: Access is denied.</h2>
<h3>You do not have permission to view this directory or page using the credentials that you supplied.</h3> 

I think this weird, because I have permission to upload all my project, but the system can't saw the folders?

enter image description here

In my IIS, SislocPool is the name of my AppPool, and runs in NetworkService credentials

enter image description here

I also try put the following line in my Web.Config

<modules runAllManagedModulesForAllRequests="true"/>
Lucas_Santos
  • 4,638
  • 17
  • 71
  • 118
  • 1
    Just because YOU have permission to upload doesn't mean the Worker Process does. Your worker process runs under a different account with different credentials than you. – Erik Funkenbusch Jun 02 '14 at 15:20
  • I agree. but now I give full access in my folder, but still the same. In thsi case, I give full access to my pool in IIS that uses localSystem credentials – Lucas_Santos Jun 02 '14 at 15:32
  • Your IIS pool does not use local system credentials. If it did, it could not access the network. Typically, app pools use Network Service,or a local or domain user (not system). – Erik Funkenbusch Jun 02 '14 at 15:34
  • Changed to NetworkService, I restart the pool, but still same error, forbidden access, and then, all my CSS files doesn't load. – Lucas_Santos Jun 02 '14 at 16:19
  • @Erik Funkenbusch , some time it has to do with bundle name and folder structure issue, so [this](http://stackoverflow.com/a/28231111/2218697) **answer** solved my issue. hope helps someone. – Shaiju T Jan 18 '16 at 11:08

0 Answers0