Andy Murray

Andy Murray

  • NA
  • 4
  • 4.5k

Unable to Authenticate client using self-created token

Aug 18 2011 3:09 AM

Hi,

I have a windows application that contains a web browser control. This app create a HTTPWebRequest (with "Put" method) that post an authentication token into my asp.net server. The server would verify the authenticity of the token in the login.aspx and then redirect the user to the Default.aspx. Unfortunately, FormsAuthentication.RedirectFromLoginPage does not redirect to the Default.aspx. My guess is the HTTPWebrequest doesn't support the redirection back to the browser before it redirected to the Default.aspx. Any ideas how to solve this problem??

The other problem is I need to use the web browser control in the apps to show the Default.aspx.Therefore, I need to write the Default.aspx to the Response.OutputStream and send it back to the windows app.

When the windows app receive the response, it will call the following code to show the Default.aspx:

webBrowser.DocumentStream = Response.GetResponseStream();

Really Appreciate your responses. Thanks