I am trying to consume a WCF service on a remote server. I can browse to the service (which has a location in the format http://IntranetServerName:40000/VirtualDirectoryName/ServiceName.svc ) so I can browse to the remote location fine.
I then (as instructed by the page) run
svcutil.exe http://IntranetServerName:40000/VirtualDirectoryName/ServiceName.svc?wsdl in the command line.
A client is generated but the config file seems to have translated the endpoint from a remote location to localhost and assumed that it is a named pipe (which it isn’t).
I think that there is a problem somewhere in the network (firewall, etc) but the network people I speak to say that they can see the traffic and it is an application issue.
So first of all, I want to understand what causes svcutil to suggest a netNamedPipeBinding when proxying a remote server? If I understand that it might give a clue as to the subsequent issues I am having.
I don’t have access to the remote server’s file system. I am using VS2010 on Windows 7 64-bit. Here is the config file:
<configuration>
<system.serviceModel>
<bindings>
<netNamedPipeBinding>
<binding name="ServiceNameNamedPipeEndPoint" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288"
maxBufferSize="65536" maxConnections="10" maxReceivedMessageSize="65536">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport protectionLevel="EncryptAndSign" />
</security>
</binding>
</netNamedPipeBinding>
</bindings>
<client>
<endpoint address="net.pipe://localhost/VirtualDirectoryName/ServiceName.svc"
binding="netNamedPipeBinding" bindingConfiguration="ServiceNameNamedPipeEndPoint"
contract="ServiceNameContract" name="ServiceNameNamedPipeEndPoint" />
</client>
</system.serviceModel>
</configuration>
Thanks.
UPDATE
I’ve been looking at the WSDL and I found this:
<wsdl:service name="ServiceName">
<wsdl:port name="ServiceNameNamedPipeEndPoint" binding="i0:ServiceNameNamedPipeEndPoint">
<soap12:address location="net.pipe://localhost/VirtualDirectoryName/ServiceName.svc"/>
<wsa10:EndpointReference>
<wsa10:Address>
net.pipe://localhost/VirtualDirectoryName/ServiceName.svc
</wsa10:Address>
</wsa10:EndpointReference>
</wsdl:port>
</wsdl:service>
which seems to me to specify that Named Pipes is the binding to be used. Does this sound plausible? If so, can someone suggest what action or setting has caused this to be added to the WSDL?
UPDATE (2)
Here is the service’s config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<appSettings>
<add key="Logging" value="True" />
<add key="LogPath" value="c:\Temp\" />
</appSettings>
<connectionStrings>
<add name="MyAppConnectionString" connectionString="Data Source=ReportingServerName\MyApp_UAT;Initial Catalog=MyApp;Integrated Security=True" providerName="System.Data.SqlClient" />
</connectionStrings>
<system.serviceModel>
<extensions>
<behaviorExtensions>
<add name="UnityBehaviorExtension" type="MyDomain.MyApp.Business.Services.Implementations.UnityEndPointBehaviour, MyDomain.MyApp.Business.Services.Libs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cf929a8c65660387" />
</behaviorExtensions>
</extensions>
<bindings>
<netNamedPipeBinding>
<binding name="NamedPipeBinding" openTimeout="00:05:00" sendTimeout="00:05:00" receiveTimeout="02:00:00">
<security mode="None">
<transport protectionLevel="None" />
</security>
</binding>
</netNamedPipeBinding>
<netTcpBinding>
<binding name="NetTcpBinding_MyReportsService" closeTimeout="00:05:00" openTimeout="00:05:00" receiveTimeout="00:10:00" sendTimeout="00:05:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="524288" maxBufferSize="6553600" maxConnections="10" maxReceivedMessageSize="6553600">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
<security mode="None">
<transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
<message clientCredentialType="Windows" />
</security>
</binding>
</netTcpBinding>
<basicHttpBinding>
<binding name="BasicHttpBinding_IReportGeneratorService" closeTimeout="00:05:00" openTimeout="00:05:00" receiveTimeout="00:10:00" sendTimeout="00:05: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="">
<extendedProtectionPolicy policyEnforcement="Never" />
</transport>
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
<binding name="BasicHttpBinding_PackageTriggerServiceContract" closeTimeout="00:05:00" openTimeout="00:05:00" receiveTimeout="00:10:00" sendTimeout="00:05: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="">
<extendedProtectionPolicy policyEnforcement="Never" />
</transport>
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
<wsHttpBinding>
<binding name="WSHttpBinding_IReportGeneratorService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
<security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None" realm="">
<extendedProtectionPolicy policyEnforcement="Never" />
</transport>
<message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" establishSecurityContext="true" />
</security>
</binding>
<binding name="MetadataExchangeHttpBinding_IReportGeneratorService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
<security mode="None">
<transport clientCredentialType="Windows" proxyCredentialType="None" realm="">
<extendedProtectionPolicy policyEnforcement="Never" />
</transport>
<message clientCredentialType="Windows" negotiateServiceCredential="true" establishSecurityContext="true" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://IntranetServerName:41000/MyDomain.MyApp.Reports.Services.WebHost/MyDomain.MyApp.Reports.Services.Hosts.ReportGeneratorServiceHost.svc/mex" binding="wsHttpBinding" bindingConfiguration="MetadataExchangeHttpBinding_IReportGeneratorService" contract="SvcReference.IReportGeneratorService" name="MetadataExchangeHttpBinding_IReportGeneratorService" />
<endpoint address="http://IntranetServerName:41000/MyDomain.MyApp.Reports.Services.WebHost/MyDomain.MyApp.Reports.Services.Hosts.ReportGeneratorServiceHost.svc/basic" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IReportGeneratorService" contract="SvcReference.IReportGeneratorService" name="BasicHttpBinding_IReportGeneratorService" />
<endpoint address="http://ReportingServerName:42500/MyDomain.MyApp.Integration.Services.PackageTriggerService" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_PackageTriggerServiceContract" contract="PackageTriggerService.PackageTriggerServiceContract" name="BasicHttpBinding_PackageTriggerServiceContract" />
</client>
<behaviors>
<endpointBehaviors>
<behavior name="UnityBehaviorExtension">
<UnityBehaviorExtension />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="MyDomain.MyApp.Business.Services.Implementations.REPS_Behavior">
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata httpGetEnabled="true" />
</behavior>
<behavior name="MyDomain.MyApp.Business.Services.Implementations.SRefS_Behavior">
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata httpGetEnabled="true" />
</behavior>
<behavior name="MyDomain.MyApp.Business.Services.Implementations.MyReportsInterfaceService_behaviour">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
<behavior name="MyDomain.MyApp.Business.Services.Implementations.DFS_Behavior">
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata httpGetEnabled="true" />
</behavior>
<behavior name="MyDomain.MyApp.Business.Services.Implementations.ServiceName_Behavior">
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata httpGetEnabled="true" />
</behavior>
<behavior name="MyDomain.MyApp.Business.Services.Implementation.FCS_Behaviour">
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="false" />
</behavior>
<behavior name="MyDomain.MyApp.Business.Services.Implementation.FCS2_Behaviour">
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="false" />
</behavior>
<behavior name="MyDomain.MyApp.Business.Services.Implementations.BIS_Behavior">
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="false" />
</behavior>
<behavior name="MyDomain.MyApp.Business.Services.Implementations.CS_Behavior">
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata />
</behavior>
<behavior name="MyDomain.MyApp.Business.Services.Implementations.W2CS_Behavior">
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="false" />
</behavior>
<behavior name="MyDomain.MyApp.Business.Services.Implementations.TrS_Behavior">
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="MyDomain.MyApp.Business.Services.Implementations.REPS_Behavior" name="MyDomain.MyApp.Business.Services.Implementations.REPS">
<clear />
<endpoint address="mex" binding="mexNamedPipeBinding" bindingConfiguration="" name="REPSMexEndPoint" contract="IMetadataExchange" listenUriMode="Explicit" />
<endpoint address="net.pipe://localhost/MyDomain.MyApp.Business.Services.WebHost/REPS.svc" behaviorConfiguration="UnityBehaviorExtension" binding="netNamedPipeBinding" bindingConfiguration="NamedPipeBinding" name="REPSNamedPipeEndPoint" contract="MyDomain.MyApp.Business.Services.Contracts.IREPSContract" listenUriMode="Explicit" />
</service>
<service behaviorConfiguration="MyDomain.MyApp.Business.Services.Implementations.W2CS_Behavior" name="MyDomain.MyApp.Business.Services.Implementations.W2CS">
<clear />
<endpoint address="mex" binding="mexNamedPipeBinding" bindingConfiguration="" name="W2CSMexEndPoint" contract="IMetadataExchange" listenUriMode="Explicit" />
<endpoint address="net.pipe://localhost/MyDomain.MyApp.Business.Services.WebHost/W2CS.svc" behaviorConfiguration="UnityBehaviorExtension" binding="netNamedPipeBinding" bindingConfiguration="NamedPipeBinding" name="W2CSNamedPipeEndPoint" contract="MyDomain.MyApp.Business.Services.Contracts.IW2CSContract" listenUriMode="Explicit" />
</service>
<service behaviorConfiguration="MyDomain.MyApp.Business.Services.Implementations.SRefS_Behavior" name="MyDomain.MyApp.Business.Services.Implementations.SRefS">
<endpoint address="mex" binding="mexNamedPipeBinding" bindingConfiguration="" name="SRefSMexEndPoint" contract="IMetadataExchange" />
<endpoint address="net.pipe://localhost/MyDomain.MyApp.Business.Services.WebHost/SRefS.svc" behaviorConfiguration="UnityBehaviorExtension" binding="netNamedPipeBinding" bindingConfiguration="NamedPipeBinding" name="SRefSNamedPipeEndPoint" contract="MyDomain.MyApp.Business.Services.Contracts.ISRefSContract" listenUriMode="Explicit" />
</service>
<service behaviorConfiguration="MyDomain.MyApp.Business.Services.Implementations.MyReportsInterfaceService_behaviour" name="MyDomain.MyApp.Business.Services.Implementations.MyReportsService">
<endpoint address="" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_MyReportsService" name="MyReportsServiceNetTcpEndPoint" contract="MyDomain.MyApp.Business.Services.Contracts.IMyReportsServiceContract" />
<endpoint address="mex" binding="mexTcpBinding" bindingConfiguration="" name="MyReportsServiceMexTcpBindingEndpoint" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:50000/" />
</baseAddresses>
</host>
</service>
<service behaviorConfiguration="MyDomain.MyApp.Business.Services.Implementations.DFS_Behavior" name="MyDomain.MyApp.Business.Services.Implementations.DFS">
<endpoint address="mex" binding="mexNamedPipeBinding" bindingConfiguration="" name="DFSMexEndPoint" contract="IMetadataExchange" />
<endpoint address="net.pipe://localhost/MyDomain.MyApp.Business.Services.WebHost/DFS.svc" behaviorConfiguration="UnityBehaviorExtension" binding="netNamedPipeBinding" bindingConfiguration="NamedPipeBinding" name="DFSNamedPipeEndPoint" contract="MyDomain.MyApp.Business.Services.Contracts.IDFSContract" />
</service>
<service behaviorConfiguration="MyDomain.MyApp.Business.Services.Implementations.ServiceName_Behavior" name="MyDomain.MyApp.Business.Services.Implementations.ServiceName">
<endpoint address="mex" binding="mexNamedPipeBinding" bindingConfiguration="" name="ServiceNameMexEndPoint" contract="IMetadataExchange" />
<endpoint address="net.pipe://localhost/MyDomain.MyApp.Business.Services.WebHost/ServiceName.svc" behaviorConfiguration="UnityBehaviorExtension" binding="netNamedPipeBinding" bindingConfiguration="NamedPipeBinding" name="ServiceNameNamedPipeEndPoint" contract="MyDomain.MyApp.Business.Services.Contracts.IServiceNameContract" />
</service>
<service behaviorConfiguration="MyDomain.MyApp.Business.Services.Implementation.FCS_Behaviour" name="MyDomain.MyApp.Business.Services.Implementations.FCS">
<endpoint address="net.pipe://localhost/MyDomain.MyApp.Business.Services.WebHost/FCS.svc" behaviorConfiguration="UnityBehaviorExtension" binding="netNamedPipeBinding" bindingConfiguration="NamedPipeBinding" name="FCSNamedPipeEndPoint" contract="MyDomain.MyApp.Business.Services.Contracts.IFCSContract" />
<endpoint address="mex" binding="mexNamedPipeBinding" bindingConfiguration="" name="FixedContractMexEndPoint" contract="IMetadataExchange" />
</service>
<service behaviorConfiguration="MyDomain.MyApp.Business.Services.Implementation.FCS2_Behaviour" name="MyDomain.MyApp.Business.Services.Implementations.FCS2">
<endpoint address="net.pipe://localhost/MyDomain.MyApp.Business.Services.WebHost/FCS2.svc" behaviorConfiguration="UnityBehaviorExtension" binding="netNamedPipeBinding" bindingConfiguration="NamedPipeBinding" name="FCS2NamedPipeEndPoint" contract="MyDomain.MyApp.Business.Services.Contracts.IFCS2Contract" />
<endpoint address="mex" binding="mexNamedPipeBinding" bindingConfiguration="" name="FlexContractMexEndPoint" contract="IMetadataExchange" />
</service>
<service behaviorConfiguration="MyDomain.MyApp.Business.Services.Implementations.BIS_Behavior" name="MyDomain.MyApp.Business.Services.Implementations.BIS">
<endpoint address="net.pipe://localhost/MyDomain.MyApp.Business.Services.WebHost/BIS.svc" behaviorConfiguration="UnityBehaviorExtension" binding="netNamedPipeBinding" bindingConfiguration="NamedPipeBinding" name="BISNamedPipeEndPoint" contract="MyDomain.MyApp.Business.Services.Contracts.IBISContract" />
<endpoint address="mex" binding="mexNamedPipeBinding" bindingConfiguration="" name="BISMexEndPoint" contract="IMetadataExchange" />
</service>
<service behaviorConfiguration="MyDomain.MyApp.Business.Services.Implementations.CS_Behavior" name="MyDomain.MyApp.Business.Services.Implementations.CS">
<endpoint address="net.pipe://localhost/MyDomain.MyApp.Business.Services.WebHost/CS.svc" behaviorConfiguration="UnityBehaviorExtension" binding="netNamedPipeBinding" bindingConfiguration="NamedPipeBinding" name="CSNamedPipeEndPoint" contract="MyDomain.MyApp.Business.Services.Contracts.ICSContract" />
<endpoint address="mex" binding="mexNamedPipeBinding" bindingConfiguration="" name="CSMexEndPoint" contract="IMetadataExchange" />
</service>
<service behaviorConfiguration="MyDomain.MyApp.Business.Services.Implementations.TrS_Behavior" name="MyDomain.MyApp.Business.Services.Implementations.TrS">
<endpoint address="net.pipe://localhost/MyDomain.MyApp.Business.Services.WebHost/TrS.svc" behaviorConfiguration="UnityBehaviorExtension" binding="netNamedPipeBinding" bindingConfiguration="NamedPipeBinding" name="TrSNamedPipeEndPoint" contract="MyDomain.MyApp.Business.Services.Contracts.ContractA" />
<endpoint address="mex" binding="mexNamedPipeBinding" bindingConfiguration="" name="TrSMexEndPoint" contract="IMetadataExchange" />
</service>
</services>
</system.serviceModel>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
<providerOption name="CompilerVersion" value="v3.5" />
<providerOption name="WarnAsError" value="false" />
</compiler>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
<providerOption name="CompilerVersion" value="v3.5" />
<providerOption name="OptionInfer" value="true" />
<providerOption name="WarnAsError" value="false" />
</compiler>
</compilers>
</system.codedom>
<system.web>
<compilation debug="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
</assemblies>
</compilation>
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</controls>
</pages>
<httpHandlers>
<remove verb="*" path="*.asmx" />
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</httpModules>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules>
<remove name="ScriptModule" />
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated" />
<remove name="ScriptHandlerFactory" />
<remove name="ScriptHandlerFactoryAppServices" />
<remove name="ScriptResource" />
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</handlers>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.diagnostics>
<sources>
<source name="System.ServiceModel" switchValue="Information, ActivityTracing, Verbose" propagateActivity="true">
<listeners>
<add name="traceListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData="c:\log\Traces.svclog" />
</listeners>
</source>
</sources>
</system.diagnostics>
</configuration>
I now also have access to the server hosting the service. It’s IIS 6.1.
In the website’s Advanced Settings the Enabled Protocols are set to “http,net.pipe,net.tcp,net.msmq”. I didn’t expect to see “http” in that list so I’m still confused as to why svcutil will only generate a named pipe binding. What I want is a binding that I can use remotely. Can you see what I should change to permit this?
Thanks.
I have got this out figured out now.
In the
<services>element in the service config, I added a newendpointelement:The reason that svcutil was only generating a Named Pipes connection was that there was no alternative endpoint exposed.
Once I made this change to service, the WSDL was updated to hold the new endpoint. Then re-running svcutil resulted in a basicHttpBinding binding being added to output.config.
So to answer my question fully and explicitly:
What causes svcutil to suggest a netNamedPipeBinding when proxying a remote server is when the
<services>element in the service’s config contains only a net.pipeendpointand not a http (or, I guess net.tcp) endpoint.Hope this helps someone.
Thanks.