IIS7 403 - Access Denied

前端 未结 7 1502
孤城傲影
孤城傲影 2021-01-05 00:16

I am trying to deploy a website that I have built in mvc3 on an server that runs iis7. I was able to get it running through the iis7 locally on my laptop, but when I try to

相关标签:
7条回答
  • 2021-01-05 00:48

    I faced this error last week and it can be caused by many things:

    1. The right version of the .NET framework is not installed or registered with asp_regiis.exe
    2. The "runAllManagedModulesForAllRequests" is set to false in your web.config
    3. The right version of MVC is not installed in the server
    4. You have an ignore route which ignores your request
    5. You have an early exception in your Application_Start and your site doesn't start properly

    For my part I forget to changed my logging directory path value in the web.config to an existing directoy.

    What you can do to know if it's an configuration error or an error in your application is to create a new default MVC project in VS and to deploy it in the same apppool.

    0 讨论(0)
  • 2021-01-05 00:48

    A few things you should check.

    1. Did you set the directory that you unzipped your files in as an application in IIS? Is that application running .NET 3.5/4.0?

    2. Is your pipeline for the application pool running the application you have created above running in Integrated Mode or Classic Mode?

    Typically, when deploying an MVC app, a 403 is not a permission issue. It is telling you that directory browsing is not allowed. This is because without either of the 2 items above (or a custom wildcard mapping in IIS), the web server does not know how to handle routing, the basis of an MVC app.

    0 讨论(0)
  • 2021-01-05 00:58
    1. Create a new MVC 3 internet app with all the defaults. Run on local IIS server.
    2. Move app to server and add it as an application.
    3. Test local access on the server (browse 80 from IIS manager).
    4. Don't shotgun twiddle all the permissions until you figure out the problem.
    5. See my blog http://blogs.msdn.com/b/rickandy/archive/2011/04/22/test-you-asp-net-mvc-or-webforms-application-on-iis-7-in-30-seconds.aspx
    0 讨论(0)
  • 2021-01-05 01:00

    If it is aspx file Make sure the default page as been set on the IIS, if not install the asp.net application. Once you installed by default aspx file will be create.

    0 讨论(0)
  • 2021-01-05 01:04

    While setting up website, have you tested your IIS settings by clicking on test connection. Did you get two green ticks. If not please check your Authentication settings. folder access settings and application pool settings.

    0 讨论(0)
  • 2021-01-05 01:06

    Instead of zipping your app, it will be better if you can publish it (in VS, right click on your project and publish) and after deploy it to your website (you have several options).

    After, for IIS, it looks like a problem with Authentication. Try to allow Anonymous authentication. On IIS manager, go to your website, click on the Authentication module and enabled "Anonymous Authentication".

    Let's see what happen after that even if the "time out" problem is strange .... Just to be sure, by default it is disabled to browse the content of a website and you will have a 403 error if you tried to do it.

    Where did you put your app? Sometimes it can be problematic (for access configuration) to put it in specific folders like Programs files, etc etc. Try to install it at the root such as C:\Websites\MyApp just to test without user permission problems.

    0 讨论(0)
提交回复
热议问题