views:

268

answers:

3

I've been playing around with ASP.NET Application Services. I've implemented the Authentication Service, Profile Service and Role Service successfully, able to log in and get Profile information for the logged in user and Role information.

Now I've noticed a major shortfall in the fact that I can't work out how to create a new user account with the Application Services stuff. Does anybody know how?

A: 

I'm not sure about Application Services, but I know that you can create new users with Membership Services.

That's like this:

Dim mbmr As MembershipUser
mbmr = Membership.CreateUser(newUserName,newUserPwd)

There are something like 6 overrides for the CreateUser method.

Stephen Wrighton
Yes, I'm aware of Membership.CreateUser, but I need to acheive this through Application Services.
Rogan
I *think* that Application Services would still utilize the CreateUser method, as the walkthrough on MSDN uses the CreateUserWizard control. http://✩.ws/崳
Stephen Wrighton
Alternatively, you could just access the stored procedures directly.
Stephen Wrighton
+1  A: 

Seems like the Application Services AuthenticationService only supports validating existing users. You should enable creating users through some other part of your application, either your own web service or a web page.

Peter Lillevold
Just sounds like too much effort! Would have thought it would be catered for. Are you sure? I'm trying to build a website that uses these Application Services hosted elsewhere. Perhaps websites aren't supposed to use Application Services, rather just client apps like Win Forms, WPF or silverlight.
Rogan
As far as I can see the App Services supports things like login/logout and profile data retrieval. Your hosted solution, does it provide some "Register User" page that you could expose to your end users?
Peter Lillevold
A: 

I think not many people are not fully understanding the role of application services and thus feel frustrated when they do not find the full asp.net provider stack exposed over a store bought json endpoint......

Application services are exposed publicly. They are meant to provide an authentication and identification facility.

Think...

Your user is not logged in. To log in you must access application services to authenticate.

Right?

Do you really think that exposing membership management api such as Create/Delete user on that endpoint is wise?

Exposing management functions on a public facing api presents a huge challenge to get right for ONE scenario, much less to capably facilitate every scenario so perhaps you can see why application services exposes only what you need to do identify and authenticate a user.

Sky Sanders