无法使我的wcf web.config正常工作
我是wcf的noob,我需要一些帮助 老实说,我对web.config文件了解不多,需要接受的内容很多 我有一个Service.svc.cs和一个接口IService.cs,我想建立一个登录系统,用户可以从客户端登录无法使我的wcf web.config正常工作,wcf,session,web-config,Wcf,Session,Web Config,我是wcf的noob,我需要一些帮助 老实说,我对web.config文件了解不多,需要接受的内容很多 我有一个Service.svc.cs和一个接口IService.cs,我想建立一个登录系统,用户可以从客户端登录 //Service Contract [ServiceContract] public class ItheService { [OperationContract] string Login(string email, string password); } /
//Service Contract
[ServiceContract]
public class ItheService
{
[OperationContract]
string Login(string email, string password);
}
//interface
public class TheService : ItheService
{
public string Login(string email, string password)
{
//some code
return "";
}
}
我读了很多页面,尝试了一些不同的web.config变体,但在需要会话的合同方面出现了错误
我知道我需要行为和服务设置,但我不知道该使用什么
有人能解释一下我需要在web.config文件中输入什么吗
我本来有这个web.config,但我知道它错了
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<behaviors>
<endpointBehaviors>
<behavior name="httpBehavior">
<webHttp />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
<services>
<service name="TheService.theService">
<endpoint address=""
behaviorConfiguration="httpBehavior"
binding="webHttpBinding"
contract="TheService.ItheService" />
</service>
</services>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
共享您的配置文件。您的配置文件通常包含为您服务的ABC。A-地址,b-绑定,C-合同。通常,运行yout服务的配置应该非常简单。如果您可以发布配置,我们将能够帮助您使用什么作为客户端?我想连接多种类型的客户端。例如,C#winform和android。发布您收到的错误