Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

Web Service authenication using active directory provider
Last Post 04/17/2011 2:11 PM by Peter Donker. 2 Replies.
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Ray Hastie
New Member
New Member
Posts:8


--
04/08/2011 10:46 PM
I am running the latest version of the products
DNN Community Edition: 05.06.02
ADProvider: 5.0.2
DMX: 05.03.07

Everytime I attempt to connect through the web service I get the following error:
The request failed with HTTP status 401: Unauthorized.

I have attempted this without credentials and also using my AD identity and password and also with straight DNN credentials but the result is the same.



wsDMX.LoginCredentials lc = new wsDMX.LoginCredentials();
wsDMX.Service ws = new wsDMX.Service();
ws.LoginCredentialsValue = new wsDMX.LoginCredentials();
lc.Username = "Domain\\userName";
lc.Password = "XXXX";
lc.PortalId = 0;
ws.LoginCredentialsValue = lc;
ws.Login();

// ====================================================================
lc = new wsDMX.LoginCredentials();
System.DirectoryServices.AccountManagement.UserPrincipal up = System.DirectoryServices.AccountManagement.UserPrincipal.Current;
lc.Username = up.UserPrincipalName.ToString();

lc.PortalId = 0;
ws.LoginCredentialsValue = lc;
ws.Login();
// ====================================================================

lc = new wsDMX.LoginCredentials();
lc.Username = "rhastie";
lc.Password = "macro95a";
lc.PortalId = 0;
ws.LoginCredentialsValue = lc;
ws.Login();

Any assistance would be appreciated.
Thank you in advance.
Ray Hastie
New Member
New Member
Posts:8


--
04/11/2011 8:04 PM
I turned on anon access on the web server and it started to work with Users created with DNN. I am still having issues with those logging in through the Active directory provider.



Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
04/17/2011 2:11 PM
Hi Ray,

The web service doesn't implement AD login. But you could tune it yourself with the partial source code.

Peter
You are not authorized to post a reply.