puh, long time ago...
on the client, I have something like this
Code:
Spring.Threading.CallContextStorage ccs = new Spring.Threading.CallContextStorage();
Authentication.AuthenticationSoapHeader ash = (Authentication.AuthenticationSoapHeader)ccs.GetData("authenticationHeader");
if (ash == null)
{
ash = new Authentication.AuthenticationSoapHeader();
}
ash.Login = "clay";
ash.Password = "xxxx";
ccs.SetData("authenticationHeader", ash);
and on the server I read it like this
Code:
Authentication.AuthenticationSoapHeader ash = null;
// WebService environment
if (System.Web.HttpContext.Current != null && System.Web.HttpContext.Current.Items.Contains("AuthenticationSoapHeader"))
{
ash = (Authentication.AuthenticationSoapHeader)System.Web.HttpContext.Current.Items["AuthenticationSoapHeader"];
}
// Local environment
else
{
Spring.Threading.HybridContextStorage ccs = new Spring.Threading.HybridContextStorage();
ash = (Authentication.AuthenticationSoapHeader)ccs.GetData("authenticationHeader");
}
// no Authentication Header
if (ash == null)
{
ash = new AuthenticationSoapHeader();
ash.Login = "unknown";
ash.Password = String.Empty;
}
Hope that helps
Best regards