2016-09-28 157 views
2

我試圖從Visual Studio 2015發佈模板項目「ASP.NET核心Web應用程序(.NET Framework)」到IIS。部署.NET核心ASP.NET網站 - HTTP錯誤502.5 - 進程失敗

我使用Visual Studio發佈到文件系統功能。

我使用的是Windows 10

我跟着從here指導。

  • 我成立了一個網站,在IIS中,改變了應用程序池.NET CLR版本爲無託管代碼
  • 我instaled的.NET核心Windows服務器託管束
  • 我重新啓動我的機器。

我得到這個錯誤:

HTTP Error 502.5 - Process Failure

我添加了一個日誌文件夾,但獲得創建沒有日誌。

關於如何解決這個問題的任何想法?

編輯:

PS C::

運行的powershell從該.exe的輸出\ TestCoreWebsite> \ Web_CoreWebNetFramework.exe 託管環境:生產 內容根路徑:C:\ TestCoreWebsite 正在聽:http://localhost:5000 應用程序啓動。按下Ctrl + C關閉。

然後,我導航到http://localhost:5000和示例網站的作品。

+0

它的工作原理上的IIS表達運行? – gilmishal

+1

嘗試直接運行'exe'文件,看看是否有任何錯誤。如果是的話,請將它們發佈到這裏,如果沒有,那麼IIS設置有問題 - web.config,文件/文件夾權限。 常見錯誤在這裏定義:https://docs.asp.net/en/latest/publishing/iis.html#common-errors – Ignas

+0

@Ignas當我直接從powershell運行它時,.exe可以正常工作。我會研究文件/文件夾權限問題。 –

回答

2

找到了解決方案:

在根web.config變化:

processPath="%LAUNCHER_PATH%" 

到:

processPath=".\Web_CoreWebNetFramework.exe" 
1

我在CMD

C:\fullpath\dotnet C:\fullpath\PROJECT.dll 

運行下面的命令在命令提示符下,這給了我很多更有意義的錯誤:

"The specified framework 'Microsoft.NETCore.App', version '1.0.1' was not found. - Check application dependencies and target a framework version installed at: C:\Program Files\dotnet\shared\Microsoft.NETCore.App - The following versions are installed: 1.0.0 - Alternatively, install the framework version '1.0.1'.

我安裝了正確的網絡核心和項目正確

0

曾與VisualStudio的2017年,開拓的.csproj文件,並添加到第一塊:

<RuntimeFrameworkVersion>1.0.4</RuntimeFrameworkVersion> 

通常的結果將是:

<PropertyGroup> 
    <TargetFramework>netcoreapp1.1</TargetFramework> 
    <RuntimeFrameworkVersion>1.0.4</RuntimeFrameworkVersion> 
</PropertyGroup>