wcf

What is client base class , how to use it?

Hi All, I am just curious to know that what is ClientBase class in WCF, and how can i use it. I surfed the internet and i found that this class is used to create proxies to call service methods , but no example. Please anyone explain it with example , it will help me undestand this class... ...

WCF MessageContract Inheritance

Hi there, I am fairly new to WCF and just have a question on how to correctly get MessageContract inheritance working. A simplified version of my setup is as follows - a "base" message type, and then another "test" message which inherits from it. [MessageContract] public abstract class BaseMessage { } [MessageContract] public class Te...

implement serviceThrottling options in silverlight application

I am a beginner in Silverlight. I have developed a Silverlight chat application. In a single Silverlight window open more than one chat windows every chat window create a connection with wcf service but when it reaches 10 then the application is stop working and break all communications from wcf polling duplex service. I already have con...

How to declaratively implement custom IAuthorizationPolicy in WCF?

I have a WCF service that is hosted in IIS. I want to use my own IAuthorizationPolicy, and have it configured in the web.config file on the server. I have my auth policy: namespace MyLib.WCF { public class CustomAuthorizationPolicy : IAuthorizationPolicy { public CustomAuthorizationPolicy() { this.I...

WCF UserName authentication and fault contracts

I have a WCF service configured to use custom UserName validation via the overriden Validate() method of the System.IdentityModel.Selectors.UserNamePasswordValidator class. All methods of the contract have been decorated with the FaultContractAttribute to specify a custom SOAP fault as being returnable. When throwing FaultException<T>,...

IIS7 and ARR and WCF... Can we load balance our app servers?

Perhaps I have the wrong product in mind for our needs -- but I want to know if I can use Application Request Routing (ARR) in IIS7 to load balance requests for our application tier. We have a farm of web servers. Each will be running our MVC web application. We load balance these servers through our web application firewall and loa...

CrossDomainError on same domain

Hello, I'm learning to build Silverlight 3 apps using WCF to communicate with the back end. We are going to deploy to IIS7 on Server2008 or Vista. The client binaries as well as the web service binaries are all located in the same IIS web directory. When I hit the service front page (http://localhost/MyService.svc) it returns just fi...

Getting an http 400 error on calling a restful wcf service using http post

I have setup a wcf service. Unfortunately, when I call the service over fiddler, the web, or whereever, I get an http 400 error. I am really perplexed at where to start to solve this problem. Any suggestions are appreciated. WSDL is not an option at this time. REST is a requirement. I was able to make calls previously using GET, ho...

How do you create/obtain a cross domain policy for an iis7 wcf service?

The missing link in my IIS7 + Silverlight 3.0 + WCF Service app is the cross domain policy. Are there any instructions on how to create/obtain such a policy. I understand that there are two xml files that need to go in the web root of the app. What do I put in them, how do I format them, does some template exist which indicates which ...

CrossDomainError with very libearl client access policy

Is it just me or shouldn't the following client access policy allow anyone to do anything? <?xml version="1.0" encoding="utf-8" ?> <access-policy> <cross-domain-access> <policy> <allow-from http-request-headers="*"> <domain uri="*" /> </allow-from> <grant-to> ...

Bad response (400) with a WCF streaming service configured programmatically.

Hi, this if my first attempt at using streaming for WCF, and I am struggling with the dreadful "The remote server returned an unexpected response: (400) Bad Request" response. The trace viewer says that this is a System.ServiceModel.ProtocolException with message "There is a problem with the XML that was received from the network. See...

Silverlight: How to setup ServiceReferences.ClientConfig when placed inside xap

I'm using a wcf service with my silverlight application. The location of the wcf service is stated in the ServiceReferences.ClientConfig file, and have to be changed to location where the application is installed. However this file is included in the xap file, and is not something that can be easily changed when the application is de...

WCF Service Endpoint taking different Request / Response

I'm using Framework 3.5 and would like to have a ServiceContract that can take in different types of Request / Response objects, is it possible? ...

wcf pollingduplex connection limit in silverlight 3.0

Hi I have build a silverlight application for message service. my problem is silverlight application disconnect after 10 connection. But i want it unlimited or thousands. I have spent a lot of time on this problem. some point about my application as: I have build 3 prject like silverlight project, web project, wcf service project. Im...

WCF Web Service Fails on Receive with Large Data

I am calling a WCF Web Service locally (or remotely) that is working fine with small amounts of data (about 25 lines of < 1K of data ea). But when the data gets larger (about 300 lines) the web service fails. Below is the Exception, Inner Exception, and Stack Trace from the Inner Exception. The service also seems to be taking unusually...

CrossDomainError on IIS7 Silverlight 3 WCF app

* Readers Beware: massive code dump, not for the faint of heart... * Hello, I'm trying to figure out how to deploy a Silverlight 3 app to IIS7 with a WCF Service. I think i've got most of it figured out however I still get a cross domain error for some reason. I'm leaning toward thinking that the service is not finding the client acc...

WCF use original domain object instead of proxy generated

I have a Client website, a WCF service and a library of domain objects (.cproj). I want the client to use my library of domain objects directly, not the proxy generated version of the domain objects. Is there a simple way of doing this? ...

FirstOrDefault() type error on return?

A RIA Domain service has this method... public virtual CmsDealer GetCmsDealer(string id) { return this.Context.CmsDealerSet.FirstOrDefault(p => p.Id == id); } The Wcf service has this... public CmsDealer GetDealer(string id) { return domainservice.GetCmsDealer(id); } When called with a nonexistent Id, the GetCmsDealer() cal...

Easy way to replicate web page across machines?

I am trying to replicate a browser page to another browser on another machine. I basically want to reproduce a page exactly how it appears to a customer for viewing by the website owner. I have done this before using some impersonation trickery, but found that it would throw the session state out of wack when the site owner would switc...

How to host a WCF service in a web application with netNamedPipeBinding and WAS on Windows Vista

I am trying to host a WCF service with netNamedPipeBinding in a web applicaion on a Vista machine. I enabled the non-HTTP service activation as described in this article: http://msdn.microsoft.com/en-us/library/ms731053.aspx I configured the service as follows: <endpoint address="net.pipe://myservice" binding="netNamedPipeBinding" bi...