views:

9

answers:

0

We are accessing an ASP.Net web site from a WinForms application via the System.Windows.Forms.WebBrowser object. The web site is configured to use "Forms" mode authentication. On the website, we are currently using the AccountMembershipService and FormsAuthenticationService that is included in the .Net MVC 2 template.

I would like to be able to access the web site using the WebBrowser object without a redirect to the logon page. I want to use the credentials used to open the WinForms application.

What I tried: I have already implemented the BrowserRemotingProxy that Mr. Wesley built here. Stepping through the WebBrowser and proxy code while running shows that the proxy is indeed sending correct credentials. However, I don't know where to look for the credentials being received on the web site.

Am I even on the right path? It has occurred to me that Mr. Wesley's solution is for a different authentication method and that our web site doesn't even have access to those credentials.

What I want: A web site with the following behaviors:

  • If accessed from a browser, redirects to a web form for authentication.
  • If accessed from our WinForms application's embedded WebBrowser, receives credentials used to access the WinForms app and opens the web site without further authentication.
  • Uses the given credentials to provide correct authorization throughout the session.

Thank you for your help,

-colin-