0

I have a .NET 4.0 WebService written in C#. My IIS installation (under Windows Seven) is IIS 7.5.xxx.

When I compile my web service and the libraries that it uses, I can get assemblies in the bin directories in the respective projects. I would like to understand how to manually place these assemblies in my web service so that the web service can run. Is it just a matter of putting assemblies in the bin directory of the WebService directory where my Application is set? I also think that, somehow, the Web.Config needs some care.

I know there is a procedure to publish the web service, but I would like to know how this can be done just without using Visual Studio and all its stuff.

Andry
  • 16,172
  • 27
  • 138
  • 246
  • all that Visual Studio 'publish' does is copy selected output files from the build destination into a target directory structure. You can get exactly the same results if you separately build using Visual Studio, then copy the files manually. – paul Oct 16 '12 at 12:33
  • @paul: that's actually not true. Publish may use MSDEPLOY for instance. – John Saunders Oct 16 '12 at 12:34
  • @johnsaunders sorry - in the context of publish using FileSystem/Ftp, not WebDeploy/FPSE – paul Oct 16 '12 at 12:35

1 Answers1

2

Well, what have you tried?

Yes, dumping the bin folder in an IIS application, where that application contains a web.config that's been set up to host a service that's present in an assembly in your bin folder will do the trick.

CodeCaster
  • 147,647
  • 23
  • 218
  • 272
  • Yeah, you are right, actually I still have not tried, I was looking in the Internet to find some tutorials but could not find anything manually done. Before starting my adventure, I wanted to know if I could spare time, also I use some libraries, how to do with external libs? – Andry Oct 16 '12 at 12:32
  • All assemblies you have references to need to be present in the GAC or in the bin directory. – CodeCaster Oct 16 '12 at 12:33
  • I am going to try then. If it is that easy... Also if I have multiple libraries right? just put them in the bin of the IISApp? Gonna try it... – Andry Oct 16 '12 at 12:37
  • 1
    Yes. WCF will scan the assemblies in the bin folder for the contract (i.e. the interface or class) you specified for the service(s) in your web.config. – CodeCaster Oct 16 '12 at 12:38