1

I've developed a WCF service that exposes both BasicHttp and WebHttp (REST) endpoints, with a view to hosting it in IIS but I'm now swaying towards a windows service instead. On the whole it looks like a fairly straightforward task to convert what I've done to a Windows service, but is there anything likely to catch me out?

In particular will it still support both my bindings and any nuances that go with them, especially the REST stuff like the various [WebInvoke] attribute options?

Also, in my current (IIS) implementation I've enabled cross domain script access on the WebHttp binding config (crossDomainScriptAccessEnabled="true"), and have also implemented some code in Global.asax to allow cross domain ajax calls from within Chrome browsers (see http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/c412e600-0f4e-4a5b-8c45-bf77ed04f2a8). Where would I put the latter in a Windows service?

Many thanks in advance

Andy

Andrew Stephens
  • 9,413
  • 6
  • 76
  • 152

1 Answers1

1

Never mind, sorted now. It was fairly straightforward to convert to a Windows service. Regarding the cross domain stuff I had to implement a custom behavior to support CORS.

See: CORS Support within WCF REST Services

and: http://blogs.microsoft.co.il/blogs/idof/archive/2011/07.aspx

Community
  • 1
  • 1
Andrew Stephens
  • 9,413
  • 6
  • 76
  • 152