zoukankan      html  css  js  c++  java
  • 求助: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>

    目前解决办法:

    修改IIS的配置:

    如图:

     

     解决后的wsdl:

     

    我们一直在努力!Simple is best!

  • 相关阅读:
    【MVC】过滤器
    【C#】开发可以可视化操作的windows服务
    【JS】导出table到excel,同时兼容FF和IE
    【.Net】文件并发(日志处理)--队列--Redis+Log4Net
    【.Net】从.NET平台调用Win32 API
    『录』最全前端资源汇集
    $.ajax()方法详解
    mvc的视图中显示DataTable的方法
    C# 对XML基本操作总结
    Ninject简介
  • 原文地址:https://www.cnblogs.com/webhuahua/p/1809338.html
Copyright © 2011-2022 走看看