2011-01-25 75 views
11

嗨,我一直在试图解决我的问题,但无能为力。服务不可用503 +位于http://localhost/ProductsService/Service.svc的HTTP服务太忙

问题是

http://localhost/productservice/service.svc型这个地址在我的浏览器时,它给了我503服务不可用错误

当我从2010 VS我的代码运行它给我

HTTP服务位于http://localhost/ProductsService/Service.svc太忙了。 异常。

ProductService使用ApplicationPoolIdentity在ASP.NET v4.0集成应用程序池中运行。

我只是不知道我需要做什么!

(Windows 7家庭& 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> 

任何帮助将非常感谢 Tha nks

+2

你需要给我们更多的去!你的配置是什么?你使用什么绑定?向我们展示服务器端配置! (标记内的任何内容) – 2011-01-25 12:03:57

+0

我已添加配置感谢 – Pinchy 2011-01-25 12:47:03

+0

您的配置看起来正确。您是否尝试调试您的服务?顺便说一句。 Windows 7家庭有IIS7? – 2011-01-26 21:40:15

回答

19

有同样的问题,但不同的原因。在IIS(左侧面板)中,单击应用程序池并确保您选择的ASP.NET版本实际上正在运行。我因为某种原因关闭了。

8

我只是有同样的问题。我发现的问题是一个无效的密码。我的密码最近更改了,IIS的应用程序池使用旧密码。密码更新后,应用程序再次运行。

希望有所帮助。

2

我也遇到了同样的问题,解决的办法是,

在默认下的网站上ProductsService网站IIS点击。在操作窗格的右侧点击高级设置。选中Enabled Protocol属性,该属性的值应该用逗号分隔,例如:http,net.tcp。其实我已经输入了分号而不是逗号,而且我曾经得到了你面临的同样的异常。尝试用逗号替换分号。我认为它应该工作。

1

我在本地主机上运行.NET 4.0网站的IIS 7中不断收到503错误。我对此很满意,因为我只需点击左侧窗格中的应用程序池,在其中列出了站点和应用程序池。果然,相关的应用程序池总是停下来,我刚刚重新启动它。但是,今天(我回到这个问题的原因),这并没有解决问题。在我的情况下,我有一个网站有一些公共页面,然后是2个密码保护的应用程序。只有一个应用程序发出503错误。我选择了应用程序并单击高级设置,并意识到问题在于应用程序池。它指向DefaultAppPool而不是整个网站的应用程序池。当我纠正错误时,网站的所有3个区域都开始正常工作。总而言之,一个503错误可能是由一个停止的应用程序池引起的。只要确保您重新启动正确的应用程序池以使您的网站再次运行。

1

我们的团队遇到同样的问题,503 Service Unavailable。 在我们的例子中,应用程序池很好,(身份设置正确,应用程序池已启动)。

经过一番评估,我们发现基于WCF的服务安装在保留端口80的服务器上。使用netshhttp命令,我们能够看到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

相关问题