Setting Default Profiles

Discussions related to SoftPro Select Server development.

Moderator: Phil Barton

Post Reply
tlyde_LCTMHS
Posts: 8
Joined: Thu Jul 18, 2013 12:21 pm

Setting Default Profiles

Post by tlyde_LCTMHS »

I am trying to upload scanned documents to various orders. I have a login that has multiple profiles but no default selected. My code is:

SelectServer sps;
sps = new SelectServer(null, new Uri(@"http://SELECT-MID:8080/")); // leave off credentials if using windows login
OrderTracking ot = sps.GetService<OrderTracking>();


The error that I get is:

You have to have a profile selected to login.
at SoftPro.Select.Client.Internal.SecurityProvider.SetCurrentUserState(ChooseProfileCallback chooseProfile)
at SoftPro.Select.Client.SelectServer.InitLegacySupport()
at SoftPro.Select.Client.SelectServer._server_Authenticated(Object sender, EventArgs args)
at SoftPro.ClientModel.Server.EnsureAuthenticated()
at SoftPro.ClientModel.Server.GetService(Type serviceType, Boolean ensureAuthenticated)
at SoftPro.ClientModel.Server.GetService[T]()
at SoftPro.Select.Client.SelectServer.GetService[T]()

I've seen this question asked so I know there is no way to go thru the API but I haven't seen what the recommended solution is. I am planning on going directly into the database and setting the default profile to whichever ProfileID I need to be at that time. Is there a better way to handle this??

Thanks
john.morton
Posts: 89
Joined: Wed Nov 16, 2011 11:51 am

Re: Setting Default Profiles

Post by john.morton »

Assuming that you're writing this against the 2.6 version of the API (Boylan), our recommendation is to have multiple users to represent the different profiles you might need to access to. As you saw, it's purely based off their default profile, so you can have those different users setup with the appropriate default profiles, and then log off (dispose of your SelectServer) and log back in with a different user as needed.
Post Reply