C
Chuck
repost, no ms response
I'm using Selenium to test a web application.
I need to create a Forms Authentication Cookie and let Selenium load it into
the browser instance.
I'm having a problem because my nUnit class does not have access to the
web.config file.
The website uses MachineKey valdationKey and decryptionKey.
I know these values and can put them in the nUnit class.
However, I usually create Forms Cookies by doing
tkt = new FormsAuthenticationTicket(1, txtNewIdentity.Text, DateTime.Now,
DateTime.Now.AddMinutes(TimeOut_Get()), bPersistent,
HttpContext.Current.Request.UserHostAddress);
CookieValue= FormsAuthentication.Encrypt(tkt)
I don't believe the cookie will properly encrypted because when I run
..Encrypt(tkt), it won't find the encryption key to use.
Any way to manually make the forms authentication cookie without assuming
the .net methods have access to the web.config file?
I'm using Selenium to test a web application.
I need to create a Forms Authentication Cookie and let Selenium load it into
the browser instance.
I'm having a problem because my nUnit class does not have access to the
web.config file.
The website uses MachineKey valdationKey and decryptionKey.
I know these values and can put them in the nUnit class.
However, I usually create Forms Cookies by doing
tkt = new FormsAuthenticationTicket(1, txtNewIdentity.Text, DateTime.Now,
DateTime.Now.AddMinutes(TimeOut_Get()), bPersistent,
HttpContext.Current.Request.UserHostAddress);
CookieValue= FormsAuthentication.Encrypt(tkt)
I don't believe the cookie will properly encrypted because when I run
..Encrypt(tkt), it won't find the encryption key to use.
Any way to manually make the forms authentication cookie without assuming
the .net methods have access to the web.config file?