I am using webService target for auditing users from my winform applications, which is based on massive webService communication with my central server. At first, they login through a webService and if successfull, then create Authentication cookie through FormsAuthentication.SetAuthCookie(userName, false); This is stored in my application in static CookieContainer variable, so every next webService request is done in the same authorized user context and I can get the user in webservice.
What I need is to pass the CookieContainer used by my application to NLog webService "engine" calling my Audit web method, so inside of that, I can get the user for which I am writing the audit.
I could possibly send the user name by the webMethod each time in audit, but this wouldn't be the prefered way. If you have any suggestions or tips, how to achieve this, I would be very thankfull.
If you need any further explanation, please do not hesitate to write.