开发者

RESTful WCF issue (C#, .net 4)

开发者 https://www.devze.com 2023-02-05 16:41 出处:网络
Im using this example as a guide: http://geekswithblogs.net/michelotti/archive/2010/08/21/restful-wcf-services-with-no-svc-file-and-no-config.aspx

Im using this example as a guide: http://geekswithblogs.net/michelotti/archive/2010/08/21/restful-wcf-services-with-no-svc-file-and-no-config.aspx

I've created the site by following that example and it works fine in local development (VS 2010). Once I deploy to my server (Windows 2008 R2, IIS 7) it tells me it's not found (404).

Is there a setting in IIS that Im missing? I have it set up exactly like regular web entry.

Has anyone ever run int开发者_开发百科o something like this?

Thanks!


I did have the same problem, but mine was fixed two different ways.

Here's something the helped someone else.

http://gavinmckay.wordpress.com/2009/11/19/wcf-rest-url-request-returns-a-404-error/

What I had to do was register my .svc with the aspnet_isapi.dll. Is the web.config the same from the dev to the dev to the live? Here is something that helped me when I had the problem.

http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=system.servicemodel.activation.httphandler#hl=en&sugexp=cvnsp&xhr=t&q=system.servicemodel.activation.httphandler+404&cp=46&qe=c3lzdGVtLnNlcnZpY2Vtb2RlbC5hY3RpdmF0aW9uLmh0dHBoYW5kbGVyIDQwNA&qesig=FPklr06GKixh8RzVUhGeMw&pkc=AFgZ2tnJmb62PSadHk0EeL7JnMVlC1N0pzvVZ8d3Yv35KKr-_WLSYnmhnATpDDbT6g_8nFr5PtwZapoLs1SnXYwRZ8_SLnNtBg&pf=p&sclient=psy&aq=f&aqi=&aql=&oq=system.servicemodel.activation.httphandler+404&pbx=1&fp=25a0b2344dc0e416

Hope these links help.


Check that your app pool hosting the service uses .NET 4 and integrated pipeline. Also check that WCF 4 handlers are registred in IIS - ServiceModelReg.exe tool.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号