Showing posts with label Orcas. Show all posts
Showing posts with label Orcas. Show all posts

Wednesday, February 20, 2008

Overcome slow performance with the initial WCF service load/call

So now when you are all set with "WCF service" deployment milestone :) do you experience slow performance on the initial call/load of the WCF service?
Yes, Scott mentioned in the .net roadmap one of the points of cold warmup perfomance fix this summer....till then Joel has this post which has attached warmup script files that overcomes this problem.

Refer his post to get attachments -
http://blogs.msdn.com/joelo/archive/2006/08/13/697044.aspx

HTH- Dipesh

Tuesday, February 19, 2008

Scott Gu's roadmap for .net 3.5

Congratulations to Scott Guthrie first on his new role and responsibilities... he is the man! :) btw, he is on a roll with his product roadmap of .net 3.5 this summer.

You can see details on his blog here but for sure some of these changes are huge, such as speeding up cold load of .NET applications by 25%-40%, improving WPF support...and so on.

Check this - http://weblogs.asp.net/scottgu/archive/2008/02/19/net-3-5-client-product-roadmap.aspx

Cheers - Dipesh

Convert existing asmx .net web service to WCF service in .net 3.0/3.5

If you are thinking what if i already have an existing web service .asmx which are exposed to existing clients already but still want to use the new technology infrastructure then you can do it really sweet. (why you would do that...must check new features of WCF on msdn:))

So if you have existing web service like this - http://mycompany/myWebservice.asmx
Steps to have clients use .asmx extension but behind scenes use powerful WCF here they are -
1> Decorate web service class name and web method with ServiceContract and OperationContract atrributes. For this you should add reference System.ServiceModel.dll assembly that is part of .net 3.5 framework. You can download .net 3.5 framework from to have WCF services run on your machines just fine.

Once you install you should found this installed in GAC.

here's how it looks-

using System.ServiceModel;

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]

[ServiceContract(Namespace="http://tempuri.org")]
public class myWebService : System.Web.Services.WebService
{
[WebMethod]
[OperationContract]
public string HelloWorld(string name)
{
return string.Format("Hello, {0}",name);
}
}

2> add this system.serviceModel section into your existing web.config of the asmx web service -




3> you can run the web service now and it should compile and run without issues with asmx extension but one more thing you would have to do to tell .net runtime to use WCF service runtime is add buildprovider under Compilation section.



4> Last but not the least modify your markup code .asmx to have something like this -% @ServiceHost language = "c#" Service="yourNamespace.ClassnameOftheService" %

This shuold help you up and running WCF service still keeping the existing asmx extension!

If you are done ...great! After i completed all the above steps i encountered pretty wierd errors saying -
Service 'myWebservice' has zero application (non-infrastructure) endpoints. This might be because no configuration file was found for your application, or because no service element matching the service name could be found in the configuration file, or because no endpoints were defined in the service element.

Reason - that was because my web.config had wrong endpoint service name reference.
service name="myWebService" behaviorConfiguration="returnFaults"

endpoint binding="basicHttpBinding" contract="myWebService"

Rectifying that helped...

If you still continue to get error you may also want to verify that you have your config file as web.config instead of app.config.

Hope that helps!

Here are few links for further information and references used here -
http://blogs.msdn.com/wenlong/archive/2007/09/18/how-to-use-asmx-extension-to-handle-wcf-requests.aspx

http://www.topxml.com/rbnews/WSCF/WCF/re-44738_Phased-Migration-From-ASMX-to-WCF.aspx

For more on WCF visit previous posts here - http://archdipesh.blogspot.com/search/label/WCF

Cheers - Dipesh

No Web methods visible in WCF service hosted...workaround

Well, one real good thing that i liked about WCF is the ease by which you get a new WCF service running real quick. The best part is that Microsoft has provided a code template with sample methods and contracts in VS 2008. You just hit Run button and you are good to go. However, with such ease i had few problems that i ran into. First of all i started creating a WCF web service project under Web which is pretty similar to ASMX style of coding. I am still to figure out why Microsoft has provided an option to create an WCF service library (a dll for web service...huh!) Regardless, if you just run the WCF service first time ...don't be afraid if you see NONE of your web methods listed in IE for the WCF service you just created. That's by nature...ofcourse there are workarounds by which you can intercept client messages inbound and outbound. Keith has showed us a way by which you can see your web methods and actually inspect soap body and envelope going through your client.

http://keithelder.net/blog/archive/2008/01/15/How-to-Get-Around-WCFs-Lack-of-a-Preview-Web.aspx

intial post on how to start writing your own WCF service and concepts look at this video on my previous post - http://archdipesh.blogspot.com/2007/12/creating-service-with-windows.html
HTH- Dipesh

Tuesday, July 03, 2007

Microsoft .NET Framework 3.5 June 2007 Community Technology Preview (CTP) release...

Microsoft .NET Framework 3.5 June 2007 Community Technology Preview (CTP) is here...
http://www.microsoft.com/downloads/details.aspx?FamilyID=E6FD8663-8B77-4649-8D36-3830E18528FA&displaylang=en

.NET Framework 3.5 builds incrementally on the new features added in .NET Framework 3.0, for example, Windows Workflow Foundation (WF), Windows Communication Foundation (WCF), Windows Presentation Foundation (WPF) and Windows CardSpace. In addition, .NET Framework 3.5 contains a number of new features in several technology areas. These new features have been added as new assemblies to avoid breaking changes. They include the following:

Deep integration of Language Integrated Query (LINQ) and data awareness. This new feature will let you write code written in LINQ-enabled languages to filter, enumerate, and create projections of several types of SQL data, collections, XML, and DataSets by using the same syntax.

ASP.NET AJAX lets you create more efficient, more interactive, and highly-personalized Web experiences that work across all the most popular browsers.

New Web protocol support for building WCF services including AJAX, JSON, REST, POX, RSS, ATOM, and several new WS-* standards.

Full tooling support for WF, WCF, and WPF, including the new workflow-enabled services technology.

New classes in .NET Framework 3.5 base class library (BCL) address the most common customer requests.
Time is ticking :) Cheers - Dipesh

Tuesday, May 08, 2007

Orcas Beta 1 VPC download...Step 1

Rock on Orcas Beta ... if you want to get started this is the starting point -

1> Download the Base image (one-time only): VSCTPBase.exe (1.12 GB)

2> Download all parts of the Visual Studio Code Name Orcas Beta 1. The first part is a self-extracting EXE and will prompt for the other parts. Find the download for OrcasBeta1VSTS_VPC_8PartsTotal.part01.exe here - (700 MB)

http://www.microsoft.com/downloads/details.aspx?FamilyId=36B6609E-6F3D-40F4-8C7D-AD111679D8DC&displaylang=en

Find the steps to follow on the above URL as well to get your VPC working... no install needed. Get going now!

Thanks - Dipesh

Thursday, March 01, 2007

Visual Studio Orcas March CTP released...

Welcome March...

Microsoft Pre-release Software Visual Studio Code Name "Orcas" - March 2007 Community Technology Preview (CTP) is available here...

http://www.microsoft.com/downloads/details.aspx?familyid=b533619a-0008-4dd6-9ed1-47d482683c78&displaylang=en&tm

Monday, February 05, 2007

LINQ - To be integrated with VS "Orcas"

Hi - I just read that LINQ is going to be integrated with VS "Orcas". You can watch the video posted by Scott here - http://www.scottgu.com/blogposts/video/linqtalk1.wmv or you can download it from here - http://www.scottgu.com/blogposts/video/linqtalk1.zip

Note that i made while reading was that you can use LINQ to write queries against varied multiple data sources like - SQL database, XML files or even the web service call.
You can check this implementation that supports LINQ calls to Amazon web service.

http://weblogs.asp.net/fmarguerie/archive/2006/06/26/Introducing-Linq-to-Amazon.aspx

Cheers - D

Thursday, October 19, 2006

Microsoft Visual Studio Code Name "Orcas" Community Technology Preview - Development Tools for .NET Framework 3.0

Get the support you need to build .NET Framework 3.0 applications using the final released version of Visual Studio 2005. These tools are provided as an early preview of technology being considered for the Orcas release of Visual Studio. Check here: http://go.microsoft.com/?linkid=5574918

Keep exploring... :)