WCF with GZipCompression - wcf

I am passing the data to front end via WCF and binding the data using jQuery binding. From WCF I need to pass large amount of data,so it takes so much time to load. By going through other posts I come to know that GZip could be used for this. But I am not aware of the process. Please do help me on this.
Thanks in advance

There are two common ways of compressing large output in WCF:
Configure IIS to use compression. First, the compression feature has to be included in your server's install (not the default). Second, you can use IIS manager, to find the "compression" feature and enable it, per app. MSDN has some good directions to describe each step. https://technet.microsoft.com/en-us/library/cc771003(v=ws.10).aspx
Configure WCF to use Mtom compression. This is set in your web.config, in the section <bindings><wsHttpBinding><binding messageEncoding="Mtom" .... This SO, article has some very good examples, with explanations, etc. Streaming with WCF and MTOM

Related

Depending on which parameters can config binding WCF

what is config The best For binding WCF in terms of closetimeout, buffer , send Time out and etc .the other words .Depending on which parameters can config binding WCF.
Your question is kind of hard to understand. There is not a given "best" binding configuration for all wcf services (in that case it would be the only one) - it all depends on your application and the requirements on your application!
Here are two good starting links on msdn:
(1) System.ServiceModel
(2) Binding
If you want speed I would go for netTcpBinding if it should serve over Internet if you don't need that named pipes could be an option.
Request / min? Depends on what your service does? But the architecture/binding will definitely server more then 200 request/min. See this blog post:
http://blog.shutupandcode.net/?p=1085

WCF alternative for no setting MaxReceivedMessageSize

I'm facing a classic issue MaxReceivedMessageSize in a WCF service but setting up this value according 99% of internet's suggestions is not an option for me. The project must be more secure as possible and changing this property we're vulnerable to a DoS attack.
Today the web method returns a large list of a specific object. So, we're thinking if the server could send several chunks of data. Is it possible? What could you recommend?
Thanks!
Yes. It is possible to send in chunks.
Refer - http://msdn.microsoft.com/en-us/library/ms733742(v=vs.110).aspx

WCF: File Transfer without using HTTP

Good day all.
I am completely new to WCF and Im learning as I am going.
I just would like to know, what are the best way of downloading or uploading files by getting it directly from disc and not via http.
Currently I am using WCF and http using the chunk way, but for a specific set of file I need to do it differently.Any tips, help or links will help me alot
When you transfer large files the best way to using “WCF service + HTTP”, we can use the following types of bindings:
wsHttpBinding
basicHttpBinding
Where do your clients reside? If the transfer is within the same network, you can take a look at this article. Otherwise, check this information on MSDN.

Implementing REST in WCF

I have a existing WCF in .NET which is consumed through wsdl and proxy classes. Soon, there will be multiple consumers and the load on the WCF will be pretty high. I was asked to develop a new WCF with REST which can be beneficial interms of performance. I don't have much knowledge on REST, hence can you please let me know whether implementing a RESTFUL WCF will improve the performance drastically? Please provide me any links to implement the same.
Thanks in advance,
Vinoth Khanna.S
You can also use WCF Data Services to easily offer a REST interface to your data.
The easiest way is to build an Entity Framework model of your data and then to expose that model as a WCF Data Service. This then exposes all data using the OData protocol, which is REST + AtomPub.
And Kiran is of course right, REST by itself does not increase performance. I assume that you want your UI to access the REST service directly rather than go through a web service which contains hand-written methods to read and write data. In that case, there may be some performance gain, but I wouldn't count on it much.
See also:
http://msdn.microsoft.com/en-us/library/cc668794.aspx
and
http://en.wikipedia.org/wiki/WCF_Data_Services
If you want to return results as JSON, the easiest way to get that to work is by adding the WCF Data Services Toolkit:
http://wcfdstoolkit.codeplex.com/
As far as I know REST is not for performance enhancement, it makes your webmethods URL accessible and make those URL's more predictable and logical. I would start with this video http://channel9.msdn.com/Events/PDC/PDC08/TL35 then with WCF REST Starter Kit http://www.asp.net/downloads/starter-kits/wcf-rest

S3 Amazon C# (SOAP vs REST)

If you were to create a professional application using S3 services, would you use their SOAP or REST interface (and why)? Assume using C# 3.5, VS2008, etc. (basically MS stack).
Thank you ahead of time for your response(s).
-Jessy Houle
I would use REST because it doesn't contain the additional XML markup that's sent with SOAP which means that it is more lightweight in comparison. REST is also used by most newer and/or larger web services (see Yahoo, entirely REST based). Another positive point on REST is that you use the 4 HTTP Verbs (GET, POST, PUT, DELETE) to manage URL representative entities which makes - in my opinion - the code and operations clearer.
If I were doing an S3 project in C#, I'd use an existing library like LitS3 to access Amazon's services. If I had to write my own code to access S3 I'd probably use REST; it's simpler and generally more efficient. The only reason to use SOAP would be if you wanted to use Amazon's WSDL to generate proxy classes in .NET. That can get you started more quickly if it works, but the extra abstraction can lead to problems later.
SOAP has problems with larger data sizes. There are workarounds, but they are clunky and inconvenient. This alone gets my vote for REST.