0

How do I use the App Pools Crendentials to authenticate a WebRequest?

I have a web site that call a page from itself, but I keep getting 401....

Mesh
  • 6,262
  • 5
  • 34
  • 53

1 Answers1

0

I don't think that is going to work. What type of authentication are you using for this website? You might consider making a mirror page of the one you are requesting, opening up the security for that page, but requiring a token to be passed in the URL. You could store the token in cache before you make the request, and then compare when the request comes in.

Why are you doing this, to print PDFs or something?

Josh Pearce
  • 3,399
  • 1
  • 23
  • 24
  • to render a page as html for a email confirmation form – Mesh Nov 10 '09 at 16:07
  • I have done html emails using a template system like nvelocity http://www.castleproject.org/others/nvelocity/index.html basically, you define an HTML page with placeholders for data, then pass in a dictionary of data to the template engine. It's real simple once you get it set up. Check out this tutorial: http://www.codeproject.com/KB/aspnet/nvelocityaspnet.aspx – Josh Pearce Nov 10 '09 at 16:14
  • i've set the template page to accept anonymous requests - that works. I can lock down the page if needed using the IP filters in IIS, if needed too. – Mesh Nov 11 '09 at 12:53