Re: Pass credentials from Win app to Web app



Are you wanting to authenticate the user in the web app against SQL as well?
If so, you might consider using HttpWebRequest to "screen scrape" the login
process to your web app and get a login cookie for the user. Then, try to
find a way to pass that cookie to IE so that it will be provided to the
server by the browser control. That will make it look to the web app on the
server as if the user has already logged in.

I'm not sure if there is a way to pass cookies to use into the browser
control or not, but hopefully there is.

If not, you might need to create some sort of custom login mechanism via a
query string that performs the login and do some of the heavy lifting
yourself to implement the credentials collection and login process in an
HttpModule or Global.asax event handler instead of the normal login form
page.

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"Eric" <Eric@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:AA166328-9A09-43C5-9C0F-1364790FED23@xxxxxxxxxxxxxxxx
I'm using ASP.net Authentication and Authorization (Sql provider against
standard aspnetdb) in my VB.net Windows App to handle users, roles, etc.
This works great.

Within my win app, using the .net web browser control, I want to launch a
url (in our intranet, ASP.Net hosted in IIS6, Win Srv 2003 R2), but I
don't
want the user to have to go through the forms login process again, since
they've already been authenticated by my win app.

Is their a way to pass the user's credentials from the win app to the web
app? Perhaps in some sort of encrypted query string? Is their a method
similar to using windows security with web services, such as:


myProxy.Credentials = System.Net.CredentialCache.DefaultCredentials ?

Thanks!



.



Relevant Pages

  • Authentication Sharing Across Apps
    ... For my part "B" question that I had (Login App was not returning ... authentication to calling app), I found the solution. ... Basically, in both the Login App and Calling App Web.Config, I did ... authenticated connection with SQL server. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: QuickLaunch disappears
    ... I checked the login registery and I am pointing to the corrrect .exe. ... started and App, it crashed and sent a dump to Microsoft (this ... Documents and Settings I see "Lori Csontos" along with a "Lori". ...
    (microsoft.public.windowsxp.general)
  • Re: Session object timout
    ... > specifying your OS and IIS level, but the phenomenon may be caused by the ... > app is running in. ... >> users must go through a login page. ... >> recreating the session object which holds the class I mentioned above. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Permit only one network logon per user
    ... You app is controlling its listener and allowing/disallowing the ... allow a second connection to it using the same creds. ... multiple simultaneous logons with the same username and password ... If user username try to login from a different machine, ...
    (microsoft.public.windows.server.security)
  • Re: Session object timout
    ... Aside from the fact that I kind of like an application timing out for security ... setting of the Application Pool that your ASP.NET app is running in. ... Application pool was introduced in Windows 2003 with IIS 6.0, ... > users must go through a login page. ...
    (microsoft.public.dotnet.framework.aspnet)