在带有IIS的Windows服务器上托管Dot net Core的问题(即时交易)

时间:2018-12-10 16:15:32

标签: asp.net-mvc asp.net-core .net-core

我想在Windows服务器IIS上托管nopcommerce 4.10。我已经安装了.net核心托管包,.net Sdk,并且还设置了其环境变量c ++可再发行组件包。但是我仍然得到这个屏幕。我也启用了stdout,但是没有得到任何日志。 ScreenImage

我已经尝试了论坛和所有其他站点的许多解决方案,但仍然遇到相同的问题。

Web.config

<configuration>
 <system.webServer>
<modules>
  <!-- Remove WebDAV module so that we can make DELETE requests -->
  <remove name="WebDAVModule" />
</modules>
<handlers>
  <!-- Remove WebDAV module so that we can make DELETE requests -->
  <remove name="WebDAV" />
  <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" 
 resourceType="Unspecified" />
</handlers>
  <!-- When deploying on Azure, make sure that "dotnet" is installed and the 
  path to it is registered in the PATH environment variable or specify the 
 full path to it -->
<aspNetCore requestTimeout="23:00:00" processPath="%LAUNCHER_PATH%" 
arguments="%LAUNCHER_ARGS%" forwardWindowsAuthToken="false" 
stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" startupTimeLimit="3600" 
/>
<httpProtocol>
  <customHeaders>
    <remove name="X-Powered-By" />
     </customHeaders>
    </httpProtocol>
  </system.webServer>
</configuration>

1 个答案:

答案 0 :(得分:1)

%LAUNCHER_PATH%和%LAUNCHER_ARGS%未被替换,应该类似于

<aspNetCore requestTimeout="23:00:00" processPath="C:\Program Files (x86)\dotnet\dotnet.exe" arguments=".\Nop.Web.dll" forwardWindowsAuthToken="false" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" startupTimeLimit="3600" />