2017-05-12 23 views
1

ローカルで正常に動作するASP.Netアプリケーションが見つかりました。 私は紺碧のためにVS 2017から展開するときに、私は、エラーアドレスを取得する場合、その罰金配備しかし:HTTPエラー502.5 - azureを使用してasp.net apiを処理するエラー

HTTPエラー502.5 - プロセス障害この問題の

一般的な原因:

アプリケーション・プロセスが失敗しました始めること。 アプリケーションプロセスが開始されましたが、停止しました。 アプリケーションプロセスは開始されましたが、設定されたポートでリッスンできませんでした。

トラブルシューティング手順:

システムイベントログでエラーメッセージを確認します。 アプリケーションプロセスの標準出力メッセージのロギングを有効にします。 アプリケーションプロセスにデバッガを接続し、検査します。この問題は、到着した

は、かつて私は、web.configファイルでこれを追加しました:

<compilation debug="true" targetFramework="4.5"> 
<assemblies> 
    <add assembly="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 
</assemblies> 

別の問題を修正します。それは助けてくれませんでしたが、私は誤ってこれを私のコードに残しました。 私はこのコードをWeb.configに持っている紺碧に一度配備しました。この問題が発生しました。このコードを削除してもエラーは表示され続けます。サーバ稼働日には正常に動作しています。私は私のファイルのログをチェックするとき

それは言う:

>Application 'MACHINE/WEBROOT/APPHOST/LIBRARYRESTAPI' with physical root 'D:\home\site\wwwroot\' failed to start process with commandline '"dotnet" .\Library.API.dll', ErrorCode = '0x80004005 : e0434352. 

私のweb.configファイルの残りの部分は次のようになります。

<?xml version="1.0" encoding="utf-8"?> 

<configuration> 
    <system.webServer> 
    <handlers> 
     <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/> 
    </handlers> 
    <aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/> 
    </system.webServer> 
</configuration> 

私startup.csは次のようになります。

public class Program 
{ 
    public static void Main(string[] args) 
    { 
     var host = new WebHostBuilder() 
      .UseKestrel() 
      .UseContentRoot(Directory.GetCurrentDirectory()) 
      .UseIISIntegration() 
      .UseStartup<Startup>() 
      .Build(); 

     host.Run(); 
    } 
} 


the PROJECT.csproj looks like this: 

<Project Sdk="Microsoft.NET.Sdk.Web"> 

    <PropertyGroup> 
    <TargetFramework>netcoreapp1.0</TargetFramework> 
    <PreserveCompilationContext>true</PreserveCompilationContext> 
    <AssemblyName>Library.API</AssemblyName> 
    <OutputType>Exe</OutputType> 
    <PackageId>Library.API</PackageId> 
    <RuntimeFrameworkVersion>1.0.4</RuntimeFrameworkVersion> 
    <PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;portable-net45+win8</PackageTargetFallback> 
    </PropertyGroup> 

    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> 
    <Prefer32Bit>True</Prefer32Bit> 
    <DocumentationFile>bin\Release\netcoreapp1.0\Library.API.xml</DocumentationFile> 
    </PropertyGroup> 

    <ItemGroup> 
    <PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="1.0.2" /> 
    <PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="1.0.2" /> 
    <PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.0.3" /> 
    <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.0.2" /> 
    <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.0.3" /> 
    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="1.0.3" /> 
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="1.0.0" /> 
    <PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="1.0.2" /> 
    <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.0.2" /> 
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="1.0.3" /> 
    <PackageReference Include="System.Net.Http" Version="4.3.2" /> 
    </ItemGroup> 

    <ItemGroup> 
    <DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.0" /> 
    </ItemGroup> 

    <ItemGroup> 
    <Reference Include="System.Web"> 
     <HintPath>..\..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Web.dll</HintPath> 
    </Reference> 
    <Reference Include="System.Web.Extensions"> 
     <HintPath>..\..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Web.Extensions.dll</HintPath> 
    </Reference> 
    </ItemGroup> 

</Project> 

答えて

2

同様の問題が発生しました。

私の.csprojをターゲット1.1.1にアップデートし、Azureにアップロードする際に問題を修正しました。

<PropertyGroup> 
    <TargetFramework>netcoreapp1.1.1</TargetFramework> 
.... 
</PropertyGroup> 

この問題の原因はわかりません。私は今週Azureにいくつかのアップロードを完了しました。 昨日のVS 2017のアップデートが原因でした。

+0

あなたはこれを理解しました。私は昨日更新しましたが、今日まで公開しませんでした。デバッグしようとすると驚いた経験。これで修正されました。 – David

+0

ありがとうございました。それは私のためにそれをしました。それでも、これがマイクロソフトの品質管理にどのように合格したのか信じられません... –

0

私の解決策は、新しいasp.netプロジェクトで私のapiを再作成したことでした。

コードをコピーしただけで、もう一度作業を開始しました。

関連する問題