.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

Transactions in services with request reply pattern in a pick branch

Posted By:      Posted Date: December 04, 2010    Points: 0   Category :Windows Application

How can I enclose activities in a transaction within a body of a pick-branch (i.e. Action of PickBranch activity), where the Trigger of pick-branch receives a message via Receive activity and the Action of pick-branch sends reply via SendReply activity? Transaction scope must be placed within the Action of PickBranch, right before SendReply.

I cannot use TransactionScope between Receive and SendReply (see here for explanation: http://social.msdn.microsoft.com/Forums/en-US/wfprerelease/thread/96c048bf-06d4-44ac-a60c-e2e77f7a7060 )

On the other hand, TransactedReceiveScope activity does not seem to fit to the pick-branch pattern.

Thanks for help,
Greg Jasinski

View Complete Post

More Related Resource Links

Doesn't WSHttpBinding support request-reply communication pattern?


hi, just when I've thought I'm finally starting to understand WCF, this happens :(

The following code give me an exception saying that "IReplyChannel is not supported by this channel manager ", which doesn't make sense, since IReplyChannel is used with request-reply communication pattern, and as far as I know, WSHttpBinding does support request-reply communication ( BTW - if I make a bindingT variable of type BasicHttpBinding , then everything works fine ). Any ideas what is going on?

  class Program
    static void Main(string[] args)
      Uri baseAddress = new Uri("http://localhost:8000");
      WSHttpBinding bindingT = new WSHttpBinding();
      BindingParameterCollection bpc = new BindingParameterCollection();

      IChannelListener<IReplyChannel> listener =
                        baseAddress, bpc);

thank you

Foundations: Easily Apply Transactions To Services


Managing state and error recovery using transactions is the topic of this month's installment of Foundations.

Juval Lowy

MSDN Magazine January 2009

web services transactions (select statement)

 Hi everybody, i'm just getting started in web services and i have a problem connecting to a database. All i want is that my web service recieves a string parameter and return a dataset so that in the client aplication i just show the result of the web service in a datagrid. Here's the code of the web service:    <%@ WebService Language="C#" CodeBehind="Service1.asmx.cs" %> using System;using System.Collections;using System.ComponentModel;using System.Data;using System.Linq;using System.Web;using System.Web.Services;using System.Web.Services.Protocols;using System.Xml.Linq;using System.EnterpriseServices;using System.Data.SqlClient;namespace Farmacia{    [WebService(Namespace = "http://localhost/MyWebServices")]    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]    [ToolboxItem(false)]    public class Farmacia : System.Web.Services.WebService    {        private SqlDataAdapter da;        [WebMethod(TransactionOption=TransactionOption.RequiresNew)]        public DataSet Consultas (string sel)        {            if (sel == "")&

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Object canno

hello,i am using a web servicewrtitten in .net and i access the webservice from my wepApplication i get this error System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Object cannot be cast from DBNull to other types.my code is access webservice: protected void btnSave_Click(object sender, EventArgs e)        {            int intStatusCode;            dtProjectStatus = (DataTable)ViewState["dtProjectStatus"];            try            {                objService.Credentials = System.Net.CredentialCache.DefaultCredentials;                if(dtProjectStatus.Rows.Count>0)                {                  intStatusCode = objService.InsertTest(dtProjectStatus);                }   

Query Correlation faliure using custom Request/Reply Message Contract classes.

Hi,I have a service which is correlated by a Guid query. When I'm using designer created Message Content/Parameters feature for message definition, everithing working lika a charm. But If I define custom [MessageContract] Request/Reply classes (where request class has Guid SvcUID property for correlation), and choose'em as Message Content in the designer with proper CorrelatesOn definition of course, I have got a service exception about correlation query faliure. Have you folks tried to apply your custom [MessageContract] classes for correlated communication?

In Reporting Services: Request for the permission of type 'System.Data.SqlClient.SqlClientPermissio

Hello all,In Reporting Services through http://myserver/mydbinstance/Pages/Report.aspx blah de blah blah, I get this error:Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.Actually, the report runs just fine, but some fields had the famous #Error in them. I put some old fashioned debug in my report to TRY, CATCH, END TRY and get the problem to the report so that I could see this report finally run in production. Yes, it runs just fine in VS2005. I have custom code in the report code window that does its own custom connection to an SQL database through "System.Data.SqlClient.SqlConnection" and "System.Data.SqlClient.SqlCommand" to pull in data that is not part of any of the datasources in the report. When I execute the report through the Report Manager or Report site under IIS, the report will run, but I get these errors in every field that uses functions to populate the data.I have searched the web for 3 days now, and the best answers involve using either CASPOL or the Microsoft .NET Framework 2.0 Configuration wizard in Administrative Tools on the server. (I understand that the wizard does the same thing as CASPOL, just through a GUI.) I have followed those steps, but still get the error.I do not know what I need to do to make these DLLs th

Access Services is unable to process the request.


When I publsih a web database template from the Microsoft application I get the following error:

Access Services is unable to process the request.Click here to try again.

Larry Stupka

Access Services is unable to process the request.Click here to try again.


I have published an Access Web Database that is one of the templates for microsoft and I get the following error:

Access Services is unable to process the request.  Click here to try again.

Larry Stupka

access services unable to process request


after creating Issue Web Database application - all I get when ever I try to access users, issues etc is the above error message.

AccessPortal.ExecuteWebMethodHandler - An unhandled internal exception has occurred: Microsoft.Office.Excel.Server.CalculationServer.Proxy.ServerSessionException: An error has occurred. ---> System.ServiceModel.FaultException: The server was unable to process the request due to an internal error.  For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.    Server stack trace:      at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String... 1aba4a20-7b77-4cf4-b57a-a3371fadb525
10/11/2010 13:37:57.87* w3wp.exe (0x173C)                        0x039C Access Services                User Interface     &nbs

Pick Activity doesn't cancel other branches when first Branch Trigger completes


I have a Pick Activity with 2 branches:

Branch 1 contains a Trigger an Delay activity with TimeSpan of 1 minute and a WriteLine before and after so I can check the executing times.

Branch 2 contains a Trigger with an InvokeMethod activity which performs some action, that when it takes longer than 1 minute should be cancelled. Also this Trigger has 2 Writelines to check the executing times. The InvokeMethod has the flag RunAsynchronously set to true.

Both branches Action activities contain another WriteLine.

When I run the Workflow, I see the following:

12:24:47 Branch 1 started
12:24:47 Branch 2 started
12:25:47 Branch 1 ended
12:26:46 Exception on my client The request channel timed out while waiting (sendTimeout="

Request Error for WCF Restful Services


I see some request error after i deployed my WCF service to my dev server.

Request Error

The server encountered an error processing the request. See server logs for more details.


This is what i used in service.svc

Factory = "System.ServiceModel.Activation.WebServiceHostFactory" but i got this request error....


The complete web.config file i've now is

<?xml version="1.0" encoding="UTF-8"?>
    <compilation debug="true">
    <serviceHostingEnvironment aspNetCompatibilityEnabled="false">
        <add prefix="http://wdev.xyz.com/Services/xxx/" />

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Index was ou


Dear All,

I am using a client program(c#) which calls the web service.

I am getting the below error:

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Index was outside the bounds of the array.
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at KrtoPGMSSQLWebServiceClient.rtowebservice.Service.PostGreDataSync(String StrNonQuery, Byte[] byteRowTimestamp, String TableName, Int32 strUniId, String strRemoteCode)
   at KrtoPGMSSQLWebServiceClient.ManipDataExportClient.InsertManipData(DataSet ManipTablesDS) 

KrtoPGMSSQLWebServiceClient--is namespace name

ManipDataExportClient--is class name

InsertManipData--is function name (which calls the DataSet  ManipTablesDS)


I want to know that  whether i am getting this error at the time of calling web service or while accessing web service and why.

Plzzzz help me solve this...

Thank You

Context Correlation initializer / Request-Reply Correlation initializer

My guess is that these two correlation initializers are only useful for context based routing using the existing context bindings. However, it is not clear for me what is the main difference between them, and when I should use each one (the main scenario for them). Could someone provide more information about this ?

Pablo Cibraro - http://weblogs.asp.net/cibrax

Pick with receive/send reply behavior

Hi all,

I have this workflow (simplified view):

				<Receive CanCreateInstance="True"/>

The LongRunningActivity is a code activity which runs another workflow [through Task.Factory.StartNew(() => workflowApplication.Run())] and waits with a ManualResetEvent the completion of the inner workflow. The inner workflow contains other receive activities.
This is the Execute code of the LongRunningActivity CodeActivity:

WaitHandle waitHandle = new ManualResetEvent(false);
        // ...
        WorkflowApplication workflowApplication = new WorkflowApplication(definition);
        workflowApplication.Completed = args =>
        Task.StartNew(() => workflowApplication.Run());

When I run it, I have the same behavior:

Dialogs and ViewModel - Using Tasks as a Pattern

The ViewModel/MVVM pattern continues to gain popularity, with a blog post showing up every so often, and with tweets and retweets popping up even more often :-). At the same time, there are some interesting topics beyond the core pattern that continue to fuel experimentation. A big one amongst those is how should applications use dialogs when using the view model pattern.

The crux of the problem is the desire to keep the view model independent of UI concerns, and ensure it can be tested in a standalone manner, but that often comes to odds when you want the view model to launch a dialog, and/or do some work after the dialog is closed.

Prototype Design Pattern in C#. Vb.NET

Specify the kind of objects to create using a prototypical instance, and create new objects by copying this prototype

Adapter Design Pattern in C#, VB.NET

Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend