开发者

Authenticate into asp.net app from a winforms app

We have 2 applications - 1 windows and 1 web (as开发者_JS百科p.net). Winforms runs on the customer's machine where as the website is hosted within our company. The winforms has a link which opens the web app in a browser window. The web app is secured so the login page is shown. The username and password is the same as the windows app login. How do I auto-login to the web app so the user will not see the login screen?

The web app uses FormsAuthentication.SetAuthCookie to create an encrypted cookie on the user's machine. How do I create the same from the winforms app so the user will not see the login screen?

Thanks.


I've been getting into ASP.net. ASP.net basically writes a web page at run time and serves it thru HTTP. I think that what you could do would be to write some code that saves a web page on the user's machine. The page could contain code to push a cookie into the browser (indicating a successful logon) and then redirect the user to your (presumably) secure web site.

Let us know how it works out for you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜