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!

  • 相关阅读:
    Redis配置文件详解
    linux系统配置Apache虚拟主机实例
    nginx File not found 错误分析与解决方法
    svn配置使用
    linux下svn命令使用大全
    Kendo UI For ASP.NET MVC项目资源
    ReSharper 配置及用法
    SQL判断某列中是否包含中文字符、英文字符、纯数字 (转)
    Visual Studio最好用的快捷键
    19个必须知道的Visual Studio快捷键
  • 原文地址:https://www.cnblogs.com/webhuahua/p/1809338.html
Copyright © 2011-2022 走看看