Thanks a lot for this clear explanation.
Today I integrated the NHibernate.Burrow framework into my ASP.NET (MVC) Application, the url: http://www.heymann-films.com/
The Service layer, data (NHibernate of course) layer are 2 different class libraries.
On local environment everything worked perfect but when upload to shared hosting Server (iis7) there was an error:
"Either workspace is not initialized yet or it is closed"
Unfortunately there are only 2 different relevant results for this error in google so I tried many solutions.
Finally, The only solution that worked was to add to events to global.asax :
protected void Application_BeginRequest(object sender, EventArgs e)
{
new BurrowFramework().InitWorkSpace();
}
protected void Application_EndRequest(object sender, EventArgs e)
new BurrowFramework().CloseWorkSpace();
Now it works.
Thx.
@Shay Jacoby,
One question, when moving to the IIS7 box did you put the httpModules in the <system.webServer> section?
www.west-wind.com/.../168221.aspx
I also needed to add preCondition="managedHandler" to the module in system.webServer for it to work.
Could you update Burrow for NH 2.1.2.
When I setup Burrow I get following error:
Could not load file or assembly 'NHibernate, Version=2.0.1.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Thanks Shay!!!!! Fantastic it worked!!!!!!!!!!!!!!! thank you!!!!