[英]Issue hosting Asp.net Core 2.0 on IIS 8.5
我正在设置一个服务器来承载我用asp.net Core 2.0.3制作的应用程序。 我将使用IIS 8.5在Windows Server 2012 R2服务器上运行此应用程序。 我按照此Microsoft教程设置环境。
如果我运行(dir (Get-Command dotnet).Path.Replace('dotnet.exe', 'shared\\Microsoft.NETCore.App')).Name
Power Shell中的(dir (Get-Command dotnet).Path.Replace('dotnet.exe', 'shared\\Microsoft.NETCore.App')).Name
它告诉我我正在运行正确版本的运行时环境,并通过运行dotnet MyProject.dll
在5000门上运行该项目,并且可以从服务器访问它。 但是,当使用服务器URL访问时,这是我看到的页面:
应用程序池的.Net CLR版本设置为“无托管代码”,这是我的Web.config:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<clear />
<rule name="Redirect to https" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" appendQueryString="false" />
</rule>
</rules>
</rewrite>
<modules runAllManagedModulesForAllRequests="false">
<remove name="WebDAVModule" />
</modules>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments="C:\inetpub\wwwroot\MyApp.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" />
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="3221225472" />
</requestFiltering>
</security>
</system.webServer>
</configuration>
我也尝试删除重写规则,没有任何变化。 并且没有创建错误日志。
我迷失了其他尝试方法。 你有什么建议吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.