
Untitled
By: a guest on
May 10th, 2012 | syntax:
None | size: 0.82 KB | hits: 16 | expires: Never
Trying to override SoapHeaderAttribute to add Authentication to the attribute
public WebserviceAuthentication currentUser;
[WebMethod(Description="Returns the logged in users credentials")]
[SoapHeader("currentUser")]
public string HelloWorld()
{
var user = AuthenticateUser(currentUser, WebServiceResources.MEDICAREELIGIBILITY_HELLOWORLD);
return string.Format("{0} {1} {2}", user.User.UserName, user.User.ProviderUserKey, user.AccountId);
}
public WebserviceAuthentication currentUser;
public CustomAuthentication user;
[WebMethod(Description="Returns the logged in users credentials")]
[SoapHeaderAuthentication("currentUser")]
public string HelloWorld()
{
return string.Format("{0} {1} {2}", user.User.UserName, user.User.ProviderUserKey, user.AccountId);
}