views:

15

answers:

1

I'm creating some dynamic pictures with the IHttpHandler interface. Then I wont to create a pdf document, where those pictures are included.

But I need to copy the authentication cookie to my new HttpWebRequest object.

How can this be achieved?

I use normal asp.net forms.

+1  A: 

You don't need to copy the Formauthentication cookie and write it again in HttpWebRequest within the HttpHandler if the handler is served from the same domain. The cookie is already available within HttpWebRequest in the handler.

this. __curious_geek
My problem is that my PDF component is making a new request, so I need the cookie. As it is now, my pictures is show as the login box :(
DNRN
Can you please explain your situation with more details ? Cookies on one domain are accessible any path on the domain. Is your PDF handler on some other domain ?
this. __curious_geek
I'm on the same domain. The problem is that my PDF component is reading the site in a new session. So to read the dynamic pictures I need the form authentication cookie. Hopes it makes it a bit more clear?
DNRN