2017-11-22 23 views
0

.net Core 2.0 WebサイトをAzureまたはローカルIISに公開する場合、公開プロセスはパスしますが、サイトを開くときには、HTTP ERROR 500が受信されます。 公開時のHTTP 500 .netコア2.0 Webサイト

は私がに公開したサイトのweb.configファイルを変更し、背後にある本当のエラーを表示するには:

<aspNetCore processPath="dotnet" arguments=".\OurWebApp.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout"> 
    <environmentVariables> 
     <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" /> 
     </environmentVariables> 
    </aspNetCore> 

エラーが背後にある:

InvalidOperationException: No service for type 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet' has been registered. 

答えて

1

ソリューションから次を削除しました_Layout.cshtmlのようなレイアウトページ:

@inject Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet JavaScriptSnippet 

@Html.Raw(JavaScriptSnippet.FullScript) 

次に公開します。

関連する問題