在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