Take a look at this article if you want security and authentication with your wcf rest service. http://www.codeproject.com/KB/WCF/WCFJsonRestHttpSecureRole.aspx
After spending months looking for the best of ASP.NET MVC and WCF I finally stumbled upon http://blogs.msdn.com/b/endpoint/archive/2010/01/06/introducing-wcf-webhttp-services-in-net-4.aspx , which directed me to this.
Had I not relied upon Intellisense too quickly I could have had a RESTful WCF service ready to go within 5 minutes.
Four stars only because there's not much press about this, but there should be (right? <= -1 star). The site linked above only includes 10 of the 'promised' 12 parts, and comments have been disabled on older posts.
No updates since before the RTM release of .NET 4 and VS 2010 also makes me a little nervous.
Hi! I'am triying to controll al the errors produced y the application but I don't know if its because Im using the WCF Rest Service Template but I implemented IErrorHandler but when an error occurs the error handler doesn't fire. I talk a little more about the problem here:
http://stackoverflow.com/questions/10794990/ierrorhandler-doest-trigger-using-wcf-restful-template-40
Any idea?
It's related with the endpoints. I think by default only works when using localhost/appname under default web site. This my provide some tips: http://keithelder.net/blog/archive/2008/01/17/Exposing-a-WCF-Service-With-Multiple-Bindings-and-Endpoints.aspx. Currently I'm exploring the best approach and struggling with between 3.5 and 4.0 implementation variations.
I may have found the issue.
I found it here
http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/2ec269e3-c1ff-4d9b-9ff3-d530f1599047
This thread discribes the behavior of the Rest Templates on IIS 6, but I found the solution to work on windows 7 IIS also.
After 5 days of searching.
Same problem. I have created web service and tried to deploy it on IIS 7 on server, but it is giving me error. Reply, if you have any solution about how to deploy WCF REST Service on IIS7.
Try registering iis with dot net framework 4.0 <a href="http://msdn.microsoft.com/en-us/library/k6h9cz8h(v=vs.80).aspx"/> this should be done %windir%\Microsoft.NET\Framework\{version}\aspnet_regiis -ir
Hello,
I have recently developed a web service using the WCF REST Service Template 40. Nothing much to the service, simply queries a db table and returns the results. However, queries that should return a large amount of records return nothing, just a blank page. I know this is probably because the max size is being exceeded, but I can't seem to find where I can change this property.
I have tried editing the standardEnpoints tag, but no luck. Anyone know where I can set the size and/or max objects in graph?
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<standardEndpoints>
<webHttpEndpoint>
<!--
Configure the WCF REST service base address via the global.asax.cs file and the default endpoint
via the attributes on the <standardEndpoint> element below
-->
<standardEndpoint name="" helpEnabled="true" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" automaticFormatSelectionEnabled="false" />
</webHttpEndpoint>
</standardEndpoints>
</system.serviceModel>
I just ran into this myself. You have to set the MaxItemsInObjectGraph on the ServiceBehavior. I did it in code...
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall,
MaxItemsInObjectGraph = 6553600)]
Hi, I'm trying to consume my rest services from another project to create client proxy classes, but I don't know how to do this with this template. Ultimately I would like to do this on my debug instance only and when publishing the services for release there is no meta data endpoint.