在IIS中部署此服務有什麼特別的要求,現在我將該網站從Visual Studio發佈到文件系統,然後在IIS中創建應用程序。從文件系統部署WCF Web服務到IIS
我可以瀏覽到我的Web瀏覽器中的.svc文件,但我無法調用任何操作。
這是在Web.config
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="wsHttpBinding" openTimeout="00:10:00" sendTimeout="00:10:00" receiveTimeout="00:10:00"
maxBufferPoolSize="9223372036854775807" maxReceivedMessageSize="9223372036854775807">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="None" />
<reliableSession enabled="true" />
</binding>
</wsHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
<dataContractSerializer />
</behavior>
</serviceBehaviors>
<endpointBehaviors >
<behavior>
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
</behavior>
</endpointBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="ServiceBehavior" name="MerlonWebServiceAPI.MGWS">
<endpoint address="" behaviorConfiguration="" binding="wsHttpBinding" bindingNamespace="http://SingleWSDL/MGWS"
bindingConfiguration="" name="wsHttp" contract="MerlonWebServiceAPI.IService" >
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
這是IService
[ServiceContract(Namespace = "http://SingleWSDL/MGWS")]
public interface IService
{
[OperationContract]
[WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "ActiveCalls")]
List<ActiveCall> GetActiveCalls();
[OperationContract]
[WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "PointStatus")]
List<PointStatus> GetPointStatus();
[OperationContract]
bool Validate(string username, string password);
}
我可以轉儲如果需要感謝的完整WSDL文件事先的任何援助
發佈您的解決方案,並給予鏈接! – Sajeetharan