求助:IIS中部署WCF,生成的WSDL中怎么把“计算机名”改成IP==找到一个解决办法
环境:win2003 IIS6 VS2008
求助:
如图:
有朋友遇到过这个问题吗?还是说这个不是问题?
先 谢谢了!
补充配置文件:
代码
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="Web.Services.TestBehavior">
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata httpGetEnabled="true" />
<serviceAuthorization principalPermissionMode="None" />
<serviceCredentials>
<userNameAuthentication userNamePasswordValidationMode="Custom"
customUserNamePasswordValidatorType="WCF.CustomUserPassword, WCF" />
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="Web.Services.TestBehavior" name="Web.Services.Test">
<endpoint address="" binding="wsHttpBinding" contract="Web.Services.ITest">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<bindings>
<wsHttpBinding>
<binding name="TranAndUsername">
<security mode="Message">
<!--<transport clientCredentialType="None"/>
<transport clientCredentialType="Windows" protectionLevel="EncryptAndSign"/>-->
<transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
</system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="Web.Services.TestBehavior">
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata httpGetEnabled="true" />
<serviceAuthorization principalPermissionMode="None" />
<serviceCredentials>
<userNameAuthentication userNamePasswordValidationMode="Custom"
customUserNamePasswordValidatorType="WCF.CustomUserPassword, WCF" />
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="Web.Services.TestBehavior" name="Web.Services.Test">
<endpoint address="" binding="wsHttpBinding" contract="Web.Services.ITest">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<bindings>
<wsHttpBinding>
<binding name="TranAndUsername">
<security mode="Message">
<!--<transport clientCredentialType="None"/>
<transport clientCredentialType="Windows" protectionLevel="EncryptAndSign"/>-->
<transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
</system.serviceModel>
目前解决办法:
修改IIS的配置:
如图:
解决后的wsdl:
我们一直在努力!Simple is best!