WCF not using computer name instead of domain name when viewing MyService.svc?wsdl

后端 未结 13 1365
迷失自我
迷失自我 2020-12-13 02:31

My WCF serice seems to be using the computer-name instead of the domain name. When I view the MyService.svc?wsdl link it is showing my computer name.

Wh

13条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-13 03:00

    Thanks to Kanasz Robert. Steps that solved my problem - 1.Produce the wsdl in the browser and save to file (by hitting .svc?wsdl from browser) save as .wsdl

    1. Produce the xsd files by hitting url from wsdl (xsd=xsd0, etc), and save to file from browser, save as .wsdl

    2. replace all machine name references from wsdl with domain name (or ip address) and change xsd references and save AND replace all machine name references from xsd files with domain name (or ip address) make sure to name xsd file with .xsd extension (ie, name0.xsd, name1.xsd, name2.xsd)

    3. copy wsdl and xsd file(s) to virtual directory add to your web.config following lines:

    
          
            
              
              
            
          
        

提交回复
热议问题