wcf

Unit test break/assert lockin up WCF service?

I am trying to write some unit tests (more integration tests actually) to hit a live IIS server hosting my WCF service. Whenever I run a test though, if one of my Assert statements fails on the client side, my WCF service seems to lock up- and I have to do an iisreset to get things back online. For example, I have in a test method 3 ca...

WCF client proxy for ASP .NET client

I need some advice on what's the best way to create WCF client proxy wrapper for ASP .NET client. I want to work equally well with ObjectDataSource control with no extra coding and also when I need to manually call WCF service to get some data. I basically have come up with two models, but I'd like to know which is is more efficient. He...

IE 8 partially cut of my JSON data return from WCF service

Hi All, I am using treepanel and custom treeloader and call the ajax request when click the node. It is working fine in both IE and FF. But today we found out that if node have only one child (return only one record base on parent node id), then IE does not show child node. Same thing happening in Combo store as well if service return o...

WCF service stream byte array size issue

Hi Guys, I have a WCF service that returns a stream object. But for some reason i get a corrupt zip file back which i am streaming. All the code is below Please advise Contract Code [ServiceContract(Namespace = "http://schemas.acme.it/2009/04/01")] public interface IFileTransferService { [OperationContract(IsOneWay = false)] F...

Streaming wcf service returning corrupt streamed file

Hi Guys, I have a WCF service that returns a stream object. But for some reason i get a corrupt zip file back which i am streaming. All the code is below Please advise Contract Code [ServiceContract(Namespace = "http://schemas.acme.it/2009/04/01")] public interface IFileTransferService { [OperationContract(IsOneWay = false)] F...

Consuming a secure WSE2.0 / .Net 1.1 WebService using .Net 3.5 and VS 2008.

Please forgive any mistakes in this question. I am not overly familiar with secure web services or WCF. I need to consume a web service that uses WSE 2.0 and .Net 1.1. The service is secured in two ways. An X509Certificate and a BinarySecurityToken added to the header. I have code samples as to how to consume this Web Service when usi...

CPU usage goes upto 75% while stream a 300 MB file using WCF service

Hi, I have a wcf service that is used to download files. Its working alright (finally), but i can see that when it downloads the CPU usage goes around 75%. Please advise Client Code FileTransferServiceClient obj = new FileTransferServiceClient(); Byte[] buffer = new Byte[16 * 1024]; CoverScanZipRequest req = new CoverScanZipRequest(...

WCF service contract design. Is a use case controller appropriate?

First off, apologies if this question has been asked before but I couldn't find anything that answers this directly. Here's my problem. I've inherited a product which has been designed to be so flexible that populating pretty much every combobox and textblock on the (silverlight) form requires a service request. Some of the screens ta...

How to replace standard wcf help page with a custom one?

Hello, I have created a wcf service (.net 3.5, it uses wsHttpBinding and hosts on IIS), and when i'm trying to hit the service from the browser i see standard help page 'you have created a service'. I don't want to see it. Instead of it i would like to see some custom page. I tried to use httpHelpPageUrl property, but with no luck. It j...

WCF SSL certificate validation error

Trying to get the simple Hello World (via SSL) working but receiving a following error: The remote certificate is invalid according to the validation procedure. The server App.config is: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <behaviors> <serviceBehaviors> <...

WCF method throws an exception of maximum items in an object graph is '65536'

I get an exception when there are too many objects returned: The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://.../Contract:GetBlaBlaResult. The InnerException message was 'Maximum number of items that can be serialized or deserialized in an object ...

SL3 to Java Spring-ws project - .net experts out there?

Hi, I'm new to Silverlight and am trying to connect my SL3 client to a Java Spring-ws(Web Service) project. The Spring-ws project I'm using specifically is the sample tutorial. I'm having trouble when I want my Spring Web Service project to return a value. The generated Service Reference classes use System.ServiceModel.DuplexClientBa...

wcf client through proxy

hay all. maybe you have an answer i have a client that need to go to my service but he is using proxy server, i have problem with the ssl connection. i have read a lot of answers, but what do i have to use in the end? <system.net> <defaultProxy useDefaultCredentials="true" > </defaultProxy> </system.net> or something else ? thank...

WebService: How to return an array of a complex type?

2 Questions really, and I'm not sure if I'm doing this right or not... I want to send back an array of some sort for an Entity object I created. I'm not really sure how to mark it for sending (what attributes are needed or whatever), and I'm not really sure how to send it back (IList, List, Collection, ICollection). Ideally I'd love to...

WCF Service Reference in ASP.net Page - When to Dispose?

I have an ASP.net page that is creating a service reference to a WCF service and making calls in multiple places in my page. I instantiate the service reference in Page_Load and have an instance variable to store it: private FooClient _serviceClient; protected void Page_Load(object sender, EventArgs e) { _serviceClient = nwe FooCli...

Custom WCF Binding Suppresses Fault

I have a WCF Service which I am calling asychronously. If I call a method that throws a normal .Net Exception (i.e., not a FaultException) using wsHttpBinding, my WCF Channel is left in a faulted state - this is the expected behavior. However, if I call the same method using a custom binding: <customBinding> <binding name="httpComp...

How would you centralize configuration across multiple projects?

I have a solution with about 10 projects with read-only config. They are web applications, windows services, console apps, etc. All projects except for one are on the same server. Each project has 3 environments - dev, test, and production. So there are 30 different sets of configuration, each one with a decent number of settings. I...

How to set and map a Method in the Service file with endpoint elements and binding elements

Hi all, I have created a service file like OSService.svc in that i have two methods like one is FileUpload and FileDownload for e.g :- [WebInvoke(UriTemplate = "/fileupload/{fileName}", Method = "POST")] [OperationContract] void FileUpload(string fileName, Stream fileContents); same as Filedownload also. People you may know these meth...

WCF WebHttp Services .NET 4.0 web page unavailable when browsing to a method in service. Running on development web server in VS 2010

I've built a WCF Service in .NET 4.0 that basically just does standard CRUD to a couple of tables on a MS SQL Server 2005 database. I'm using an ADO .NET Entity Data class to map to the database tables. So far, this has been really simple. I've just pulled the tables onto the design surface and let the tool do the work for me. Here's...

How configure NHibernate 3.0 current session for WCF

I'm trying to configure NHibernate 3.0 to use ISessionFactory.GetCurrentSession() in WCF 4. What do you recommend I use? ...