Questions tagged [webhttpbinding]

165 questions
3
votes
2 answers

Error: Cannot obtain Metadata; using WCF Test client, C#, and trying to implement webhttpbinding and json

I'm getting the fabled Error: Cannot obtain Metadata from... message, particularly http://localhost:1640/Service1.svc I've scoured stackoverflow and Google and, so far, none of it has helped. I created a new product to dumb it down and it's still…
user717236
  • 4,959
  • 19
  • 66
  • 102
3
votes
1 answer

WCF Rest - mixing HTTP and HTTPS in one ServiceContract

I currently have a Http Rest WCF4 service, defined by the ServiceContract IEventService which is exposed only over HTTP. I have been tasked with making some of the OperationContracts to work only over HTTPS So I have split those methods into a…
Oliver Tomlinson
  • 565
  • 1
  • 4
  • 17
3
votes
1 answer

InstanceContextMode.Single in WCF wsHttpBinding,webHttpBinding and REST

I have recently started development on a relatively simple WCF REST service which returns JSON formatted results. At first everything worked great, and the service was quickly up and running. The main function of the service is to return a large…
Chris
  • 31
  • 1
3
votes
1 answer

WCF says it exceeds maximum query string value while it is not

I have a WCF service (over a webHttpBinding) using ASP.NET 4/IIS 8 and I had no problems communicating with it using JSON with GET. However, today I needed to implement a method that sends a large query string (about 3000 characters, not that long…
Can Poyrazoğlu
  • 33,241
  • 48
  • 191
  • 389
3
votes
1 answer

Implementing RequestWrapper for RESTful WCF service

I've written a simple object called RequestWrapper that contains single method of type: TResult WrapRequest(Func action) It wraps any action with try..catch, error handling, logging, database connection, transaction (commit &…
Tom Pažourek
  • 9,582
  • 8
  • 66
  • 107
2
votes
0 answers

WCF Windows authentication issue with REST service

I'm having some difficulty setting up a WCF service to run under Windows authentication. The service is only consumed via jQuery using ajax. IIS (version 6 on server 2003) is set to only allow Windows Authentication. web.config has the…
Chris Conway
  • 16,269
  • 23
  • 96
  • 113
2
votes
2 answers

How can basicHttpBinding, webHttpBinding & mexHttpBinding endpoints coexist in one WCF service

I have a WCF service (target .NET 4) and I need to expose 4 endpoints: SOAP, POX, JSON & MEX. My configuration file looks like this:
2
votes
1 answer

Can't add custom WebHttpBehavior: Cannot add two items with the same key

First a little bit of background: I have a REST service in WCF 4 that uses a WebHttpEndpoint. Rather than having explicit error handler in every service method, or even every service class, I'd like to have a centralized error handling that does…
kodbuse
  • 990
  • 2
  • 9
  • 20
2
votes
2 answers

Defining 'app.config' for a WCF service using WebHttpBinding

I've got a WCF service that allows the uploading of files without using a MessageContract. [OperationContract, WebInvoke(UriTemplate = "UploadFile?filename={filename}")] bool UploadFile(string filename, Stream fileContents); I'm allowed to use…
rafale
  • 1,704
  • 6
  • 29
  • 43
2
votes
2 answers

Timer inside a WCF Singleton hosted in a Windows Service (over webHttpBinding) dies unexpectedly

I have a WCF service hosted in a Windows Service (running under Local System). I am running a System.Timer inside it. The Operation o1, that initializes the Timer, is declared over a http endpoint over webHttpBinding. I enabled tracing for…
Varun S
  • 587
  • 4
  • 12
  • 25
2
votes
1 answer

Absolute fastest way to transmit tabular data out of SQL over HTTP using WebHttpBinding

What would be the fastest way to transmit SQL tabular data over HTTP using WCF endpoints? Right now I am querying Entity Framework with ESQL and then serializing the DataTable result into a byte[] and just sending that over, then deserializing on…
Sean Thoman
  • 7,429
  • 6
  • 56
  • 103
2
votes
1 answer

Streamed webHttpBinding is not streamed

I need create WCF REST service for uploading large files. I made endpoint as streamed webHttpBinding, but it have not became streamed. Service example: [ServiceContract] public interface IFiles { [OperationContract] void UploadFile(Stream…
vpp
  • 319
  • 1
  • 3
  • 10
2
votes
1 answer

Can WCF REST (WebHttpBinding) honor PROGRAMMATIC outputcache policies?

I know all about the AspNetCacheProfileAttribute. But is there any way to hook into the cache programmatically? I've tried using Response.Cache in global.asax which seems to set the correct client-side headers but the response is never cached on the…
roufamatic
  • 18,187
  • 7
  • 57
  • 86
2
votes
1 answer

WCF Rest 4.0, Dynamic Routing, and OutputCache

I'm having an issue getting OutputCaching to work with HttpContext.RewritePath for a WCF 4.0 WebHttp service. My service is localized. The idea is that you call a URL like so: /languageCode/ServiceName/Method e.g. /en/MyService/GetItems And it'll…
roufamatic
  • 18,187
  • 7
  • 57
  • 86
2
votes
2 answers

Can I call a WCF service without setting content-type?

I'm trying to replace a legacy REST/plain old xml web service with a WCF one using webHttpBinding. It MUST be backwards compatible with existing clients - which currently do not send a content-type header in the requests. When I point my clients at…
deltanine
  • 1,166
  • 1
  • 13
  • 25
1 2
3
10 11