My asp.net app work with .net 4 and has about 50 users.
i do insert and update in some table's with My Datacontext.
i use TransactionScope.
public void Save()
{ //Insert and Update in some table's in datacontext
TransactionOptions scopOption = new TransactionOptions();
scopOption.IsolationLevel = IsolationLevel.ReadUncommitted;
using (scope = new TransactionScope(TransactionScopeOption.Required, scopOption))
{ datacontext.SubmitChanges();
//Insert and Update in some other table's in datacontext again
datacontext.SubmitChanges();
}
}
i want that 2 SubmitChanges() be in a transaction that if one rollback , all changes rollback.
1)is TransActionScope best way? 2) why Ram of IIS server Always is full. it take about 6 Gb of Ram. i dont know probelm is form db that doesnot dispose or TransactionScope. 3)what kind of IssolatiponLevel should i use?
kolahdoozan
0 Points
33 Posts
IIS Memory is full when use transactionScope and datacontext
Dec 31, 2012 10:06 AM|LINK
My asp.net app work with .net 4 and has about 50 users.
i do insert and update in some table's with My Datacontext.
i use TransactionScope.
public void Save() { //Insert and Update in some table's in datacontext TransactionOptions scopOption = new TransactionOptions(); scopOption.IsolationLevel = IsolationLevel.ReadUncommitted; using (scope = new TransactionScope(TransactionScopeOption.Required, scopOption)) { datacontext.SubmitChanges(); //Insert and Update in some other table's in datacontext again datacontext.SubmitChanges(); } }gnosischief
Participant
1022 Points
222 Posts
Re: IIS Memory is full when use transactionScope and datacontext
Dec 31, 2012 10:55 AM|LINK
You can limit memory utilization of worker process by changing advance setting of App Pool.
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: IIS Memory is full when use transactionScope and datacontext
Jan 01, 2013 01:11 AM|LINK
Hi,
I think so.
For IIS problem,you can ask here:http://forums.iis.net
If you wanna change values in the atomic process,you can just use ReadUnlimited。
kolahdoozan
0 Points
33 Posts
Re: IIS Memory is full when use transactionScope and datacontext
Jan 01, 2013 03:55 AM|LINK
You can limit memory utilization of worker process by changing advance setting of App Pool.????
about 50 user work with this application
why RAM increase to 6GB? in sproblem for db or fransaction that does not clean memory?
what is IIS Cache? maybe it cause any problem?
kolahdoozan
0 Points
33 Posts
Re: IIS Memory is full when use transactionScope and datacontext
Jan 01, 2013 03:59 AM|LINK
i read that transactonScope use when you work with 2 different database in a instance and it not suitable for other things.
can i work with datacontext Transaction . is that better?
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: IIS Memory is full when use transactionScope and datacontext
Jan 06, 2013 06:45 AM|LINK
Hi again,
I don't think there's a huge difference between them.