【发布时间】:2011-06-15 03:51:00
【问题描述】:
您好,我一直在尝试解决我的问题,但对此无能为力。
问题是
http://localhost/productservice/service.svc 在浏览器中输入此地址时,出现 503 Service Unavailable 错误
当我从 VS 2010 运行我的代码时,它给了我
位于http://localhost/ProductsService/Service.svc 的HTTP 服务太忙。 例外。
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="Data Source=PINCHY\SQLEXPRESS;Initial Catalog=AdventureWorks;Integrated Security=True;MultipleActiveResultSets=True"" 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>
任何帮助将不胜感激 谢谢
【问题讨论】:
-
你需要给我们更多才能继续!你的配置是什么?你用什么绑定?向我们展示服务器端配置!! (
标签内的任何内容) -
我已经添加了配置谢谢
-
您的配置看起来正确。您是否尝试调试您的服务?顺便提一句。 Windows 7 Home 有 IIS7?
-
我做了微软服务跟踪查看器!我可以看到 System.ServiceModel.ServerTooBusyException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 是的 Windows 7 Home 有 IIS 7.5 你认为我在这里遗漏了什么吗?出现该异常后,应用程序池停止工作,我必须重新启动它。
-
我无法让它工作,无论我尝试什么都没有帮助!我必须完全卸载并安装 ISS 7.5、.Net V4.0 框架。现在它工作正常。我猜这是 .Net 4 与 IIS 7.5 的兼容性问题,感谢您的帮助 :) 干杯!
标签: iis-7 wcf wcf-client http-status-code-503