J
John Straumann
Hello all:
I am trying to call an ASPX page from another ASPX page code-behind file by
using the HTTP Request object. By loading the page and typing:
javascript:alert(resultRender.outerHTML)
in the navigation bar I was able to get the code that calls the page, and I
then pasted that into a static HTML page. This works fine, when I load the
static HTML page in IE it runs the ASPX page and returns the results.
However if I try to call the ASPX page using HTTP and POST, I get an error:
General exception: System.Net.WebException: The remote server returned an
error: (401) Unauthorized.
at System.Net.HttpWebRequest.GetResponse()
at PostSubmitter.PostData(String url, String postData)
at PostSubmitter.Post()
at _Default.Page_Load(Object sender, EventArgs e)
So I tried setting a credential cache with explicit credentials, but that
did not work either.
Can anyone make a suggestion as to how I can track down the error? Since I
can call the page from the static HTML page, I *should* be able to access
the page from an HTTP call, should I not?
Thanks in advance for any and all help.
John.
I am trying to call an ASPX page from another ASPX page code-behind file by
using the HTTP Request object. By loading the page and typing:
javascript:alert(resultRender.outerHTML)
in the navigation bar I was able to get the code that calls the page, and I
then pasted that into a static HTML page. This works fine, when I load the
static HTML page in IE it runs the ASPX page and returns the results.
However if I try to call the ASPX page using HTTP and POST, I get an error:
General exception: System.Net.WebException: The remote server returned an
error: (401) Unauthorized.
at System.Net.HttpWebRequest.GetResponse()
at PostSubmitter.PostData(String url, String postData)
at PostSubmitter.Post()
at _Default.Page_Load(Object sender, EventArgs e)
So I tried setting a credential cache with explicit credentials, but that
did not work either.
Can anyone make a suggestion as to how I can track down the error? Since I
can call the page from the static HTML page, I *should* be able to access
the page from an HTTP call, should I not?
Thanks in advance for any and all help.
John.