开发者

Silverlight WCF service

I am trying to upload a WCF(Service1.svc) to my godaddy hosting account. When I type in the address of the service(http://www.domain.com/Service1.svc) I get a 开发者_JS百科404 not found error. What I'd like to know is what are all the files I need to upload to get it working? Also what should my directory structure consist of?


For hosting a WCF service in IIS, you need:

  • a virtual directory
  • a *.svc file inside that virtual directory
  • the class library assembly with the WCF service in the "bin" directory under the virtual directory

That's about it!

Another SO question here also dealt with GoDaddy and hosting WCF in medium trust environments - seems you have to do some extra steps and stuff to get everything working, that would typically "just work" on a local install on a "on-premise" server.


Is your GoDaddy account configured for .NET 3.0 or 3.5? If they have not registered the scriptmaps for *.svc files, I believe IIS by default will not even serve files that do not have a registered mime type so you would get a 404 and not even the text of the .svc file.


I checked with GoDaddy and they confirmed that .Net 3.5 cannot be configured as full trust on their servers. Does this mean that Silverlight Apps consuming WCF services cannot work on GoDaddy?


The best thing to do is to use discountasp.com for hosting. It's only $10 per month and everything works with minimal effort.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜