0
我剛剛使用WCF和Azure,但是我有一個在Visual Studio中調試時可以正常工作的WCF Web服務。我將啓動項目設置爲Azure,並且我嘗試了與該服務相關的任何URL的404錯誤。WCF Web服務在Azure中給出404錯誤
這裏是什麼,我認爲是初步認識代碼: 從IWebService.cs
[OperationContract]
[WebGet(UriTemplate = "GetData/Xml?value={value}", ResponseFormat=WebMessageFormat.Xml)]
string GetDataXml(string value);
,並從Web.config文件:
<system.serviceModel>
<services>
<service name="WebService" behaviorConfiguration="WebServiceBehavior">
<!-- Service Endpoints -->
<endpoint address="" binding="webHttpBinding" contract="IWebService" behaviorConfiguration="WebEndpointBehavior"></endpoint>
<endpoint address="ws" binding="wsHttpBinding" contract="IWebService"/>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="WebServiceBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="WebEndpointBehavior">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>
我試圖改變的結合 'basicHttpBinding的',但那沒有運氣。
在此先感謝您的幫助!
您是否在Azure Web角色上運行過此功能? – hoetz 2012-08-03 06:14:42