- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用远程服务器上的 WCF 服务。我可以浏览到该服务(它的位置格式为 http://IntranetServerName:40000/VirtualDirectoryName/ServiceName.svc
)所以我可以很好地浏览到远程位置。
然后我(按照页面的指示)运行 svcutil.exe http://IntranetServerName:40000/VirtualDirectoryName/ServiceName.svc?wsdl
在命令行中。
客户端已生成,但配置文件似乎已将端点从远程位置转换为本地主机,并假定它是命名管道(事实并非如此)。
我认为网络某处存在问题(防火墙等),但与我交谈的网络人员表示他们可以看到流量,这是一个应用程序问题。
所以首先,我想了解是什么原因导致 svcutil 在代理远程服务器时建议使用 netNamedPipeBinding?如果我理解它可能会为我遇到的后续问题提供线索。
我无权访问远程服务器的文件系统。我在 Windows 7 64 位上使用 VS2010。这是配置文件:
<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>
谢谢。
更新
我一直在查看 WSDL,我发现了这个:
<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>
在我看来,它指定命名管道是要使用的绑定(bind)。这听起来合理吗?如果是这样,有人可以建议是什么操作或设置导致将其添加到 WSDL 中吗?
更新 (2)
这是服务的配置:
<?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>
我现在也可以访问托管该服务的服务器。这是 IIS 6.1。
在网站的高级设置中,启用的协议(protocol)设置为“http,net.pipe,net.tcp,net.msmq”。我没想到会在该列表中看到“http”,所以我仍然对为什么 svcutil 只会生成命名管道绑定(bind)感到困惑。我想要的是一个可以远程使用的绑定(bind)。你能看出我应该更改什么以允许这样做吗?
谢谢。
最佳答案
我现在已经弄明白了。
在<services>
在服务配置元素中,我添加了一个新的 endpoint
元素:
<service>
<endpoint address="mex" binding="mexNamedPipeBinding" bindingConfiguration="" name="ServiceNameMexEndPoint" contract="IMetadataExchange" />
<endpoint address="net.pipe://localhost/VirtualDirectoryName/ServiceName.svc" behaviorConfiguration="UnityBehaviorExtension" binding="netNamedPipeBinding" bindingConfiguration="NamedPipeBinding" name="ServiceNameNamedPipeEndPoint" contract="MyDomain.MyApp.Business.Services.Contracts.IServiceNameContract" />
<!-- 20/06/2012 added this to let svcutil benerate a non-named pipe binding START-->
<endpoint address="http://sluat01lonuk.gazpromuk.intra:40000/VirtualDirectoryName/ServiceName.svc" behaviorConfiguration="UnityBehaviorExtension" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IServiceName" name="ServiceNameNamedPipeEndPoint" contract="MyDomain.MyApp.Business.Services.Contracts.IServiceNameContract" />
<!-- 20/06/2012 added this to let svcutil benerate a non-named pipe binding END-->
</service>
svcutil 仅生成命名管道连接的原因是没有公开替代端点。
一旦我对服务进行了此更改,WSDL 就会更新以包含新的端点。然后重新运行 svcutil 导致将 basicHttpBinding 绑定(bind)添加到 output.config。
因此,完整而明确地回答我的问题:当代理远程服务器时,导致 svcutil 建议使用 netNamedPipeBinding 的原因是 <services>
服务配置中的元素仅包含一个 net.pipe endpoint
而不是 http(或者,我猜是 net.tcp)端点。
希望这对某人有帮助。
谢谢。
关于c# - 是什么导致 svcutil 在代理远程服务器时建议使用 netNamedPipeBinding?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11104360/
SQLite、Content provider 和 Shared Preference 之间的所有已知区别。 但我想知道什么时候需要根据情况使用 SQLite 或 Content Provider 或
警告:我正在使用一个我无法完全控制的后端,所以我正在努力解决 Backbone 中的一些注意事项,这些注意事项可能在其他地方更好地解决......不幸的是,我别无选择,只能在这里处理它们! 所以,我的
我一整天都在挣扎。我的预输入搜索表达式与远程 json 数据完美配合。但是当我尝试使用相同的 json 数据作为预取数据时,建议为空。点击第一个标志后,我收到预定义消息“无法找到任何内容...”,结果
我正在制作一个模拟 NHL 选秀彩票的程序,其中屏幕右侧应该有一个 JTextField,并且在左侧绘制弹跳的选秀球。我创建了一个名为 Ball 的类,它实现了 Runnable,并在我的主 Draf
这个问题已经有答案了: How can I calculate a time span in Java and format the output? (18 个回答) 已关闭 9 年前。 这是我的代码
我有一个 ASP.NET Web API 应用程序在我的本地 IIS 实例上运行。 Web 应用程序配置有 CORS。我调用的 Web API 方法类似于: [POST("/API/{foo}/{ba
我将用户输入的时间和日期作为: DatePicker dp = (DatePicker) findViewById(R.id.datePicker); TimePicker tp = (TimePic
放宽“邻居”的标准是否足够,或者是否有其他标准行动可以采取? 最佳答案 如果所有相邻解决方案都是 Tabu,则听起来您的 Tabu 列表的大小太长或您的释放策略太严格。一个好的 Tabu 列表长度是
我正在阅读来自 cppreference 的代码示例: #include #include #include #include template void print_queue(T& q)
我快疯了,我试图理解工具提示的行为,但没有成功。 1. 第一个问题是当我尝试通过插件(按钮 1)在点击事件中使用它时 -> 如果您转到 Fiddle,您会在“内容”内看到该函数' 每次点击都会调用该属
我在功能组件中有以下代码: const [ folder, setFolder ] = useState([]); const folderData = useContext(FolderContex
我在使用预签名网址和 AFNetworking 3.0 从 S3 获取图像时遇到问题。我可以使用 NSMutableURLRequest 和 NSURLSession 获取图像,但是当我使用 AFHT
我正在使用 Oracle ojdbc 12 和 Java 8 处理 Oracle UCP 管理器的问题。当 UCP 池启动失败时,我希望关闭它创建的连接。 当池初始化期间遇到 ORA-02391:超过
关闭。此题需要details or clarity 。目前不接受答案。 想要改进这个问题吗?通过 editing this post 添加详细信息并澄清问题. 已关闭 9 年前。 Improve
引用这个plunker: https://plnkr.co/edit/GWsbdDWVvBYNMqyxzlLY?p=preview 我在 styles.css 文件和 src/app.ts 文件中指定
为什么我的条形这么细?我尝试将宽度设置为 1,它们变得非常厚。我不知道还能尝试什么。默认厚度为 0.8,这是应该的样子吗? import matplotlib.pyplot as plt import
当我编写时,查询按预期执行: SELECT id, day2.count - day1.count AS diff FROM day1 NATURAL JOIN day2; 但我真正想要的是右连接。当
我有以下时间数据: 0 08/01/16 13:07:46,335437 1 18/02/16 08:40:40,565575 2 14/01/16 22:2
一些背景知识 -我的 NodeJS 服务器在端口 3001 上运行,我的 React 应用程序在端口 3000 上运行。我在 React 应用程序 package.json 中设置了一个代理来代理对端
我面临着一个愚蠢的问题。我试图在我的 Angular 应用程序中延迟加载我的图像,我已经尝试过这个2: 但是他们都设置了 src attr 而不是 data-src,我在这里遗漏了什么吗?保留 d
我是一名优秀的程序员,十分优秀!