wcf service working with 'GET' and 500 error with 'POST'
I have a wcf service that it's working well if i am using get but when i use post it's showing
System.ServiceModel.ServiceActivationException status 500
any ideas whats the error??
here is the code
function Login(e) {
debugger;
e.preventDefault();
//getting mail
var loginmail =
$("[id$='txtLoginEmail']").val();
//getting password
var loginpassword =
$("[id$='txtLoginPassword']").val();
//getting remember me checkbox
var checked =
($("[id$='chkRememberme']").is(':checked'));
var proxy = new _AppProxy('MemberService/Login', '', 'xml', 'POST', '', { mail: loginmail, password:
loginpassword, rememberMe: checked });
proxy.Invoke();
};
[OperationContract]
[WebInvoke(ResponseFormat =
WebMessageFormat.Xml,Method="POST")]
public string Login(string mail , string password ,
bool rememberMe)
{
}
<system.serviceModel>
<standardEndpoints>
<webHttpEndpoint>
<standardEndpoint
name=""
helpEnabled="true"
automaticFormatSelectionEnabled="true" />
</webHttpEndpoint>
</standardEndpoints>
serviceHostingEnvironment
aspNetCompatibilityEnabled="true"
multipleSiteBind开发者_开发知识库ingsEnabled="true" >
</serviceHostingEnvironment>
</system.serviceModel>
Can be that you miss the .svc ending in your URI to the WebService. If MemberService is the name of the service and Login is the name of the Method,
MemberService.svc/Login
精彩评论