Sep 28, 2012 at 9:23 AM
Edited Sep 28, 2012 at 9:28 AM
Ok, I took another good look at it today and finally figured out the problem.
At first I thought it was because of all the Oracle stuff I do, but when I removed all of it, the problem persisted. The problem was this piece of code:
// Use normal Orchard authentication when connectionstring is not available
I had totally forgotten that my property "ConnectionString" does something with Orchard settings. It looks like this:
private string ConnectionString
var settingsPart = this.Services.WorkContext.CurrentSite.As<MyModuleSettingsPart>();
So of course this causes problems, since it needs the ambient Orchard transaction, it won't work properly if I put it inside a new transactionscope with the surppress option. I moved that if statement outside of the transactionscope block and that
fixes my problem.