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 ExtensionsModulesModulesOffice365 API Accessing OneDrive for business in DNN moduleOffice365 API Accessing OneDrive for business in DNN module
Previous
 
Next
New Post
2/24/2015 11:53 AM
 

Greetings all, I need a bit of advice/help with this.

Been struggling with Office365 for business for two weeks now. I have a working example running in blank Web Forms project which I am trying to ported into DNN module (based on Chris Hammond template).

The very first problem was:

Exception: No owin.Environment item was found in the context.

From my understanding had something to do with DNN not being able find/run Startup.cs. So, I thought that I wasn't allowed to have Startup.cs in the module and I was proven wrong. DNNChat module also uses Startup.cs to reference SignalR.

After I flipped owin:AutomaticAppStartup value from false to true in DNNs web.config I started to have issues with Microsoft.Owin.Security 2.1.0.0 library not being found.

Adding some assembly bindings to DNNs web.config to reflect update dll's solved that issue and I am now able to run the module inside DNN.

But when I click on Sign In button I get redirected to my website home page not to the https://login.windows.net as I would expect. So I though maybe its FriendlyURL engine, nope, disabling Friendly URLs didn't help.

And now I am sitting here thinking that DNN must be hijacking HttpContext in some way.

Any one have any suggestion where I should look next?

 
New Post
2/24/2015 4:20 PM
 

Sorry guys it may help if you have some code to look at.

I have loaded some code to my GitHub account.

 
New Post
2/25/2015 4:55 AM
 

Hrm, been trying something with request filters with not much luck.

It looks like when I click Sign In button DNN takes over and attempts to redirect me to the Login page but because I am already authenticated with DNN it redirects me to the home page.

Is there a way I can prevent default behaviour with request filters or web.config tweaks?

 
New Post
2/25/2015 7:41 AM
 

It appears you're using OWIN's authentication middleware (which uses localdb and entity framework by default -

http://www.asp.net/identity/overview/getting-started/adding-aspnet-identity-to-an-empty-or-existing-web-forms-project ). This is why it's failing as DNN is a webforms environment set up for forms authentication. AFAIK there is no requirement for OWIN auth middleware to use Office API's, it's more likely that you need to use OAUTH (which is an option with OWIN), if this is the case, just use DNN's oauth support (you can look at authentication providers such as google/live/twitter to see it in action)


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
2/25/2015 7:59 AM
 
cathal connolly wrote:

It appears you're using OWIN's authentication middleware (which uses localdb and entity framework by default -

http://www.asp.net/identity/overview/getting-started/adding-aspnet-identity-to-an-empty-or-existing-web-forms-project ). This is why it's failing as DNN is a webforms environment set up for forms authentication. AFAIK there is no requirement for OWIN auth middleware to use Office API's, it's more likely that you need to use OAUTH (which is an option with OWIN), if this is the case, just use DNN's oauth support (you can look at authentication providers such as google/live/twitter to see it in action)

 

I was looking at OpenID Authentication last night till it fried my brain.

Will give the others a try shortly.

Cheers Cathal.

 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesOffice365 API Accessing OneDrive for business in DNN moduleOffice365 API Accessing OneDrive for business in DNN module


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