2 つのサービスと、それらをテストするためのテスト コンソール アプリがあります。
TestConsole2 (テスト コンソール) には、サービス RequestsStub へのサービス参照があります。RequestsStub には、RequestServices へのサービス参照があります。
RequestsStub は、RequestServices からメソッドを呼び出すだけです。
だから視覚的に....
TestConsole2 -> RequestsStub -> RequestServices
そのため、サーバーで RequestServices をホストし、RequestsStub と TestConsole2 をローカルに配置しました。それはすべてうまくいきました。サーバーで RequestsStub を変更するとすぐに、エラーが発生します....
メッセージを試行できるhttp://urlremoved.on.ca/Requests/RequestService.svcでリッスンしているエンドポイントはありませんでした。これは、多くの場合、アドレスまたは SOAP アクションが正しくないことが原因です。詳細については、InnerException (存在する場合) を参照してください。
私を正しい方向に向けるためのアイデアや知識はありますか?
更新: RequestServices の構成ファイル...
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="RequestServices.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<connectionStrings>
<add name="RequestServices.Properties.Settings.RequestServicesConnectionString"
connectionString="Data Source=DEVSQL;Initial Catalog=RequestServices;Persist Security Info=True;User ID=webdev;Password=removed"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_ICommunicationService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" maxBufferPoolSize="524288"
maxReceivedMessageSize="65536" useDefaultWebProxy="true" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://urlremoved.on.ca/Communication/CommunicationService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ICommunicationService"
contract="serviceCommunication.ICommunicationService" name="BasicHttpBinding_ICommunicationService" />
</client>
<behaviors>
<endpointBehaviors>
<behavior name="RequestServices.RequestServiceBehavior">
<enableWebScript/>
</behavior>
</endpointBehaviors>
<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="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
</customHeaders>
</httpProtocol>
</system.webServer>
<applicationSettings>
<RequestServices.Properties.Settings>
<setting name="LogSource" serializeAs="String">
<value>Request Services Service</value>
</setting>
<setting name="LogType" serializeAs="String">
<value>Application</value>
</setting>
</RequestServices.Properties.Settings>
</applicationSettings>
</configuration>
そして、RequestsStub の設定...
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IRequestService" 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://urlremoved.on.ca/Requests/RequestService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IRequestService"
contract="RequestsServiceReference.IRequestService" name="BasicHttpBinding_IRequestService" />
</client>
<behaviors>
<endpointBehaviors>
<behavior name="RequestsStub.RequestServicesStubBehavior">
<enableWebScript/>
</behavior>
</endpointBehaviors>
<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="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>