We have a desktop app that we want to authenticate with our DNN site to enable user features based on their successful login and assigned Roles. Using DnnDash we have had no problems with Anonymous methods in our service like this;
[HttpGet]
[AllowAnonymous]
public string Ping() {
return "Anonymous Ping Success"; }
But when we attempt to Authenticate we are denied access using this;
[HttpGet]
[DnnAuthorize(StaticRoles="Administrators")]
public string PingAdmin() {
return "Admin Ping"; }
Our PC Code that works with Anonymous but fails with Authentication looks like this;
string url = DnnRequest.GetUrl(credentials.HttpAlias, "DnnDash_SimpleDashboard", "Dash", "PingUserInfo", false);
string errorMsg = null; HttpStatusCode statusCode;
CookieContainer cookies = credentials.Cookies;
var response = DnnRequest.GetRequest(url, username, password, out statusCode, out errorMsg, ref cookies);
Any suggestions on what we may be doing wrong here?
thank you!