0

I'm using asp.net MVC. I have hosted my website on appharbor. Everything is working fine on localhost. On live website I'm getting error.

Server responded with a status of 403 (Forbidden)

enter image description here

To solve this issue. I added <modules runAllManagedModulesForAllRequests="true" /> in web.config but it didn't work.

Another solution is I need to You need to change permissions on the folder bootstrap/css. To change permission I have to type command sudo chmod 0777. But I cannot figure out where to type this command.

So where I have to type this command or what is the alternative to tackle this 403 issue.

Irfan Y
  • 1,242
  • 2
  • 21
  • 68

1 Answers1

0

I know this is a little old, but I had the same problem now with jstree.

I don't know if you realized, but this behavior is given to you by the EnableOptimizations.

Basead on Denis Ivin answer here, you probably have a jstree folder inside Content/plugins and IIS, instead of giving you the jstree.css, is trying to list the folder and that is, by default, forbidden.

In my case I had to do the following for the plugin work as intended:

BundleConfig.cs

bundles.Add(new StyleBundle(
            "~/Content/plugins/jstree/jstree")
            .Include("~/Content/plugins/jstree/style.css"));

View.cshtml

@section css{
      @Styles.Render("~/Content/plugins/jstree/jstree")
}
Diego Felipe
  • 133
  • 1
  • 4