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!

  • 相关阅读:
    LINQ N~layer!
    CodeSmith 破解和注册
    鼠标划过链接时弹出窗口
    ajax的loading显示在gridview的位置
    Asp.net与SQL一起打包部署安装
    编译apache报错 No recognized SSL/TLS toolkit detected
    ubuntu12.04 卸载和安装mysql
    Ubuntu12.04 英文环境下使用ibus输入中文并自动启动输入法
    Ubuntu11.10 源码编译安装PHP5.3.8 [转]
    debian 下 编译安装 mysql 二进制文件
  • 原文地址:https://www.cnblogs.com/webhuahua/p/1809338.html
Copyright © 2011-2022 走看看