Developer forum

Forum » Development » Running DW9 on top of OWIN manually?

Running DW9 on top of OWIN manually?

Evaldas Raisutis
Reply

With a fresh DW9 installation from NuGet, I can see that Global.asax file implements codebehind of "Global.asax.vb".

I would like to get rid of Global.asax file alltogether and start website manually via owin bootstrapper. I can't find any information on this, even though Owin seems to be installed as a package as of DW9.

Any leads as to how bootstrap the site using owin, would be appreciated. 


Replies

 
Nicolai Pedersen
Reply

Hi Evaldas

All Global.asax does is make calls to Dynamicweb.Frontend.GlobalAsaxHandler - but it requires HttpApplication which you would not have in Owin environment. But I can help you with the internals of GlobalAsaxHandler if you want to give it a go.

But, Dynamicweb /Admin is a .aspx application and as far as I know you cannot get System.Web.Ui infrastructure up and running in Owin pipeline. You would probably be able to get the frontend to run since it is a MVC controller - but somethings would not run, i.e. GetImage and some callback handlers for checkouthandlers.

BR Nicolai

 
Evaldas Raisutis
Reply

Hi Nicolai,

I can see that Owin assembly is already a dependancy in DW, could you eleborate on what it's used for?

Also, what is used for dependency injection? If anything?

Does the roadmap include moving more towards Owin and DI?

 

We have quite a bit of interest in running DW in Owin environment at Novicell, hence the questions :) 

 
Nicolai Pedersen
Reply

It is used by Dynamicweb.Content.Social.Adapters.ExternalAuthentication to do external authentication against Facebook and other OAuth related services - which is an API that is available in MS Owin implementations.

BR Nicolai

 
Evaldas Raisutis
Reply

Hi Nicolai,

Is it then possible to subscribe to events caught by GlobalAsax handler? application_start etc.? If so, handlers subscribed are run before or after the event is emmitted? 

 
Nicolai Pedersen
Reply

Hi Evaldas

Yes - most of the events have notifications - you can find them here: https://doc.dynamicweb.com/Default.aspx?ID=8258#article=d5ca8c8b-6af4-5bf1-8086-81de1f7037a3

BR Nicolai

 
Evaldas Raisutis
Reply

Hi Nicolai

Sorry, but your link shows a blank page.

 
Nicolai Pedersen
 
Evaldas Raisutis
Reply

Perfect, thank you.

 

You must be logged in to post in the forum