2012-04-24 8 views
1

私は最近、共有ホスティングをGoDaddyのvpsに切り替えました。共有ホスティングで正常に機能したWebサービスがありました。私はそれを私のvpsの下で動作させようとしています。私はリンクに行くときに500 - 内部エラーを継続的に取得します。500 - Webサービスの内部エラー

私はIISでアプリケーションとしてセットアップしました。私は統合パイプを使用して独自のアプリケーションプールを作成しました。

この問題の原因は他に何かありますか?

EDIT 1: 私は私のサイトと同じアプリケーションプールを使用する上で、私のアプリケーションプールを切り替える場合は、私が代わりにこのエラーが発生します。 「パーサーエラー 説明:エラーは、サービスに必要なリソースの解析中に発生しました。この要求は、次の特定の解析エラーの詳細を確認し、ソースファイルを変更してください

パーサーエラーメッセージ:ページが<%の@ WebServiceクラス=「MyNamespace.MyClass」を持っている必要があります...%>ディレクティブ

ソースエラー:

行1:これは、プリコンパイルツールによって生成されたマーカーファイルであり、削除しないでください!

ソースファイル:/webservices/namesearch.asmxライン:1 "ここ

は私のweb.configファイルが

<?xml version="1.0"?> 
<configuration> 
    <appSettings/> 
    <connectionStrings/> 
    <system.web> 


<compilation debug="true" targetFramework="4.0"/> 
<!-- 
    The <authentication> section enables configuration 
    of the security authentication mode used by 
    ASP.NET to identify an incoming user. 
--> 
    <authentication mode="Windows"/> 
     <customErrors mode="Off"/> 

     <!-- 
     The <customErrors> section enables configuration 
     of what to do if/when an unhandled error occurs 
     during the execution of a request. Specifically, 
     it enables developers to configure html error pages 
     to be displayed in place of a error stack trace. 

     <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"> 
     <error statusCode="403" redirect="NoAccess.htm" /> 
     <error statusCode="404" redirect="FileNotFound.htm" /> 
     </customErrors> 
    --> 
    <pages controlRenderingCompatibilityVersion="4.0" clientIDMode="AutoID"/> 
    </system.web> 
    <!-- 
     The system.webServer section is required for running ASP.NET AJAX under Internet 
     Information Services 7.0. It is not necessary for previous version of IIS. 
    --> 
</configuration> 

EDIT 2: ので、私はそれも言っていたことパーサエラーに気づきました"ソースエラー:

1行目:これはプリコンパイルツールによって生成されたマーカーファイルであり、削除すべきではない「

は私がやってみました! Webサービス上のプリコンパイル。私がこれを行うと、エラーが発生しました "アプリケーションレベルを超えてallowDefinition = 'machinetoapplication'として登録されたセクションを使用するとエラーが発生するこのエラーはiisのアプリケーションとして設定されていない仮想ディレクトリによって引き起こされる可能性があります"

+2

ログファイルを/ ...で探しましたか? – DaveRandom

+0

あなたは実際にどの500を手に入れましたか? http://support.microsoft.com/kb/943891 –

+0

「WinHTTP Web Proxy Auto-Discovery Serviceサービスが実行状態に入った」という2つのログが表示されています。 「アプリケーションプール 'Webservices'を処理しているプロセスIDが '2672'のワーカープロセスが非アクティブなためにシャットダウンされました。アプリケーションプールのタイムアウト設定が5分に設定されました。 –

答えて

2

。それはすぐにsupply arguments to your web serviceすることができます。

あなたのエラーは、イベントログ(特にセキュリティログ)の書き込みまたは読み取りを試みる可能性が高いNameSearch.asmx.cs:line 29です。おそらくEventLog.WriteEntry()

ここで問題となっているのは、適切な権限を持たずにVerifyAndCreateSource()に電話しようとしていることです。

これを解決するには、セキュリティイベントログに適切なアクセス許可を与えます。ユーザーコンテキストの実行がNetworkServiceの可能性があります。

IIS7: Web Application writing to Event Log generates Security Exceptionの手順を実行することを検討してください。ここでの主なアイデアは、ネットワークサービスを可能にすることですか、あなたのアプリが下に実行されているものは何でもセキュリティコンテキスト、キー

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog 

enter image description here

レジストリへの書き込み権限あなたの.NETコードでスロー完全なエラーは以下のとおりです。

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. To create the source, you need permission to read all event logs to make sure that the new source name is unique. Inaccessible logs: Security. at System.Diagnostics.EventLogInternal.FindSourceRegistration(String source, String machineName, Boolean readOnly, Boolean wantToCreate) at System.Diagnostics.EventLogInternal.SourceExists(String source, String machineName, Boolean wantToCreate) at System.Diagnostics.EventLogInternal.VerifyAndCreateSource(String sourceName, String currentMachineName) at System.Diagnostics.EventLogInternal.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData) at System.Diagnostics.EventLog.WriteEntry(String message) at WebServices.NameSearch.GetSearchResult(String prefixText, Int32 count) in C:\Users\xufurisa\Dropbox\Programs\PoliticProfiles\WebServices\NameSearch.asmx.cs:line 29

+0

ありがとうございます。これは大いに助けました。それを取り除き、私のWeb設定でいくつか変更すると、動作し始めました。そのソープWebクライアントは大きな助けとなりました。 –

0

が含まれるように、あなたのweb.configファイルを編集し、どこのコードであなたのエラーが発生しているかを決定するために:私はちょうどyour web serviceをヒットするSoapClientを使用

<system.web> 
    <customErrors mode="Off"/> 
</system.web> 
+0

これは私のために何も変わっていません –

+0

あなたは確信していますか? web.configに1つのcustomerrorsセクションがあり、オフです。あなたはweb.configを投稿できますか? –

+0

上記の編集を追加しました –

関連する問題