This question is locked. New answers and comments are not allowed.
Hello,
I’m trying to use OpenAccess for a website. Classic architecture , Webforms, UI, Business, DAL layers.. Using the Domain Model generated by OA, no 2nd level cache.
The first problem I had was when adding items to a basket (Table Basket --> BasketLineItems, 1-N .. classic)
Initially I had on my DataAccessLayerBase.cs:
Of course, I ended with several dbContexts and baskets containing different items as I was adding/removing them, all messed-up.
Then I used the HttpModule solution. (Masterpage wasn’t pretty because I have a DAL)
Now this one seems better BUT I don’t know why, under IIS Integrated Mode it doesn’t work, I get another messed-up basket on each request and errors like:
Error: “Object references between two different object scopes are not allowed. The object 'HighLevelFO.Entities.Basket' is already managed by 'ObjectScopeImpl 0x3ed6c25 Telerik.OpenAccess.RT.EnlistableObjectScope' and was tried to be managed again by 'ObjectScopeImpl 0x2f8458d Telerik.OpenAccess.RT.EnlistableObjectScope'.”
If I switch to IIS Classic mode it *seems* ok.
Note: for reading purposes only, it’s not a problem as for example I read the products catalog and I put it on memory cache.
I was trying to avoid getting down to the good old 100% pure ADO.net to handle all the CRUD related with basket/user account.
But the truth is that I’m not feeling confident with OpenAccess dealing with these critical objects.
• What will happen if using IIS Webfarms > 1?
• What will happen with 2+ load-balanced IIS Servers?
• Why this solution doesn’t work with IIS Integrated mode?
• What to use in the HTTPModule? HttpContext.Current.Items or HttpContext.Current.Session?
I think it would be really useful to have an example for this kind of real-life-real medium/heavy loaded websites scenarios.
Regards,
Rafael
I’m trying to use OpenAccess for a website. Classic architecture , Webforms, UI, Business, DAL layers.. Using the Domain Model generated by OA, no 2nd level cache.
The first problem I had was when adding items to a basket (Table Basket --> BasketLineItems, 1-N .. classic)
Initially I had on my DataAccessLayerBase.cs:
private
static
HighLevelFOModel _dbHighLevelFOContext;
public
static
HighLevelFOModel GetHighLevelFODBContext()
{
if
(_dbHighLevelFOContext ==
null
)
return
_dbHighLevelFOContext =
new
HighLevelFOModel();
return
_dbHighLevelFOContext;
}
Of course, I ended with several dbContexts and baskets containing different items as I was adding/removing them, all messed-up.
Then I used the HttpModule solution. (Masterpage wasn’t pretty because I have a DAL)
Now this one seems better BUT I don’t know why, under IIS Integrated Mode it doesn’t work, I get another messed-up basket on each request and errors like:
Error: “Object references between two different object scopes are not allowed. The object 'HighLevelFO.Entities.Basket' is already managed by 'ObjectScopeImpl 0x3ed6c25 Telerik.OpenAccess.RT.EnlistableObjectScope' and was tried to be managed again by 'ObjectScopeImpl 0x2f8458d Telerik.OpenAccess.RT.EnlistableObjectScope'.”
If I switch to IIS Classic mode it *seems* ok.
Note: for reading purposes only, it’s not a problem as for example I read the products catalog and I put it on memory cache.
I was trying to avoid getting down to the good old 100% pure ADO.net to handle all the CRUD related with basket/user account.
But the truth is that I’m not feeling confident with OpenAccess dealing with these critical objects.
• What will happen if using IIS Webfarms > 1?
• What will happen with 2+ load-balanced IIS Servers?
• Why this solution doesn’t work with IIS Integrated mode?
• What to use in the HTTPModule? HttpContext.Current.Items or HttpContext.Current.Session?
I think it would be really useful to have an example for this kind of real-life-real medium/heavy loaded websites scenarios.
Regards,
Rafael