views:

87

answers:

1

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....

A: 

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
to render a page as html for a email confirmation form
Adrian
I have done html emails using a template system like nvelocityhttp://www.castleproject.org/others/nvelocity/index.htmlbasically, 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
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.
Adrian