Click here to Skip to main content
15,900,461 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: test question Pin
clientSurfer9-Dec-11 18:10
professionalclientSurfer9-Dec-11 18:10 
AnswerRe: test question Pin
Dave Kreskowiak9-Dec-11 19:05
mveDave Kreskowiak9-Dec-11 19:05 
GeneralRe: test question Pin
Rajesh Anuhya11-Dec-11 21:18
professionalRajesh Anuhya11-Dec-11 21:18 
AnswerRe: test question Pin
Luc Pattyn10-Dec-11 0:17
sitebuilderLuc Pattyn10-Dec-11 0:17 
AnswerRe: test question Pin
thatraja11-Dec-11 23:10
professionalthatraja11-Dec-11 23:10 
QuestionConverting ASP.Net to .Net 4.0 throws MSDTC error Pin
Melanie Peterson8-Dec-11 7:26
Melanie Peterson8-Dec-11 7:26 
AnswerRe: Converting ASP.Net to .Net 4.0 throws MSDTC error Pin
Brisingr Aerowing9-Dec-11 10:28
professionalBrisingr Aerowing9-Dec-11 10:28 
GeneralRe: Converting ASP.Net to .Net 4.0 throws MSDTC error Pin
Melanie Peterson13-Dec-11 6:34
Melanie Peterson13-Dec-11 6:34 
Thanks for the link. I've been trying to post a reply to this thread for two days; there must be something in my reply that's causing IE to explode. So I'm going to try to post an overview of what I've tried without posting explicit code. I appreciate your patience.

To try to solve my problem, I set a string variable to be my SELECT statement, where the SELECT statement does a SELECT COUNT(*) and evoked it with ExecuteScalar.

This errors out with the same error message when I try to open my connection.

I dug farther into the code and realized that this SELECT statement is inside a transaction that's opened two levels up. Within the transaction there are calls to another database server, so I'm guessing that that's where the DTC error is coming from.

Basically, within the transaction (which is set to IsolationLevel ReadCommitted), there are two calls to a SQL Server 2008 R2 server which work fine. Then comes a method that calls a method that calls my SELECT statement to a SQL Server 2003 server.

Note that this code works fine in .Net 2.0, but breaks if I convert the solution to 4.0. It also breaks if I convert the solution to 3.5. Could the problem be the IsolationLevel setting? I can't imagine why that would be the case, but....

I did manage to get around this problem by creating a stored procedure to do the SELECT statement and calling it through a linked server on the 2008 R2 machine.

HOWEVER, when the next ADO.Net call is made to the 2008 R2 machine, I get "Error Message: The operation is not valid for the state of the transaction."

I'm stumped. Any ideas?
GeneralRe: Converting ASP.Net to .Net 4.0 throws MSDTC error Pin
Melanie Peterson14-Dec-11 5:21
Melanie Peterson14-Dec-11 5:21 
GeneralRe: Converting ASP.Net to .Net 4.0 throws MSDTC error Pin
Brisingr Aerowing14-Dec-11 5:41
professionalBrisingr Aerowing14-Dec-11 5:41 
GeneralRe: Converting ASP.Net to .Net 4.0 throws MSDTC error Pin
Melanie Peterson14-Dec-11 6:06
Melanie Peterson14-Dec-11 6:06 
GeneralRe: Converting ASP.Net to .Net 4.0 throws MSDTC error Pin
Melanie Peterson14-Dec-11 8:34
Melanie Peterson14-Dec-11 8:34 
AnswerRe: Converting ASP.Net to .Net 4.0 throws MSDTC error Pin
Melanie Peterson14-Dec-11 8:37
Melanie Peterson14-Dec-11 8:37 
SuggestionRe: Converting ASP.Net to .Net 4.0 throws MSDTC error Pin
Shameel11-Dec-11 18:40
professionalShameel11-Dec-11 18:40 
QuestionIs there any one who know Unibasic? Pin
Balakrishnan Dhinakaran7-Dec-11 2:14
professionalBalakrishnan Dhinakaran7-Dec-11 2:14 
AnswerRe: Is there any one who know Unibasic? Pin
Pete O'Hanlon7-Dec-11 2:52
mvePete O'Hanlon7-Dec-11 2:52 
GeneralRe: Is there any one who know Unibasic? Pin
Balakrishnan Dhinakaran7-Dec-11 18:05
professionalBalakrishnan Dhinakaran7-Dec-11 18:05 
GeneralRe: Is there any one who know Unibasic? Pin
Pete O'Hanlon9-Dec-11 10:01
mvePete O'Hanlon9-Dec-11 10:01 
QuestionThread synchronization Pin
columbos149277-Dec-11 1:42
columbos149277-Dec-11 1:42 
AnswerRe: Thread synchronization Pin
Not Active7-Dec-11 2:22
mentorNot Active7-Dec-11 2:22 
GeneralRe: Thread synchronization Pin
Addy Tas7-Dec-11 10:24
Addy Tas7-Dec-11 10:24 
GeneralRe: Thread synchronization Pin
Not Active7-Dec-11 12:26
mentorNot Active7-Dec-11 12:26 
GeneralRe: Thread synchronization Pin
Addy Tas12-Dec-11 9:51
Addy Tas12-Dec-11 9:51 
QuestionCannot see new method added to ActivX control. Pin
__John_30-Nov-11 3:47
__John_30-Nov-11 3:47 
AnswerRe: Cannot see new method added to ActivX control. Pin
Richard MacCutchan30-Nov-11 3:50
mveRichard MacCutchan30-Nov-11 3:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.