problem in generating proxy file for the typed dataset using Svcutil.exe with Jun CTP

While trying to generate a proxy file for the typed dataset using Svcutil.exe I am getting the following error:

WS-Metadata Exchange Error URI: net.tcp://localhost/servicemodelsamples/service

Metadata contains a reference that cannot be resolved: 'net.tcp://localhost/servicemodelsamples/service'.

The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:04:59.9843748'.

An existing connection was forcibly closed by the remote host

I was getting the same error with the Feb CTP but I did not find any problem with Jan and May CTP.

Any one has any idea?

[1107 byte] By [DileepAgarwal] at [2007-12-22]
# 1
Any Update on this post?
DileepAgarwal at 2007-8-30 > top of Msdn Tech,Visual Studio Orcas,Windows Communication Foundation (Indigo)...
# 2

I assume you're using the June CTP right now correct?

If so, there's been a bit of a change with regards to the way we expose the metadata. You will need to manually add your own metadata endpoint. So in config it would be something like this:

<services>
<service behaviorConfiguration="InfoBehavior" name="Server.MyTest">
<endpoint address="
http://localhost:8000/MyTest/" binding="wsHttpBinding"
bindingConfiguration="InfoBinding" name="MyTest" contract="Server.ITest">
<identity>
<certificateReference x509FindType="FindBySubjectName" findValue="Fabrikam" />
</identity>
</endpoint>
<endpoint address="
http://localhost:8000/MyTest/mex"
binding="mexHttpBinding"
contract="IMetadataExchange"/>

</service>
</services>

<behaviors>
<serviceBehaviors>
<behavior name ="InfoBehavior">
<serviceCredentials>
<serviceCertificate findValue="Sauron" x509FindType="FindBySubjectName"/>
</serviceCredentials>
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>

Or programatically:

static void ConfigureMexEndpoint(ServiceHost serviceHost)
{
ServiceMetadataBehavior metadata = new ServiceMetadataBehavior();
serviceHost.Description.Behaviors.Add(metadata);
foreach (Uri baseAddress in serviceHost.BaseAddresses)
{
if ("http".Equals(baseAddress.Scheme))
{
serviceHost.AddServiceEndpoint(ServiceMetadataBehavior.MexContractName, MetadataExchangeBindings.CreateMexHttpBinding(), "mex");
}
else if ("https".Equals(baseAddress.Scheme))
{
serviceHost.AddServiceEndpoint(ServiceMetadataBehavior.MexContractName, MetadataExchangeBindings.CreateMexHttpsBinding(), "mex");
}
else if ("net.tcp".Equals(baseAddress.Scheme))
{
serviceHost.AddServiceEndpoint(ServiceMetadataBehavior.MexContractName, MetadataExchangeBindings.CreateMexTcpBinding(), "mex");
}
}
}

I'm just guessing but that may the issue.

ScottMason-MSFT at 2007-8-30 > top of Msdn Tech,Visual Studio Orcas,Windows Communication Foundation (Indigo)...
# 3

Also, if that isn't the problem, please add tracing to the server and see if there's anything that gives an idea of what's going on.

Thanks!

Scott

ScottMason-MSFT at 2007-8-30 > top of Msdn Tech,Visual Studio Orcas,Windows Communication Foundation (Indigo)...

Visual Studio Orcas

Site Classified