Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Indigo

Vista - Failing WS-Atomic transactions...

 
 
Old 12-19-2006   #1 (permalink)
a4wander


 
 

Failing WS-Atomic transactions...

I am having a lot of problems (like it does not work) re getting my
transactions to work again with WCF:

My server config looks like this:

<services>
<!-- Before deployment, you should remove the returnFaults behavior
configuration to avoid disclosing information in exception messages -->
<service name="REDServices.CustomerService"
behaviorConfiguration="returnFaults">
<endpoint contract="REDServices.ICustomerService"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_CustomerService"
/>
<endpoint contract="IMetadataExchange" binding="mexHttpBinding"
address="mex" />
</service>

:
:
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_CustomerService" transactionFlow="true">
<security mode="None"/>
</binding>
<binding name="WSHttpBinding_RestOfServices">
<security mode="None"/>
</binding>
</wsHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="returnFaults">
<serviceDebug includeExceptionDetailInFaults="true"/>
<serviceMetadata httpGetEnabled="true" />
<serviceThrottling maxConcurrentSessions="100"
maxConcurrentCalls="100" maxConcurrentInstances="100" />
</behavior>
</serviceBehaviors>

</behaviors>
</system.serviceModel>

My Server code looks like this:

[OperationBehavior(TransactionScopeRequired = true,
TransactionAutoComplete = true)]
public AddressDataBag CreateAddress(CustomerContext cc,
AddressDataBag bag, ref ErrorBag[] errors)
{
:
:
}

My client config looks like this:


<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_CustomerService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00"
sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="true"
hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8"
useDefaultWebProxy="true"
allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192"
maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="None">
<transport clientCredentialType="Windows"
proxyCredentialType="None"
realm="" />
<message clientCredentialType="Windows"
negotiateServiceCredential="true"
establishSecurityContext="true" />
</security>
</binding>

:

<client>
<endpoint
address="http://demo.electricred.us:8080/REDServices/CustomerService"
binding="wsHttpBinding"
bindingConfiguration="WSHttpBinding_CustomerService"
contract="CustomerService" name="WSHttpBinding_CustomerService" />

And the client call looks like this:

CustomerServiceClient svc = GetService();

if (svc != null)
{
using (TransactionScope transaction = new
TransactionScope(TransactionScopeOption.RequiresNew))
{

try
{
PrepareForCall();
GetData(svc.CreateCustomer(custbag, sPassword, ref
_errors));


if (_errors == null)
{
// Now call the address
addbag.PrimaryAddress = true;
AddressDataBag newaddbag =
svc.CreateAddress(_cc, addbag, ref _errors);


On the client I am getting the following error:

The flowed transaction could not be unmarshaled. The following exception
occurred.
The WS-AtomicTransaction protocol service could not unmarshal the flowed
transaction.
The following exception occured: A fault reply with code
CoordinationRegistrationFailed was
recieved. The fault reason follows: The WS-AT protocol service failed to
rester with its coordinator.
A Connection could not be established.







My System SpecsSystem Spec
Old 01-03-2007   #2 (permalink)
CESAR DE LA TORRE [MVP]


 
 

RE: Failing WS-Atomic transactions...

I do not see your service-class code. Are you using a tx attribute on the
service class, like the following?:

[ServiceBehavior(
TransactionIsolationLevel =
System.Transactions.IsolationLevel.ReadCommitted,
TransactionTimeout = "0:00:30",
ReleaseServiceInstanceOnTransactionComplete = false,
TransactionAutoCompleteOnSessionClose = false)]
public class MyService : IMyContract
{ ....

Also,
- what database are you using? SQL 2005?, SQL 2000?, Oracle?
- Have you checked your DTC services?

--
CESAR DE LA TORRE
Software Architect
[Microsoft MVP - Connected Systems]
[MCSE] [MCT]
BLOG: http://ctorre.spaces.live.com

Renacimiento
[Microsoft GOLD Certified Partner]


"a4wander" wrote:

> I am having a lot of problems (like it does not work) re getting my
> transactions to work again with WCF:
>
> My server config looks like this:
>
> <services>
> <!-- Before deployment, you should remove the returnFaults behavior
> configuration to avoid disclosing information in exception messages -->
> <service name="REDServices.CustomerService"
> behaviorConfiguration="returnFaults">
> <endpoint contract="REDServices.ICustomerService"
> binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_CustomerService"
> />
> <endpoint contract="IMetadataExchange" binding="mexHttpBinding"
> address="mex" />
> </service>
>
> :
> :
> <bindings>
> <wsHttpBinding>
> <binding name="WSHttpBinding_CustomerService" transactionFlow="true">
> <security mode="None"/>
> </binding>
> <binding name="WSHttpBinding_RestOfServices">
> <security mode="None"/>
> </binding>
> </wsHttpBinding>
> </bindings>
> <behaviors>
> <serviceBehaviors>
> <behavior name="returnFaults">
> <serviceDebug includeExceptionDetailInFaults="true"/>
> <serviceMetadata httpGetEnabled="true" />
> <serviceThrottling maxConcurrentSessions="100"
> maxConcurrentCalls="100" maxConcurrentInstances="100" />
> </behavior>
> </serviceBehaviors>
>
> </behaviors>
> </system.serviceModel>
>
> My Server code looks like this:
>
> [OperationBehavior(TransactionScopeRequired = true,
> TransactionAutoComplete = true)]
> public AddressDataBag CreateAddress(CustomerContext cc,
> AddressDataBag bag, ref ErrorBag[] errors)
> {
> :
> :
> }
>
> My client config looks like this:
>
>
> <system.serviceModel>
> <bindings>
> <wsHttpBinding>
> <binding name="WSHttpBinding_CustomerService" closeTimeout="00:01:00"
> openTimeout="00:01:00" receiveTimeout="00:10:00"
> sendTimeout="00:01:00"
> bypassProxyOnLocal="false" transactionFlow="true"
> hostNameComparisonMode="StrongWildcard"
> maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
> messageEncoding="Text" textEncoding="utf-8"
> useDefaultWebProxy="true"
> allowCookies="false">
> <readerQuotas maxDepth="32" maxStringContentLength="8192"
> maxArrayLength="16384"
> maxBytesPerRead="4096" maxNameTableCharCount="16384" />
> <reliableSession ordered="true" inactivityTimeout="00:10:00"
> enabled="false" />
> <security mode="None">
> <transport clientCredentialType="Windows"
> proxyCredentialType="None"
> realm="" />
> <message clientCredentialType="Windows"
> negotiateServiceCredential="true"
> establishSecurityContext="true" />
> </security>
> </binding>
>
> :
>
> <client>
> <endpoint
> address="http://demo.electricred.us:8080/REDServices/CustomerService"
> binding="wsHttpBinding"
> bindingConfiguration="WSHttpBinding_CustomerService"
> contract="CustomerService" name="WSHttpBinding_CustomerService" />
>
> And the client call looks like this:
>
> CustomerServiceClient svc = GetService();
>
> if (svc != null)
> {
> using (TransactionScope transaction = new
> TransactionScope(TransactionScopeOption.RequiresNew))
> {
>
> try
> {
> PrepareForCall();
> GetData(svc.CreateCustomer(custbag, sPassword, ref
> _errors));
>
>
> if (_errors == null)
> {
> // Now call the address
> addbag.PrimaryAddress = true;
> AddressDataBag newaddbag =
> svc.CreateAddress(_cc, addbag, ref _errors);
>
>
> On the client I am getting the following error:
>
> The flowed transaction could not be unmarshaled. The following exception
> occurred.
> The WS-AtomicTransaction protocol service could not unmarshal the flowed
> transaction.
> The following exception occured: A fault reply with code
> CoordinationRegistrationFailed was
> recieved. The fault reason follows: The WS-AT protocol service failed to
> rester with its coordinator.
> A Connection could not be established.
>
>
>
>
>
>

My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
[CTP2:] File System Transactions PowerShell
Atomic SEO Vista installation & setup
My PC is failing WGA when it didn't before! Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46