We help IT Professionals succeed at work.

Windows Application with ASP.NET Credentials

536 Views
Last Modified: 2013-11-26
Hi guys, Ok I will give my specs first, then I will tell my problem.
I got a web site using VB 2005 (C# and ASP.NET 2.0)
I got a database in SQL 2005. I am using in my web site the ASP.NET Web Site Administration Tool for the Secured and Encrypted Credentials.

NOW, I am creating a window application Form ok. In that application, I did a form for a Login. But I need that login to correspond with the Same credentials as the web site in the database. My problem is I dont know what to write in my App.Config

When I wrote my connectionString just as the same as in the web.config of the web site, I also put a  MachineKey for the encryption but it gives Error. Also, People that will log on the site and the application form are over the world. Its not just an Intranet (maybe it does a difference..)

Well...I hope you understand everything, if not tell me and I will detail a little more
Thank you
Comment
Watch Question

Commented:
Well, I don't think that you can use single-sign-on between winforms and asp.net applications using standard Membership provider.
However if you only need to validate users and roles you can easily do it in asp.net and winforms. It is well implemented in asp.net using System.Web.Security namespace that contains Membership, Role and other providers and you also have LoginView and other web controls available without coding a single line of code. In WinForms application you must make a reference to System.Web.Security and then you can use providers and their methods for validating users and roles. Just copy & paste the security settings from web.config to app.config.

Author

Commented:
what do you mean by I cant use single-sign-on

Author

Commented:
Look for exemple, PartyPoker or PokerStars ok ...
the user can go over the web site log in etc  and they can log the same credentials in the Application to start a game.

thats the big exemple a can give. Its the perfect exemple, I want to have the same thing exept that my application is not a game.

I red a little about WCF from Microsoft. Do you think that could help
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Okai so the webservice If I understand is for the security that no one would see the connectionString in the code because when you send the aplpication to someone its an EXE and its possible when youre enough smart to decode everytinhg and see the code behind right ?

Commented:
Security is one thing that is good on webservices. But better that that is that webservices use standard HTTP on standard ports so the communicaion passes firewalls, proxy servers and other network devices.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.