我的web服務名稱空間出現問題。它在我的電腦上工作正常,但是當我將它上傳到團隊基礎服務器時,它不適用於其他人。Web服務名稱空間
我在web服務(位於「Sentry.SAID」命名空間在其自己的應用程序代碼:
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.ComponentModel
Imports Sentry.SAID.Core
Imports Sentry.SAID.Web
<System.Web.Services.WebService(Namespace:="http://localhost")> _
<System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<ToolboxItem(False)> _
Public Class Powerbeatws
Inherits System.Web.Services.WebService
XML文件中的「Sentry.SAID.Web」應用程序中的「Sentry.SAID」命名空間
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="PowerbeatwsSoap" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="11000000" maxBufferPoolSize="524288"
maxReceivedMessageSize="11000000"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:62862/Powerbeatws.asmx" binding="basicHttpBinding"
bindingConfiguration="PowerbeatwsSoap" contract="PowerbeatSR.PowerbeatwsSoap"
name="PowerbeatwsSoap" />
</client>
</system.serviceModel>
如果我改變端點地址爲localhost/Powerbeatws.asmx,它拋出一個錯誤。任何想法就是我能得到這個使用本地主機上單獨的電腦嗎?
目前到g如果要在任何其他計算機上工作,則必須添加新的服務參考。
假設他們正在他們的本地計算機上運行端口62862上的服務,它應該工作,我會認爲......也許他們的服務端口號代管服務是不同的? – Pepto
每臺機器的服務端口號都會更改。 –
命名空間中的「http:// localhost」與配置文件中的「http:// localhost:62862」無關。他們完全不相關。 –