Problems hosting rc1-final-update1 on IIS

这一生的挚爱 提交于 2019-12-01 00:01:29

I fixed the problem by deleting global.json from approot\src\website\ .

crokusek

Building on answer by F Andrei. This snippet can be placed in the project file to delete the global.json after each file system publish.

<Target Name="AfterFileSystemPublish" AfterTargets="FileSystemPublish" Condition="'$(publishUrl)' != ''">
    <!-- 
          remove the src/*/global.json file as it prevents the web site from starting under IIS 
     -->
    <Message Text="Workaround:  Removing $(publishUrl)\approot\src\$(ProjectName)\global.json" Importance="high"/>
    <Exec WorkingDirectory="$(ProjectDir)" Command="del $(publishUrl)\approot\src\$(ProjectName)\global.json"/>
</Target>

Can you please make sure you have HttpPlatformHandler installed on the server. Your app pool should be configured as No Managed Code

Also in your startup file in Configure method can you please make sure you have the following line

application.UseIISPlatformHandler ();

At first the problem doesn't look so obvious. I had the same error and after some effort came up with the solution.

  1. Like java repository new dnx project structure keeps user/xxx/.nuget/packages/ all the dependencies so if a name exist there for bringing that package the dnx looks for the packages in there
  2. This case one of the packages were corrupted. So the solution is delete all the packages inside of .nuget if you don't exactly know from which the exception is occuring. Then dnu restore will download all the packages again. Then the problem is solved.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!