显示wsdl地址的站点不正确

显示wsdl地址的站点不正确

本文介绍了显示wsdl地址的站点不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个具有两个服务的自托管应用程序.一种是在本地使用的,另一种是需要从外部访问的.问题是,当我访问显示wsdl网址的网站时,它总是 http://localhost:84/?wsdl ,只要我不将其部署到真实服务器上,它就可以工作.我已经能够通过设置getHttpUrl = http://www.domain.com 来更改网址,但是 然后,当我尝试单击wsdl链接时,我仅返回显示wsdl网址的页面.

I have created a self hosting application which have two services. One is used locally and one is needed to be accessed from the outside. The problem is that when I access the web site which shows the url to the wsdl it's alwayshttp://localhost:84/?wsdl and it works as long as I do not deploy it to the real server. I have been able to change the url by setting the getHttpUrl=http://www.domain.com but when I then try to click on the wsdl link I just get back to the page showing the url to the wsdl.

那么,如何正确更改网址?我尝试更改地址和listenUri失败.可能也很高兴知道我们在顶部提供了一个路由服务,该服务将domain.com/api指向端口84.

So how do I change the url correctly? I have tried changing the address and the listenUri without success. Might also be good to know that we have a routing service on top that points domain.com/api to port 84.

      <wsHttpBinding>
        <binding name="wsCustom">
          <security mode="Message">
            <message clientCredentialType="UserName" />
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>
    <services>
      <service name="QuestionBackend.Services.BuilderService" behaviorConfiguration="surveyBuilderBehavior">
        <endpoint contract="QuestionBackend.Services.IBuilderService" address="BuilderService" binding="wsHttpBinding" bindingConfiguration="wsCustom" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8888" />
          </baseAddresses>
        </host>
      </service>

      <service name="QuestionBackend.Services.MessageService" behaviorConfiguration="wcfBehavior">
        <endpoint contract="QuestionBackend.Services.IMessageService" address="MessageService" binding="wsHttpBinding" bindingConfiguration="wsCustom" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:84" />
          </baseAddresses>
        </host>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="serviceBehavior">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
        <behavior name="surveyBuilderBehavior">
          <serviceMetadata httpGetEnabled="true" />
          <serviceCredentials>
            <userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="QuestionBackend.Services.Validation.SurveyBuilderValidator, QuestionBackend" />
            <serviceCertificate findValue="localhost"
                                x509FindType="FindBySubjectName"
                                storeLocation="LocalMachine"
                                storeName="My" />

          </serviceCredentials>
        </behavior>
        <behavior name="wcfBehavior">
          <serviceMetadata httpGetEnabled="true"/>
	  <serviceDebug includeExceptionDetailInFaults="true" />
          <serviceCredentials>
            <userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="QuestionBackend.Services.Validation.WcfValidator, QuestionBackend" />
            <serviceCertificate findValue="localhost"
                                x509FindType="FindBySubjectName"
                                storeLocation="LocalMachine"
                                storeName="My" />

          </serviceCredentials>
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

推荐答案

http://support.microsoft.com/KB/971842


这篇关于显示wsdl地址的站点不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-25 00:34