3

エラーなしでコンパイルされたアプリケーションをローカル マシンにデプロイした後、Internal Server 500 エラーが発生します。アプリケーションがデプロイされているサーバーには大量のセキュリティがあるため、すべてのディレクトリに対して読み取りおよび書き込みアクセスを指定する必要があります。このアプリケーションは、Windows 認証と Web サービスを使用して、プロキシ経由でドロップダウン ボックスに入力します。Web サービスへの接続に問題があるか、ファイルの読み取り/書き込みセキュリティに問題があるか、アクティブ ディレクトリ認証に問題がある可能性があります。

次のコードでエラーの原因に関する詳細情報が表示されるように、web.config を編集しました。

<system.web>
  <customErrors mode ="Off"></customErrors>
  <compilation debug="true" strict="false" explicit="true" targetFramework="4.0" />
  <trace enabled="true" pageOutput="true" />

  <authentication mode="Windows"/>
   <authorization>
    <allow roles="alg\ADMIN_USER" />
    <deny users="*" />        
  </authorization> 

<client>
  <endpoint address="http://63.236.108.91/aCompService.svc" binding="basicHttpBinding"
    bindingConfiguration="BasicHttpBinding_IAcompService" contract="aComp_ServiceReference.IAcompService"
    name="BasicHttpBinding_IAcompService" />
</client>

次のエラーが表示されます。

    500 - Internal server error.

    There is a problem with the resource you are looking for, and it cannot be 
    displayed. 

エラーの原因を示すスタック トレースを確認したいと思います。

完全なスタック トレースを表示するには、web.config ファイルに何を入力すればよいですか?

Web サイトで、ローカルで実行するものから展開するものに変更する必要があるものは何ですか?

更新 - 展開担当者がセキュリティの読み取り/書き込み制限を解除しました。

    Parser Error Message: The connection name 'ApplicationServices' was not found in 
    the applications configuration or the connection string is empty. 

エラーを取り除くために、72 行目で宣言されている AspNetSqlRoleProvider を削除しましたが、それでもエラーが発生しました。次に、AspNetWindowsTokenRoleProvider とすべてのプロバイダー情報を削除したところ、次のエラーが発生しました。

    Exception message: Default Role Provider could not be found.  

私たちのホスティングはすべてリモートで行われますが、サーバー担当者はローカル Web サーバーにリモートでログインできます。サーバー担当者がファイルを適切な場所に投稿しなかったようです。今、私は今、エラーが発生します:

    There is a problem with the resource you are looking for, and it cannot 
    be displayed.

これらの問題を解決する方法についてのアイデアはありますか?

ご覧いただきありがとうございます。

4

3 に答える 3

1

アプリケーションのフォルダー階層内の別の場所に、行っている変更を上書きする可能性のある web.config がありますか? 以前、開発者が web.config を 1 レベル上にコピーして、テストの変更を行っている間、そのコピーを保持するという混乱を見てきました。

それは多くの頭を悩ませる原因になる可能性があります。

于 2011-05-06T21:16:01.200 に答える
1

構成ファイルのコピーを作成し、セグメントを 1 つ削除して、結果を 1 ステップずつテストすることで、この同じ問題を克服することができました。私が発見したのは、ハンドラーを削除した後、正常に機能したことです。

于 2012-01-05T22:49:08.370 に答える
1

おそらく、偽装を使用すると役立つでしょうか?web.config に以下を追加しました。

  <authentication mode="Windows"/>
  <identity impersonate="true"/>

メソッドによってイベント ログのエラーを追跡できるように、WriteToEventLog コードを追加しました。

    Catch Ex As Exception
        WriteToEventLog(Ex.Message, "GetCarriers-Method", EventLogEntryType.Error, "aComp-utility")


    Catch ex As Exception
        WriteToEventLog(ex.Message, "GetMarketingCompanies-Method", EventLogEntryType.Error, "aComp-utility")

おそらく、TraceListenerLog を追加すると役立つでしょうか?

このコードの詳細については、MSDNを参照してください。web.config に以下を追加しました。

 <configuration>
   <system.diagnostics>
     <trace autoflush="false" indentsize="4">
       <listeners>
         <add name="myListener"
           type="System.Diagnostics.EventLogTraceListener"
           initializeData="TraceListenerLog" />
       </listeners>
     </trace>
   </system.diagnostics>
 </configuration>

default.aspx.vb に以下も追加する必要がありますか?

Overloads Public Shared Sub Main(args() As String)

' Create a trace listener for the event log.
Dim myTraceListener As New EventLogTraceListener("myEventLogSource")

' Add the event log trace listener to the collection.
Trace.Listeners.Add(myTraceListener)

' Write output to the event log.
Trace.WriteLine(myTraceListener)

End Sub 'Main
于 2011-05-10T16:17:52.503 に答える