首页 文章

HTTP错误403.14 - 禁止访问(ASP.NET MVC 6,ASP.NET 5,IIS 7,Windows Server 2008)

提问于
浏览
3

在针对运行IIS 7的Windows Server 2008 x64执行XCopy部署ASP.NET MVC 6应用程序并尝试运行已部署的Web应用程序之后,我正在点击“HTTP Error 403.14 - Forbidden” .

我按照http://docs.asp.net/en/latest/getting-started/installing-on-windows.html#install-asp-net-standalonehttp://docs.asp.net/en/latest/publishing/iis.html#xcopy-to-iis-server的步骤操作,我使用的是dnx-clr-win-x64.1.0.0-beta7 .

2 回答

  • 2

    403.14是不允许列出目录内容的错误代码 .

    您确定已将目标目录设置为IIS中的应用程序吗?这似乎是最可能的罪魁祸首 . 其他可能性是您的应用程序池使用的是错误的.NET版本(除了服务器上的内容之外),或者您错过了应用程序所需的文件夹,例如App_Data等 .

  • 1

    我添加了一个简单的测试default.aspx页面并得到一个异常,似乎表明ASP.NET MVC 6只在 IIS 7.5 and later 下运行 . 就转换为 Windows Server 2008 R2 and later 的系统要求而言,至少在撰写本文时:

    Exception information: 
        Exception type: PlatformNotSupportedException 
        Exception message: IIS 7.5 or higher is required.
       at AspNet.Loader.Error.Bootstrapper_RequiresIIS75()
       at AspNet.Loader.Bootstrapper.LoadApplicationNet45(String appId, String appConfigPath, IProcessHostSupportFunctions supportFunctions, LoadApplicationData* pLoadAppData, Int32 loadAppDataSize, String runtimePackagePath, String appBasePath)
       at AspNet.Loader.Bootstrapper.LoadApplication(String appId, String appConfigPath, IProcessHostSupportFunctions supportFunctions, LoadApplicationData* pLoadAppData, Int32 loadAppDataSize)
       at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
       at System.Web.Hosting.ProcessHost.System.Web.Hosting.IProcessHostLite.ReportCustomLoaderError(String appId, Int32 hr, AppDomain newlyCreatedAppDomain)
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)   at System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException)
    

相关问题