![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | 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. |
| | #2 (permalink) |
| Guest | 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. > > > > > > |
| |
| |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [CTP2:] File System Transactions | Jon | PowerShell | 2 | 05-13-2008 05:28 PM |
| Atomic SEO | afqs64bt | Vista installation & setup | 1 | 04-25-2008 07:12 AM |
| Log on failing | hungryhamster | Vista performance & maintenance | 1 | 04-01-2007 09:35 AM |