Making an Asyncronous call to WebService

Server Side Code

[WebMethod]

public String HelloWorld(string name)

{ return "Hello " + name; }

Client Side Code

public void TestHelloWorld_Async()

{

MyWebService.Service client = new MyWebService.Service(); client.HelloWorldCompleted += new HelloWorldCompletedEventHandler(this.ProcessAsyncCompleted);

client.HelloWorldAsync(“James Bond”);

}

private void ProcessAsyncCompleted(object sender, AuthenticateSenderCompletedEventArgs args)

{ object i = args.Result; }

The Control would come to ProcessAsyncCompleted after the execution of the webmethod.

 

Refer :-

http://weblogs.asp.net/gunnarpeipman/archive/2010/09/07/making-asynchronous-calls-to-web-services-during-asp-net-page-processing.aspx

Advertisements

Learning AppFabric

Interested in learning Windows Server AppFabric? I hope so. It will be the backbone of the on-premise version of BizTalk in the coming years and based on news out of the PDC it looks like it will be moving to Azure (in some form) as well.

There are many resources out there for learning Windows Server AppFabric. However, not all of them are equal and you can spend a lot of time meandering through material without making a lot of progress.

Below is my suggested path for coming up to speed on it with the least amount of effort. First, you need to be familiar with some foundation items:

  • There are new features in WCF 4.0. This whitepaper is a great way to become familiar with it: http://msdn.microsoft.com/en-us/library/ee354381.aspx
    • One thing to keep in mind is that not all of the concepts are that relevant to Windows Server AppFabric. Focus on the new configuration features if you don’t have a lot of time.
  • Also note that both of the whitepapers mentioned above have sections on Workflow Services. Workflow Services existed in .NET 3.5 but have been improved in .NET 4.0.
  • You must also understand IIS 7.0/7.5. If you are not familiar with it, head on over tohttp://learn.iss.net You’ll need to be familiar with things like Sites, ApplicationPools, Applications, AutoStart, Bindings, MSDeploy, hierarchical configuration with web.configs, etc.

Now you have the foundation you need to start learning about Windows Server AppFabric. This foundation is very important because if you don’t have it, you won’t be able to understand what Windows Server AppFabric is bringing to the table. It will also be more difficult to troubleshoot with out this foundation.

After you have the foundation items covered move on to learning about AppFabric itself:

That’s a lot of material. You will not be an expert after this but you should have a solid understanding of Windows Server AppFabric and be able to use it.

Data logging using Enterprise Logging App block.

One of my developer had been working for 3 days now to figure out the mechanism to write the logs into database using Logging Application Block 5.0.

So I had to look it,so that the issue would not linger anymore..

Following are the things I did to figure it out

  1. Downloaded the Enterprise library documentation from here and persused the section “Logging to a Database” under “The Logging Application Block”
  2. Got good insight on what to do, so followed the steps mentioned in the documentation.
  3. Stumbled on a generic “Activation error”, After researching online for a while, Realized that it is a known issue and I need to do the workaround as mentioned in the below links

http://entlib.codeplex.com/discussions/255380

http://entlib.codeplex.com/workitem/26903