From: "Steven Cheng" on 20 May 2010 04:00 Hi Adrian, Regarding on the performance(response time) difference between WCF service and traditional ASMX webservice one, I think you can try the following tests for further measurement: ** The configurtaion of the NetTcpBinding has enabled reliableSession, you can turn off it to eliminate additional overhead. Is the WCF tracing still enabled? If so, also turn it off. ** WCF basicHttpBinding provides the compatible binding element stack for working with traditional ASMX webservice. Therefore, it is also a good comparing reference to setup a basicHttpBinding based endpoint and compare the performance result with the ASMX webservice one. Sincerely, Steven Cheng Microsoft MSDN Online Support Lead Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: msdnmg(a)microsoft.com. -------------------- >From: "Adrian Tarjoianu" <adrian(a)usoffice.fareportal.com> >Subject: Re: hosting WCF service - netTcp binding - Server Application Unavaila >Date: Wed, 19 May 2010 10:12:08 -0400 > >Hi Steven, > >I have enabled the tracing but the issue is not reproducing anymore. Strange >enough. > >I have one more question: >I have converted a web service with WCF and I have configured it to work on >net.tcp, but it takes longer to transfer the same amount of data. >Before it took it around 10 sec and now it takes it around 17. > >Here is the web.config file content. Could you please tell me what should I >disable/enable in order the data to be transfered faster? > ><?xml version="1.0" encoding="UTF-8"?> ><!-- > Note: As an alternative to hand editing this file you can use the > web admin tool to configure settings for your application. Use > the Website->Asp.Net Configuration option in Visual Studio. > A full list of settings and comments can be found in > machine.config.comments usually located in > \Windows\Microsoft.Net\Framework\v2.x\Config >--> ><configuration> > <configSections> > <sectionGroup name="system.web.extensions" >type="System.Web.Configuration.SystemWebExtensionsSectionGroup, >System.Web.Extensions, Version=3.5.0.0, Culture=neutral, >PublicKeyToken=31BF3856AD364E35"> > <sectionGroup name="scripting" >type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, >Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> > <section name="scriptResourceHandler" >type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, >System.Web.Extensions, Version=3.5.0.0, Culture=neutral, >PublicKeyToken=31BF3856AD364E35" requirePermission="false" >allowDefinition="MachineToApplication" /> > <sectionGroup name="webServices" >type="System.Web.Configuration.ScriptingWebServicesSectionGroup, >System.Web.Extensions, Version=3.5.0.0, Culture=neutral, >PublicKeyToken=31BF3856AD364E35"> > <section name="jsonSerialization" >type="System.Web.Configuration.ScriptingJsonSerializationSection, >System.Web.Extensions, Version=3.5.0.0, Culture=neutral, >PublicKeyToken=31BF3856AD364E35" requirePermission="false" >allowDefinition="Everywhere" /> > <section name="profileService" >type="System.Web.Configuration.ScriptingProfileServiceSection, >System.Web.Extensions, Version=3.5.0.0, Culture=neutral, >PublicKeyToken=31BF3856AD364E35" requirePermission="false" >allowDefinition="MachineToApplication" /> > <section name="authenticationService" >type="System.Web.Configuration.ScriptingAuthenticationServiceSection, >System.Web.Extensions, Version=3.5.0.0, Culture=neutral, >PublicKeyToken=31BF3856AD364E35" requirePermission="false" >allowDefinition="MachineToApplication" /> > <section name="roleService" >type
From: Adrian Tarjoianu on 20 May 2010 15:57 Hi Steven, The thing is that I transfer DataSets and DataTables and because I cannot define DataContracts on them ASMX is faster. Do you have any workaround solution for this scenario? Adrian ""Steven Cheng"" <stcheng(a)online.microsoft.com> wrote in message news:PDssIK$9KHA.1612(a)TK2MSFTNGHUB02.phx.gbl... > Hi Adrian, > > Regarding on the performance(response time) difference between WCF service > and traditional ASMX webservice one, I think you can try the following > tests for further measurement: > > ** The configurtaion of the NetTcpBinding has enabled reliableSession, you > can turn off it to eliminate additional overhead. Is the WCF tracing still > enabled? If so, also turn it off. > > ** WCF basicHttpBinding provides the compatible binding element stack for > working with traditional ASMX webservice. Therefore, it is also a good > comparing reference to setup a basicHttpBinding based endpoint and compare > the performance result with the ASMX webservice one. > > Sincerely, > > Steven Cheng > > Microsoft MSDN Online Support Lead > > > Delighting our customers is our #1 priority. We welcome your comments and > suggestions about how we can improve the support we provide to you. Please > feel free to let my manager know what you think of the level of service > provided. You can send feedback directly to my manager at: > msdnmg(a)microsoft.com. > -------------------- >>From: "Adrian Tarjoianu" <adrian(a)usoffice.fareportal.com> >>Subject: Re: hosting WCF service - netTcp binding - Server Application > Unavaila >>Date: Wed, 19 May 2010 10:12:08 -0400 > >> >>Hi Steven, >> >>I have enabled the tracing but the issue is not reproducing anymore. > Strange >>enough. >> >>I have one more question: >>I have converted a web service with WCF and I have configured it to work > on >>net.tcp, but it takes longer to transfer the same amount of data. >>Before it took it around 10 sec and now it takes it around 17. >> >>Here is the web.config file content. Could you please tell me what should > I >>disable/enable in order the data to be transfered faster? >> >><?xml version="1.0" encoding="UTF-8"?> >><!-- >> Note: As an alternative to hand editing this file you can use the >> web admin tool to configure settings for your application. Use >> the Website->Asp.Net Configuration option in Visual Studio. >> A full list of settings and comments can be found in >> machine.config.comments usually located in >> \Windows\Microsoft.Net\Framework\v2.x\Config >>--> >><configuration> >> <configSections> >> <sectionGroup name="system.web.extensions" >>type="System.Web.Configuration.SystemWebExtensionsSectionGroup, >>System.Web.Extensions, Version=3.5.0.0, Culture=neutral, >>PublicKeyToken=31BF3856AD364E35"> >> <sectionGroup name="scripting" >>type="System.Web.Configuration.ScriptingSectionGroup, > System.Web.Extensions, >>Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> >> <section name="scriptResourceHandler" >>type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, >>System.Web.Extensions, Version=3.5.0.0, Culture=neutral, >>PublicKeyToken=31BF3856AD364E35" requirePermission="false" >>allowDefinition="MachineToApplication" /> >> <sectionGroup name="webServices" >>type="System.Web.Configuration.ScriptingWebServicesSectionGroup, >>System.Web.Extensions, Version=3.5.0.0, Culture=neutral, >>PublicKeyToken=31BF3856AD364E35"> >> <section name="jsonSerialization" >>type="System.Web.Configuration.ScriptingJsonSerializationSection, >>System.Web.Extensions, Version=3.5.0.0, Culture=neutral, >>PublicKeyToken=31BF3856AD364E35" requirePermission="false" >>allowDefinition="Everywhere" /> >> <section name="profileService" >>type="System.Web.Configuration.ScriptingProfileServiceSection, >>System.Web.Extensions, Version=3.5.0.0, Culture=neutral, >>PublicKeyToken=31BF3856AD364E35" requirePermission="false" >>allowDefinition="MachineToApplication" /> >> <section name="authenticationService" >>type="System.Web.Configuration.ScriptingAuthenticationServiceSection, >>System.Web.Extensions, Version=3.5.0.0, Culture=neutral, >>PublicKeyToken=31BF3856AD364E35" requirePermission="false" >>allowDefinition="MachineToApplication" /> >> <section name="roleService" >>type >
From: "Steven Cheng" on 24 May 2010 06:49 Hi Adrian, As for DataSet, it seems .NET 3.5 add binary serialization for it so as to improve serialization performance since for text message encoding cases, large dataset will be converted from binary byte to text format which will increase the data size. Also, when using binary format serialization, you also need to change the message encoding type from text to binary or Mtom of your binding. Here is a former thread mentioned transfering large dataset in WCF: #Passing 3MB DataSet via WCF - Best Practice http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/088d0c74-6568-4496- 8bfa-4ccf3a1ea851 Sincerely, Steven Cheng Microsoft MSDN Online Support Lead Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: msdnmg(a)microsoft.com. -------------------- >From: "Adrian Tarjoianu" <adrian(a)usoffice.fareportal.com> >References: <BCC221F8-ED87-48F5-9ED4-E05BD94CC605(a)microsoft.com> <JrNONZq6KHA.2348(a)TK2MSFTNGHUB02.phx.gbl> <OUbr#Nd8KHA.3176(a)TK2MSFTNGP05.phx.gbl> <llU7aVo8KHA.6008(a)TK2MSFTNGHUB02.phx.gbl> <89BB80BD-11E3-4B03-9D9C-A10F4A27A2FA(a)microsoft.com> <PDssIK$9KHA.1612(a)TK2MSFTNGHUB02.phx.gbl> >In-Reply-To: <PDssIK$9KHA.1612(a)TK2MSFTNGHUB02.phx.gbl> >Subject: Re: hosting WCF service - netTcp binding - Server Application Unavaila >Date: Thu, 20 May 2010 15:57:47 -0400 > >Hi Steven, > >The thing is that I transfer DataSets and DataTables and because I cannot >define DataContracts on them ASMX is faster. > >Do you have any workaround solution for this scenario? > >Adrian > >""Steven Cheng"" <stcheng(a)online.microsoft.com> wrote in message >news:PDssIK$9KHA.1612(a)TK2MSFTNGHUB02.phx.gbl... >> Hi Adrian, >> >> Regarding on the performance(response time) difference between WCF service >> and traditional ASMX webservice one, I think you can try the following >> tests for further measurement: >> >> ** The configurtaion of the NetTcpBinding has enabled reliableSession, you >> can turn off it to eliminate additional overhead. Is the WCF tracing still >> enabled? If so, also turn it off. >> >> ** WCF basicHttpBinding provides the compatible binding element stack for >> working with traditional ASMX webservice. Therefore, it is also a good >> comparing reference to setup a basicHttpBinding based endpoint and compare >> the performance result with the ASMX webservice one. >>
From: Adrian Tarjoianu on 27 May 2010 13:44 Hi Steven, As per this thread, there are not any solution for transfering big DataSets/DataTables via WCF. Excluding the schema is not a solution. Also, because I use NetTcpBinding protocol I cannot change the serialiazer type. Do you have any other solutions? Thank you, Adrian ""Steven Cheng"" <stcheng(a)online.microsoft.com> wrote in message news:ergtd7y%23KHA.2348(a)TK2MSFTNGHUB02.phx.gbl... > Hi Adrian, > > As for DataSet, it seems .NET 3.5 add binary serialization for it so as to > improve serialization performance since for text message encoding cases, > large dataset will be converted from binary byte to text format which will > increase the data size. Also, when using binary format serialization, you > also need to change the message encoding type from text to binary or Mtom > of your binding. Here is a former thread mentioned transfering large > dataset in WCF: > > #Passing 3MB DataSet via WCF - Best Practice > http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/088d0c74-6568-4496- > 8bfa-4ccf3a1ea851 > > Sincerely, > > Steven Cheng > > Microsoft MSDN Online Support Lead > > > Delighting our customers is our #1 priority. We welcome your comments and > suggestions about how we can improve the support we provide to you. Please > feel free to let my manager know what you think of the level of service > provided. You can send feedback directly to my manager at: > msdnmg(a)microsoft.com. > > -------------------- >>From: "Adrian Tarjoianu" <adrian(a)usoffice.fareportal.com> >>References: <BCC221F8-ED87-48F5-9ED4-E05BD94CC605(a)microsoft.com> > <JrNONZq6KHA.2348(a)TK2MSFTNGHUB02.phx.gbl> > <OUbr#Nd8KHA.3176(a)TK2MSFTNGP05.phx.gbl> > <llU7aVo8KHA.6008(a)TK2MSFTNGHUB02.phx.gbl> > <89BB80BD-11E3-4B03-9D9C-A10F4A27A2FA(a)microsoft.com> > <PDssIK$9KHA.1612(a)TK2MSFTNGHUB02.phx.gbl> >>In-Reply-To: <PDssIK$9KHA.1612(a)TK2MSFTNGHUB02.phx.gbl> >>Subject: Re: hosting WCF service - netTcp binding - Server Application > Unavaila >>Date: Thu, 20 May 2010 15:57:47 -0400 > >> >>Hi Steven, >> >>The thing is that I transfer DataSets and DataTables and because I cannot >>define DataContracts on them ASMX is faster. >> >>Do you have any workaround solution for this scenario? >> >>Adrian >> >>""Steven Cheng"" <stcheng(a)online.microsoft.com> wrote in message >>news:PDssIK$9KHA.1612(a)TK2MSFTNGHUB02.phx.gbl... >>> Hi Adrian, >>> >>> Regarding on the performance(response time) difference between WCF > service >>> and traditional ASMX webservice one, I think you can try the following >>> tests for further measurement: >>> >>> ** The configurtaion of the NetTcpBinding has enabled reliableSession, > you >>> can turn off it to eliminate additional overhead. Is the WCF tracing > still >>> enabled? If so, also turn it off. >>> >>> ** WCF basicHttpBinding provides the compatible binding element stack >>> for >>> working with traditional ASMX webservice. Therefore, it is also a good >>> comparing reference to setup a basicHttpBinding based endpoint and > compare >>> the performance result with the ASMX webservice one. >>> >
From: "Steven Cheng" on 31 May 2010 23:13
Hi Adrian, So even if you set the DataSet to use binary serialization format the speed is still not quite good? Have you tried different hosting approaches such as using self-hosting (in a console application) or move to a different server to see whether there is any difference? Generally speaking, since WCF netTcpBinding naturally use binary encoding and DataSet (can be set to use binary serializer), the problem should not be no worse than the asmx webservice which use text based encoding on DataSet. Have you tried using some network tracing tools like netmon or tcp trace to capture the data transferred at the transport layer to get the actual binary data size sent over wire? Sincerely, Steven Cheng Microsoft MSDN Online Support Lead Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: msdnmg(a)microsoft.com. -------------------- >From: "Adrian Tarjoianu" <adrian(a)usoffice.fareportal.com> <ergtd7y#KHA.2348(a)TK2MSFTNGHUB02.phx.gbl> >In-Reply-To: <ergtd7y#KHA.2348(a)TK2MSFTNGHUB02.phx.gbl> >Subject: Re: hosting WCF service - netTcp binding - Server Application Unavaila >Date: Thu, 27 May 2010 13:44:29 -0400 > >Hi Steven, > >As per this thread, there are not any solution for transfering big >DataSets/DataTables via WCF. >Excluding the schema is not a solution. Also, because I use NetTcpBinding >protocol I cannot change the serialiazer type. > >Do you have any other solutions? > >Thank you, >Adrian > >""Steven Cheng"" <stcheng(a)online.microsoft.com> wrote in message >news:ergtd7y%23KHA.2348(a)TK2MSFTNGHUB02.phx.gbl... >> Hi Adrian, >> >> As for DataSet, it seems .NET 3.5 add binary serialization for it so as to >> improve serialization performance since for text message encoding cases, >> large dataset will be converted from binary byte to text format which will >> increase the data size. Also, when using binary format serialization, you >> also need to change the message encoding type from text to binary or Mtom >> of your binding. Here is a former thread mentioned transfering large >> dataset in WCF: >> >> #Passing 3MB DataSet via WCF - Best Practice >> http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/088d0c74-6568-4496- >> 8bfa-4ccf3a1ea851 >> >> Since |