12

こんにちは、私は自分の問題を解決しようとしていますが、それについては何もできませんでした。

問題は

http://localhost/productservice/service.svcブラウザにこのアドレスを入力すると、503 Service Unavailable エラーが表示されます

VS 2010 からコードを実行すると、

http://localhost/ProductsService/Service.svcにある HTTP サービスがビジー状態です。例外。

ProductService は、ApplicationPoolIdentity を使用して ASP.NET v4.0 統合アプリケーション プールで実行されています。

何をする必要があるのか​​ わかりません!

(Windows 7 Home & IIS7)

basicHttpBinding が使用されます

サーバー側の設定は

<?xml version="1.0"?>
<configuration>
    <connectionStrings>
        <add name="AdventureWorksEntities" connectionString="metadata=res://*/ProductsModel.csdl|res://*/ProductsModel.ssdl|res://*/ProductsModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=PINCHY\SQLEXPRESS;Initial Catalog=AdventureWorks;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient"/>
    </connectionStrings>
    <system.web>
        <compilation debug="true" targetFramework="4.0">
            <assemblies>
                <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            </assemblies>
        </compilation>
    </system.web>
    <system.serviceModel>
        <behaviors>
            <serviceBehaviors>
                <behavior>
                    <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
                    <serviceMetadata httpGetEnabled="true"/>
                    <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
                    <serviceDebug includeExceptionDetailInFaults="false"/>
                </behavior>
            </serviceBehaviors>
        </behaviors>
        <serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
    </system.serviceModel>
    <system.webServer>
        <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
</configuration>

クライアント app.config は

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="BasicHttpBinding_IProductsService" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                    messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                    useDefaultWebProxy="true">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <security mode="None">
                        <transport clientCredentialType="None" proxyCredentialType="None"
                            realm="" />
                        <message clientCredentialType="UserName" algorithmSuite="Default" />
                    </security>
                </binding>
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://localhost:80/ProductsService/Service.svc"
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IProductsService"
                contract="ProductsService.IProductsService" name="BasicHttpBinding_IProductsService" />
        </client>
    </system.serviceModel>
</configuration>

どんな助けでも大歓迎ですありがとう

4

5 に答える 5

22

同じ問題がありましたが、別の原因がありました。IIS (左側のパネル) で [アプリケーション プール] をクリックし、選択した ASP.NET バージョンが実際に実行されていることを確認します。私のはなぜかオフでした。

于 2013-03-26T15:26:47.367 に答える
8

私は同じ問題を抱えています。私にとっての問題は、無効なパスワードであることが判明しました。パスワードが最近変更され、IIS のアプリケーション プールが古いパスワードを使用しています。パスワードが更新されると、アプリケーションは再び機能しました。

お役に立てば幸いです。

于 2011-11-04T17:26:04.513 に答える
3

私も同じ問題に遭遇しましたが、解決策は、

IIS で、デフォルト Web サイトの下にある ProductsService Web サイトをクリックします。アクションペインの下の右側で、詳細設定をクリックします。Enabled Protocol プロパティを確認して、このプロパティの値をコンマで区切る必要があります (例: http,net.tcp )。実際、コンマの代わりにセミコロンを入力したため、直面しているのと同じ例外が発生していました。セミコロン which コンマを置き換えてみてください。うまくいくはずだと思います。

于 2012-05-25T05:12:06.173 に答える
2

私たちのチームも同じ問題を経験しました503 Service Unavailable。この場合、アプリケーション プールは問題ありませんでした (ID が正しく設定され、アプリケーション プールが開始されました)。

いくつかの評価の後、ポート 80 を予約したサーバーに WCF ベースのサービスがインストールされているnetsh httpことがわかりました。コマンドを使用して、URL の予約を確認できました。

netsh http show urlacl

Reserved URL            : http://+:80/

次のリンクが役に立ちました: http://blogs.msdn.com/b/webtopics/archive/2010/02/17/a-not-so-common-root-cause-for-503-service-unavailable.aspx

于 2016-01-14T13:20:29.313 に答える