tags:

views:

144

answers:

1

Hi there,

I am creating a desktop/client application that will be installed on +/- 5 PCs, that will be transacting with a database on a central server machine. This app requires login authentication which I've in past rolled my own (messy, but it worked). Then I thought it would be great to leverage ASP.NET Membership,Roles,Profile...etc..

After some reading up I came across the .NET Client Application Services which suits my purposes. However I have a few concerns that I am hoping some of you out there can answer:

  • When creating the Application Services Host, the article I've linked to above mentions that in development I should create an ASP.NET Web Service Application. Will this be the same for production? I ask this as this article suggests that I should be using a proper ASP.NET website. But then that begs the question as to whether I should'nt use a normal ASP.NET website with membership, roles, profiles in development to begin with, and then copy across to production?
  • In my Winfroms app, will I still be able to leverage functionality like: "if (!User.IsAuthenticated)" and so forth?
  • If the Name of the central server in the office that the web service app or website resides is say: "MYOFFICE_SERVER", what will the production URL be for client machines to connect to?
  • I have also seen this article. Can this be construed as an alternative, or is the Client Application Services the preferred way to go?
  • Finally, are there any other production-specific settings that I should be aware of?

I'm sorry. I realise that these are probably very juvenile questions to ask, but I would sincerely appreciate your help as Im heavily confused!!

Thank you.

+1  A: 
  1. You can use "ASP.NET Web Service Application" or "ASP.NET Website" as long as they expose the services that you need (membership, roles, profiles).
  2. Indeed, in your client you will be able to do things like:

    bool log = Membership.ValidateUser("username", "password"); //hard code login bool log = Membership.ValidateUser(null, null); //use a login form if (Thread.CurrentPrincipal.IsInRole("Principal"))... //check if the user is a member of a role Settings.Default.lowValue //use properties from the profile

  3. the url is usually the url of the website with authentication (or the subdirectory in that url if you use a Web Service).

  4. For production.. first make sure that the form authentication works (when using a browser). And then try using it from the window client.

Watch these 2 videos (in fact, one uses "ASP.NET Web Service Application" and the other an "ASP.NET Website"):

Nestor
Hey Nestor! thanx for the reply...sorry, im only seeing it now. I havent watched the videos yet, but will download them now. If I have any questions would u mind if I post back here?
Shalan
Ask away my friend... :-)
Nestor