我露出一個Web服務使用NET的ScriptManager的,如JavaScript我的客戶端如下:如何在https:to javascript下運行.Net Web服務服務?
<asp:ScriptManager ID="scriptMgr" runat="server">
<services>
<asp:servicereference Path="RmUiControlDataSVC.svc" />
</services>
</asp:ScriptManager>
在我的javascript,我可以這樣調用:
var service = new RmUiControlDataSVC();
當我運行這個我的本地服務器,它工作正常,我可以運行其中的方法。當我使用http:
(在我的網站http://myserver/msftqa/RmMain.aspx上工作)遠程部署並連接到我的站點時,它也會運行。但是,當我嘗試使用https:
(https://mysite.com/msftqa/)連接到相同的應用程序時出現問題RmMain.aspx)。現在,當我試圖訪問該服務的方法,我得到一個
503服務不可用
通過Firebug的檢查顯示,我的SVC可以嘗試使用http:
代替https:
結合,是這不是能夠找到服務。這裏是web.config中
<service name="Company.App.RM.RmUiControlDataSVC">
<endpoint address="" behaviorConfiguration="Company.App.RM.RmUiControlDataAspNetAjaxBehavior"
binding="webHttpBinding" contract="Company.App.RM.RmUiControlDataSVC" />
</service>
的培訓相關部分有沒有一種方式,我可以告訴服務通過HTTPS連接時使用https:
但仍然有它的工作當我連接使用http:
?
這看起來正是我一直在尋找。謝謝 – Rondel 2012-04-29 21:33:30