Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesDNN WebAPI not working as expectedDNN WebAPI not working as expected
Previous
 
Next
New Post
9/17/2016 3:23 AM
 
My code looks the same as yours.

Sadly I don't know if that conforms to best practices or not. My services requirements are small. Simple JSON responses to small scraps of jQuery javascript.

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
9/19/2016 11:05 AM
 
So, what is the status of the DNN WebAPI (Service Framework) when it comes to using it as a real API in an environment where stuff like Modules and Tabs is not relevant? We notice that if we first login in via the webinterface, our DNN Authentication seem to work fine, but if you just try to authenticate using basic authentication, it doesn't. The Log4Net log is not really talkative about this, even with "All" as log level, but we can see:

2016-09-19 16:56:48,329 [DEVELOPMENT][Thread:42][WARN] DotNetNuke.Entities.Tabs.TabController - Invalid tabId -1 of portal 0
2016-09-19 16:56:48,332 [DEVELOPMENT][Thread:42][WARN] DotNetNuke.Web.Api.StandardTabAndModuleInfoProvider - The specified moniker () is not defined in the system

When we try to authenticate which I can only assume has to do with what's mentioned above about missing tabid and moduleid.

Is it so that unless you have tabid and moduleid, we really shouldn't try to use the DNN WebAPI but instead just use "normal" WebAPI. The main reason we would want to integrate this into DNN WebAPI would be to handle users and permissions in DNN instead of elsewhere, as we already use that for more ordinary Portal stuff.

Please advice.
 
New Post
9/19/2016 6:00 PM
 
Richard Howells wrote:
My code looks the same as yours.

Sadly I don't know if that conforms to best practices or not. My services requirements are small. Simple JSON responses to small scraps of jQuery javascript.



Did you ever get the DNN WebAPI to work with authentication? Ie authentication not based on the user first loging in to the portal and get Cookies set?

We are very close to give up on DNN Service Framwork altogether, there are just to many bugs and an almost total lack of updated documentation
 
New Post
9/20/2016 12:44 AM
 
I don't need that kind of authentication.

In my case if they can look at the page they can use the service. So I rely on the cookies being set.

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
9/20/2016 6:33 AM
 
Seems Authentication on the DNN WebAPI just doesn't work as it should and we have been unable to find any good updated documentation for it. We even tried to write our own Authorization attributes as:

[GIBSAuthorization]
[HttpGet]
public List GetAllApplicationLoanCustomer()

And then implemented it using:

public class GIBSAuthorization : DotNetNuke.Web.Api.AuthorizeAttributeBase
{


public override bool IsAuthorized(AuthFilterContext context)
{
return true;
}
}

but despite IsAuthorized being called and returning True, we still get:

{
"Message": "Authorization has been denied for this request."
}

Seems like the DNN WebAPI simply doesn't work or are we doing anything wrong here?
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesDNN WebAPI not working as expectedDNN WebAPI not working as expected


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out