wcf

How can I use integrated Windows Authentication when debugging locally with Visual Studio

I'm using RESTful WCF services to serve data to a client. The application hosting the services requires integrated Windows Authentication on the server, making testing locally in Cassini quite difficult. I use the following behavior configuration for my service, which works great when deployed to IIS with Integrated Security turned on. ...

Can I automatically change the name of the autogenerated wcf proxy?

When I add a Service Reference to my project in Visual Studio, it autogenerates a proxy to the service called ServiceNameClient. I really don't like that naming scheme. Is there a way to change it to something like ServiceNameProxy? I can rename the class myself in the autogenerated code, but any time I add new features to the service...

System.DBNull with data contract name not expected in WCF

I have an object array that I am passing to a WCF call that has DBNull.Value as one of the values. WCF is apparently choking on it because it doesn't know how to serialize it. Googling it only shows people who replaced the DBNull.Value with something else. Do I have to do that, or is there a way for me to have DBNull.Value on the clie...

Where do I specify proxy credentials in my WCF client?

I have created a WCF client using channel factory. But I am not able to connect to a server in another machine. I am getting a (407) Prxy Authentication Required exception. WSHttpBinding wsBinding = new WSHttpBinding(); wsBinding.BypassProxyOnLocal = true; EndpointAddress endpoint = new EndpointAddress("http:/...

WCF WebService content type error in IIS

Hi, I have a WCF Webservice that returns a bank list from database, when I use IIS server I get the message "Cannot process the message because the content type 'text/xml; charset=utf-8' was not the expected type 'application/soap+xml; charset=utf-8'.". And when I use self hosting (application console) to run the WS, works without error...

How To Limit a WCF Service Application, So That Only Unique Clients Can Access

i have a wcf service in c# (like the calculatorservice from msdn examples), and i was wondering is it possilble to limit it to serve only 1 client per IP? i want the possibility of a few IPs to be connected at once (at least 5-6 active sessions), and that works for now, but i don't want more than 1 connection per unique IP (or unique co...

Duplex Service in asp.net

I have a duplex service and i'm using silverlight for the functionality of inserting values and retrieving values.The first thing i want to know is: when i add a new endpoint for example wsdualhttpbinding,then my service doesn't work.It doesn't give any error but it neither retrieves nor inserts the values. Second thing is if any one c...

How To Make WCF Sessions More Secure?

let's say we have a WCF service like the one from msdn examples -- c#, calculatorservice, with all the service settings on default. if i were a hacker and i knew that calculatorservice was something important, that i want to make it stop working, i could simply hack the code for service references and make an application of my own that ...

wcf and web service compatiblity

I have a web service that is used by many different clients using many different languages. I want to switch it to wcf to take advantage of the many different endpoints. However what has been stopping me is that I am afraid that the clients will have to use a special sdk to connect (if they are using java or php or some other language)...

Simulating Application in WCF

In my code I check to see if a file exists and store it in the Application object in asp.net. Later on I access this boolean to do something in my web service. Now I want to rewrite my web service in wcf and things are different here. The application object does not exist. What is the best way to do this task: On web site application...

Calling a web service that uses session state in wcf

I have a web service that calls another web service that uses session state. Now I am rewriting the web service and making it WCF. I am having some confusion on how to call my web service from my wcf service. Here is the code as it exists now: [WebMethod(EnableSession = true] public string MyWebServiceCall() { string result; My...

Restlet ClientResource Post Chunked Encoding - WCF Unsuported

Hello All, I'm developing a product that will use extensively of Restlet for consume WCF Rest Services. I had created a method to post a XML of a class containing 2 attributes. Restlet post my xml with Transfer-Encoding: chunked, and my WCF service, can't to interpret posted content, unfortunately WCF continues can't to deserialize my ...

Named pipe not found when using WCF netNamedPipeBinding

I am the developer of a WCF service. My test clients work very well with it. But when it comes to real clients (using the same client proxy), it fails. The same WCF service works with netTcpBinding, this error occurs only with netNamedPipeBinding, even with ConcurrencyMode = ConcurrencyMode.Single Here is the exception There was no ...

Client calls .asmx, Server exposes WCF endpoint

We have a client that has been configured to connect to an asmx service. We don't want to ask our customers to update their configuration, but we would like to upgrade our service to use WCF. Does anyone know if WCF supports this? If so, what would the configuration file look like? Our asmx service looks like this: <bindings> <bindi...

WCF + REST: Where is the request data?

I'm currently developing a WCF RESTful service. Within the validation of the POST data, I am throwing exceptions if the request XML does not conform to our business rules. The goal is to send an e-mail to the appropriate staff if a request comes in that considered invalid. But, along with the incoming request headers, method and URI, ...

How set Two values in one Name with UriTemplate?!!

I created this code: [OperationContract] [WebGet(UriTemplate = "detect?v=1.0&q={q}", BodyStyle = WebMessageBodyStyle.Bare)] DetectLanguage GetDetectLanguage(string q); [OperationContract] [WebGet(UriTemplate = "translate?v=1.0&q={query}&(langpair={from}|{to})", BodyStyle = WebMessageBodyStyle.Bare)] TranslateLanguage GetTranslateLangua...

WCF proxy generated from WSDL, proxy method returns null.

I've generated a WCF proxy from a WSDL file, but now when I call the proxy methods, they return null. I've enabled message logging, and can see that the messages from the server are correctly returned. I've checked the answer of this question, but in my case at least the name of the returned object was the same in the message and in the...

How to set WCF security to require client certificate?

I have WCF service. I demand clients to authenticate with certificate. This is service configuration: <system.serviceModel> <services> <service name="FilmLibrary.FilmManager" behaviorConfiguration="FilmService.Service1Behavior"> <endpoint address="manager" name="certBinding" binding="basicHttpBinding"...

Entity Framework WCF

[OperationContract] [WebGet(RequestFormat = WebMessageFormat.Json)] public List<DataModal.Employee> GetCustomers() I want to return list of employee which is Entity Model object type. How they can be serialize by default or need to write some code. I am using jquery. ...

wshttpbinding support in silverlight 4

Does silverlight 4 beta supports wshttpbinding (wcf)? If not, will it be supported in stable release? ...