3

creating my first webservice and need some assistance. i'm trying to create a web service to send data on a machine that doesn't have IIS. I have seen examples of this on msdn Host web service outside IIS.

My question so far is the address for the web server as the one in the example uses Http://localhost/WSEHostedWebService, i'm not sure what to use here as there is no web application or even IIS running on the intended machine. Should this point to a directory on the intended machine i.e. c:\webservice\myFirstService.asmx ?

Beamo
  • 47
  • 1
  • 6
  • Doesn't it say? soap.tcp://localhost/TestService – Paul Zahra Apr 07 '14 at 08:17
  • yes, you are correct, don't know how i missed that. Thanks – Beamo Apr 07 '14 at 08:56
  • You do not want to use this example. You should never use WSE (Web Service Enhancements). That is a very obsolete technology. You should use WCF, which is quite capable of being hosted in a Windows Service, with no difficulty (and not being obsolete and unsupported). – John Saunders Apr 07 '14 at 14:57

1 Answers1

4

To quote them "The following code example creates a Windows service named WindowsServiceToHostASMXWebService that hosts a Web service named Service at the soap.tcp://localhost/Service endpoint." - Try saying that fast with a mouth full of water :D

Anyhoo, unless you specifically need ye olde worlde asmx service do it in a WCF web service inside a windows service instead read this and this other link with example

As the link above says WCF handles the HTTP stuff outside of IIS anyhow.

Community
  • 1
  • 1
Paul Zahra
  • 9,522
  • 8
  • 54
  • 76