wcf-rest

WCF 4 Rest Service on IIS Developer Express, Authentication Issue.

When I host the "WCF 4 Rest Service Template" project (from template) in IIS Developer Express I get the following: IIS specified authentication schemes 'IntegratedWindowsAuthentication, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM,...

WCF REST : returning classes and rules / Pascal/Camel case for fields?

Hi there, Can anyone tell me the recomemended case (pascal or camel) for returning classes with fields... For example, the example that comes with vs 2010 uses Pascal Case like so // TODO: Edit the SampleItem class public class SampleItem { public int Id { get; set; } public string StringValue { get; set; } } Notice first cap...

WCF REST: Maximum number of strings which can be passed in a webInvoke method?

Here is the code below I tried this call but it didnt work... even if the function inside this call is empty i tried this exact function call with only 5 input parameters and it worked? Something is fishy here hopefully someone can suggest and if you have anyway i can minimize this code meaning the parameters passes im open for suggesti...

exception while using SerializeReply of IDispatchMessageFormatter

I am trying to develop a WCF REST app as explained in http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/04640a45-1a37-4722-8ed7-9f75c155dc14 (which serves both XML and JSON at the same time). the error is in the return statement of the following code: Public Function SerializeReply(ByVal messageVersion As System.ServiceModel.Cha...

C#: Proper way to copy HttpQueryString parameters?

A little background: I'm using the WCF REST Starter kit, and I'm creating a wrapper for a specific API I'm consuming. There are common query string parameters that I need to pass whenever I hit any of the exposed methods, such as an API key. To me, it would be easier to make such common parameters a part of the wrapper class. Then I cou...

Consuming WCF Rest 4 From ASP . NET

Hey, I am a complete ASP .NET newbie. I've written a set of web services using the WCF 4 Rest Starter Kit. I call everything from within a Flash application but I want to write a quick and dirty admin panel for myself to use which has no need to be written in Flash. I figure it will be faster to get this up and running in ASP. So the q...

WCF REST deployment Error: "Resource Does not exist"

I am trying to access http://localhost/tempservicehost/tempservice.svc and I am getting the following error: Error Description: 'Resource does not exist' This may be because an invalid URI or HTTP method was specified. Please see the service help page for constructing valid requests to the service. The funny thing is t...

Force DTD ignore when using WCF REST Starter Kit ReadAsXmlSerializable?

I'm using the WCF Rest Starter Kit, and I'm able to send and receive data. I'm trying to serialize the data I receive from the service, but for whatever reason, the XML reponse from the service includes (what I'm guessing is) an invalid DTD. For example: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE response> <response> // blah blah...

WCF Rest/Entity Framework - View Not Deserializing as expected

I have a view that returns data like the following: 1 | Abita | NULL | http://www.abita.com/ 2 | Abita | Abbey Ale | http://abita.com/brews/abbey_ale.php I am using WCF REST to get the xml representation of this view, via an entity framework object. When viewing the returned data as xml in a browser, the first row shows data as I expe...

Passing private data through a WCF OperationContract method?

Assume I have a method in my WCF Service implementation called Login and it is defined as follows: [OperationContract] [WebGet(UriTemplate="login/{username}/{password}")] bool Login(string username, string password); Obviously, passing something like http://localhost:80/login/user1/pass1 is not very secure, so how is the is normally h...

WCF REST : Case insensitive Query String Parameters, suggested naming convention - use underscore or ???

Hi there, It appears the query string parameters you can pass to a rest method in WCF REST is case insesitive - actually this makes sense. What the best naming convention for parameters with 2 words, using an _ (underscore) ?? I never liked this, i prefered to use camelCasing but if its insensitive what other options to do i have? for...

Returning HttpStatus codes with message from WCF Rest service that IParameterInspector AfterCall can handle

So then, I've got a number of methods in a a couple of services that I've decorated with a custom attribute. That attribute uses the ApplyDispatchBehavior from IOperationBehavior to attach to the method and the BeforeCall and AfterCall methods from IParameterInspector to do some processing before and after the service method is called. ...

ASP.NET 4 WCF RESTful Service

I was wondering about the possibility of two things: Is it possible to use a WCF Data Service to expose "collections" that do not exist in the Entity Model (EDMX) that it is mapped to? Would this be a case where interceptors would make sense? How would one go about creating a WCF RESTful service without having to install the WCF Rest...

Windows Username in WCF 4 Rest

I'm having difficulty with Windows authentication in a WCF REST app. Using VS2010, I chose New Project>WCF REST Service Application. I modified the web.config to assure windows authentication and deny anonymous users. <system.web> <compilation debug="true" targetFramework="4.0" /> <authentication mode="Windows" /> <author...

WCF Rest Client with WebChannelFactory

Maybe I am not understanding this so hopefully someone can explain this to me. I am writing a WCF REST service (lets call it RestProj). RestProj has a dependency to the RestProj.DataAccess dll which houses all of the data access layer and to the WCFRestContrib dll. I have another project that contains all of the Rest parameters (data...

How can I return bare result back to WCF client

I have code something like the following: <OperationContract()> <Description("")> <WebGet(Bodystyle:=WebMessageBodyStyle.Bare, UriTemplate:="TestConnection")> Function TestConnection() As String Public Function TestConnection() As String Implements ITestSvc.TestConnection WebOperationContext.Current.OutgoingResponse.ContentType = ...

Getting debug output from WCF 4 REST Template

I'm trying to see the exception that's being thrown in my WCF service but all I get from the response is: "The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) o...

Raw socket listening to a REST Channel in Silverlight

I understand how I can use a raw socket to listen to a server application and recieve information but I need an easy to access API and I am very familiar with REST. Is there a way to push (not by using long pooling) data using a WCF service? Here's my idea of how things should happen, at least at the begining: The client accesses a U...

SILVERLIGHT: How to access a restful service from silverlight

Hi. What is the standard way of accessing a restful service from silverlight (I am targetting v3 of silverlight)? In .net i use REST Starter KIT but its not compatible with Silverlight - although i did find a port but unsure weather to try it. Is there a standard way to access rest from silverlight? Any good examples or tutorials? A...