我正在使用 WCF,它在 localhost 上运行良好。在我把它放在生产服务器上之后,它抛出了一个异常
无法激活请求的服务“ http://global-kazway.kz/Service1.svc ”。有关详细信息,请参阅服务器的诊断跟踪日志
我是服务的新手,已经尝试解决这个问题将近 3 个小时。
这是App.config
客户的;
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections></configSections>
<connectionStrings>
<add name="TestProject.Properties.Settings.DBConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\1\Documents\visual studio 2010\Projects\TestProject\TestProject\AppData\DB.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" /><add name="DBEntities" connectionString="metadata=res://*/DBModel.csdl|res://*/DBModel.ssdl|res://*/DBModel.msl;provider=System.Data.SqlClient;provider connection string="data source=.\SQLEXPRESS;attachdbfilename=C:\Users\1\Documents\visual studio 2010\Projects\TestProject\TestProject\AppData\DB.mdf;integrated security=True;user instance=True;multipleactiveresultsets=True;App=EntityFramework"" providerName="System.Data.EntityClient" /><add name="DBEntities1" connectionString="metadata=res://*/DBModel.csdl|res://*/DBModel.ssdl|res://*/DBModel.msl;provider=System.Data.SqlClient;provider connection string="data source=.\SQLEXPRESS;attachdbfilename=|DataDirectory|\AppData\DB.mdf;integrated security=True;user instance=True;multipleactiveresultsets=True;App=EntityFramework"" providerName="System.Data.EntityClient" /></connectionStrings>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IService1" 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://global-kazway.kz/Service1.svc" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IService1" contract="kazwayServiceReference.IService1"
name="BasicHttpBinding_IService1" />
</client>
</system.serviceModel>
</configuration>