wcf

Setting WCF Endpoint address at runtime?

Hey, If I have the following: WSHttpBinding binding = new WSHttpBinding(); EndpointAddress endpoint = new EndpointAddress(new Uri("http://xxx:pppp/MyService")); MyServiceClient client = new MyServiceClient(binding, endpoint); How can I set the endpoint bindingConfiguration? If it helps my app.config is set to: <endpoint address...

A TCP error (10055: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full) occurred while transmitting data.

Apparently i start getting this error if i try to transfer any file over 50 mb, I am using WCF, need help urgently. I have webservices written in Java / tomcat. could it be that problem in serverside configurations. The server is tom cat , can you tell me which value to customize in that case <bindings> <basicHttpBinding> <binding...

WCF - Beginners question on Address (of ABC)

Hi Team, I am new to WCF. Following is a question on WCF. Suppose, I have a service defined as follows. The host has two addresses. I usually click on the base address http://.... to generate proxy. When the proxy is generated, will it have address of http alone? How can I generate a proxy with net.tcp. Is there any article that ...

Clear text username password authentication in Wcf over https

My question may be very silly but here it is. I went through this question. jassuncao has suggested to use custom binding created Yaron Naveh. Now that it is not a very secure way of authentication, my question is, what if I use Yaron's custom binding and put my service behind https? Will it still be unsecured? ...

WCF chunking/streaming - make it transparent for client

While developing WCF service i've faced problem of transferring large data as method params (> 4 Mb of raw size, not considering transfer/message overhead). The solution for this problem is to use chunking or streaming, but all the samples i've seen assume client is aware of used method and uses available block size for sending/receivin...

Accessing web Service from jQuery - cross domain

Hi I am trying to acess a wcf service from a jQuery client Specifically this example http://www.codeproject.com/KB/aspnet/WCF_JQUERY_ASMX.aspx#4 All works well when the client webpage is on the same domain as the service As soon as I move the client webpage to another domain it breaks. It cant reach the service and the request fails ...

How can i initialise a server on startup?

Hey all, I need to make some connections on startup of a server. I'm using the wcf technology for this client-server application. The problem is that the constructor of the server isn't called at any time, so for the moment, i initialize the connections when the first client makes a connection. But this generates problems in a further p...

Real world example wcf with rest and soap end points

Hi guys I've been looking around for good wcf samples which expose both WCF and REST endpoints with end to end examples and I am having a bit of trouble finding anything concrete. There are a lot of samples which say you can do this or you could do that, but nothing that really seems to bring it all together. For instance, I'm looking...

What is a good pattern for binding a collection of objects coming from WCF, in Silverlight?

Hi there, I've got a question about a Silverlight WCF Databinding pattern: There are many examples about how to bind data using {Binding} expressions in XAML, how to make async calls to a WCF service, set the DataContext property of a element in the UI, how to use ObservableCollections and INotifyPropertyChanged, INotifyCollectionChang...

Castle WcfFacility - Service Behaviors

How do I use the Castle WcfFacility and have it use the standard Wcf config file settings? If I register like so: container.Register( AllTypes.Pick() .FromAssemblyNamed("{ServicesAssembly}") // <-- service assembly here .If(type => type.Name.EndsWith("Service")) .WithService.FirstInterface() .Configure(configurer => con...

WCF COM+ component

I have a C# WCF client that is wrapped for COM+ Enterprise Services. I install the component on the target machine and use regsvcs to put it into Component services. My question is, where will it look for it's configuration file, as it is running under the dllhost process rather than a regular exe? ...

UriTemplateTable not distinguishing verbs

I have trying to design a REST service in .NET 3.5 with WCF REST Contrib. My service is nearly working fine, but I am facing a bizarre error. Basically, I have two methods: [WebInvoke(UriTemplate = "/books?id={identity}", Method = "PUT")] public string InsertBook(string identity, Book book) { // snipped } and [WebInvoke(UriTemplate...

WorkFlow and WCF dynamically launching WorkFlows

I have a WF which will be hosted on WCF . The service Contract will contain a single operation containing two parameters. Parameter1 will be a string and will contain the name of the workflow to invoke and parameter two will contain the input for the invoked Work Flow. All operations will take the same parameter. All the operations will ...

How to configure multiple WCF binding configurations for a single scheme

I have a set of IIS7-hosted net.tcp WCF services that serve my ASP.NET MVC web application. The web application is accessed over the internet. WCF Services (IIS7) <--> ASP.NET MVC Application <--> Client Browser The services are username authenticated, the account that a client (of my web application) uses to logon ends up as the curre...

Custom tool warning: An item with the same key has already been added.

I added a Service Reference for a WCF project; I had over a hundred endpoints in my ServiceHost web.config, and all my development was going slowly, so I decided to trim it down for now. I also decided to change the namespace while I was at it, so I just deleted the service reference. The delete failed with an out of memory exception, s...

Only root object on request is deserialized when using Message.GetBody<>

I am attempting to create a wcf service that accepts any input (Action="*") and then deserialize the message after determining its type. For the purposes of testing deserialization I am currently hard-coding the type for the test service. I get no errors from the deserialization process, but only the outer object is populated after des...

Entity Framework and WCf

Hi I am little confused on designing WCf services with EF. When using WCf and EF, where do we draw this line on what properties to return and what not to with the entity. Here is my scenario I have User. Here are the relations. User [1 to many] Address, User [ 1 to many] Email, User [ 1 to many] Phone So now on the webform, on pa...

How to validate HTTP request headers before receiving request body using WCF

I'm implementing a REST service using WCF which will be used to upload very large files. The HTTP headers in this request will communicate information which will be validated prior to allowing the upload to proceed (things like permissions, available disk space, etc). It's possible this validation will fail resulting in an error respon...

Return <bar>foo</bar> instead of <string>foo</string> in WCF rest method

I have a REST web method in .NET 3.5: [OperationContract] [WebInvoke(UriTemplate = "", Method = Verbs.Get)] public string GetBar() { return "foo"; } The response gets formatted as <string>foo</string> while I would prefer <bar>foo</bar> instead. Does anyone know how to do that? I feel I am missing something obvious. ...

wcf and windows authentication

I like to use wcf (windows communication foundation) with windows authentication. Do I need Active directory for this purpose? How the server knows about the identity of the client? If someone can found out the pass of the client that is using the wcf services, can he create the same user name on different computer and use the passwor...