Guys, help! I've been trying to use DO v4 in ASP.NET enviroment. I use your SessionManager under the example. It works good untill I try to insert or update some objects. If I simply change properties of objects, it doesn't change data at all. If I use ValidationDisable() region, data is changed, but transactions aren't commited, DB is locked. I can see these changes cause I set IsolationLevel = ReadUncommeted. But of cource I loose them later. Updated at 29.10.2009 14:26:44Well, I found a way. System.Transactions.TransactionScope - why I didn't think about it at the beginning? Hm... Doesn't work. Why such simple operation is so extremely hard? Updated at 29.10.2009 15:26:09Yes, it works :( I must be stupid :evil: Updated at 29.10.2009 15:48:38
Of cource I tried. Doesn't help.
I call Response.Redirect() at the end, is it ok?
Debug Output window is empty. I'll try to post SQL Profiler output. Btw, it would be much easy to analyze SQL Profiler output having set application name in connection string. Is it possible? This thread was imported from our support forum. The original discussion may contain more detailed answer. Original topic by buck. |
By default SessionManager commits each transaction it creates, if no error (I mean ASP.NET error) has occurred (or you must set its HasError property to true to prevent the commit). So... Can you give us some example code you're using? SQL Profiler output or debug log (just run the app. in Debug mode & see Debug Output window in VS.NET) would also be helpful. We're writing the manual now, so any unexpected issues must be either covered there or fixed ASAP... > I call Response.Redirect() at the end, is it ok? I'm not sure. Guys @ Xtensive, can you check this? > Debug Output window is empty. That's really strange... If you're running the app. under debugger, we redirect all log messages to Debug Output window, if you don't redirect them explicitly in Web.config. Anyway, details about logging are here: http://blog.alexyakunin.com/2009/10/v41 ... ching.html > Btw, it would be much easy to analyze SQL Profiler output having set application name in connection string. Is it possible? Yes, you can add any additional parameters to connection string via connection URL by this way: mssql://...&key1=value1&key2=value2[&...] Note that their content must be URL-encoded. NP, it seems that this pattern is no so obvious in usage as it was expected. Anyway, thanks for your patience. Don't mind to bother us ;) |
Alex Kofman wrote: Please run our ASP.NET sample... Does it work?
Hello buck,
Are you using the following pattern?
using (var ts = Transaction.Open()) {
... // your code here
ts.Complete(); <-- Is required to commit the transaction }