Hi,
I am trying to create a POC "To host WCF in net.tcp."
Here is my web.config
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="tcp_unsecured">
<security mode="None" />
</binding>
</netTcpBinding>
</bindings>
<services>
<service name="WcfService1.Service1">
<endpoint address="untcp" binding="netTcpBinding" bindingConfiguration="tcp_unsecured"
name="data" contract="WcfService1.IService1">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexTcpBinding"
name="Metadata" contract="IMetadataExchange">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:8084/service" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="false" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
Now, when I debug it.
I get the following error from WCF Test Client:
Error: Cannot obtain Metadata from http://localhost:4097/Service1.svc
//I can't understand why it is trying to download from http ??? :( :(
If this is a Windows (R) Communication Foundation service to which you have access,
please check that you have enabled metadata publishing at the specified address.
For help enabling metadata publishing, please refer to the MSDN
documentation at http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange
Error URI: http://localhost:4097/Service1.svc
Metadata contains a reference that cannot be resolved: 'http://localhost:4097/Service1.svc'.
The server did not provide a meaningful reply; this might be caused by a contract mismatch,
a premature session shutdown or an internal server error.HTTP GET
Error URI: http://localhost:4097/Service1.svc
There was an error downloading 'http://localhost:4097/Service1.svc'.
The request failed with the error message:--
Could not find a base address that matches scheme net.tcp for the endpoint with binding NetTcpBinding.
Registered base address schemes are [http]
Please Help.
Thanks.
Kunal G
Source: http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/61c11f35-fdca-4a3b-86ba-410099f4d898
modern architecture network security architecture new orleans architecture architecture tour chicago boat enterprise architecture as strategy
No comments:
Post a Comment