Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
Hi all,
In a silverlight project which I develop, I should begin transaction when the child window loaded.If user clicks OK, all work will be commited, else will be rollback.
I added a wcf-enabled web service fot this purpose,

web.config is like below:

C#
<customBinding>
 <binding name="myWebService.customBinding0">
                    <transactionFlow transactionProtocol="OleTransactions"/>
                    <httpTransport />
                </binding>
            </customBinding>


When I add service reference, it adds the config settings at clientConfig side like below.

C#
clientConfig

 <customBinding>
   <binding name="CustomBinding_myWebService">
                    <binaryMessageEncoding />
                    <httpTransport maxReceivedMessageSize="2147" maxBufferSize="2147" />
                </binding>
            </customBinding>
  <endpoint address="http://localhost/myWebService.svc"
                binding="customBinding" bindingConfiguration="CustomBinding_myWebService"
                contract="myWebServiceReference.myWebService" name="CustomBinding_myWebService" />
 <endpoint/>

After I add my methods to the service for transaction, after updating , it removes the binding settings in clientConfig. I can not create the client of service. Because there is no binding to add. How can I solve this problem?
Thanks in advance for the replies..
Posted
Updated 17-Jan-12 2:22am
v6
Comments
Anuja Pawar Indore 17-Jan-12 8:19am    
Added pre tag

1 solution

I realized that customBinding does not support transaction.I declared my service with wsHttpBinding this time.But when I add reference , the client config is empty.There is nothing about the binding name and related settings which I should have, to decribe service client property.

What should I do about this?
Thank you..
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 15-Jul-14 10:52am    
Not an answer.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900