views:

195

answers:

4

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 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?

+1  A: 

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.

marc_s
What is the difference between a virtual directory and a directory that I can create in on my hosting account?
Weston Goodwin
I would think your directory at your hoster would have to be a virtual directory already - otherwise you couldn't serve up web pages. A virtual directory is a structure that IIS knows about, it contains configuration info like what the default documents are, what permission are in place and so forth.
marc_s
+1  A: 

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.

Josh Einstein
.Net 3.5. I will check with them to see if scriptmaps have been registered.
Weston Goodwin
+1  A: 

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?

Rob
A: 

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

Weston Goodwin