Launching a .NET web service without installing the .NET framework

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi guys,

I have written a web service, but I want clients to be able to consume it
without having the .NET framework installed on their PC. The web service
doesn't return any values; it is just used to record requests: a user can
send their personal ID to the web service, and this is stored in a database.
Is is possible to launch this request from a hyperlink? What other options
have I got in terms of launching this service from a machine that does not
have the .NET framework installed?

Thanks in advance for your help,

Steve.
 
You can communicate with a .NET service using several protocols, the most
common being:

a) HTTP GET
b) HTTP POST
c) SOAP

You can issue a web service request pretty easily using HTTP GET within a
web page using the following syntax:

<a
href="http://[Server]/[ServiceName].asmx/[MethodName]?arg=somedata">submit
data by clicking here</a>

example:
<a
href="http://localhost/WebApplication2/Service1.asmx/DoSomething?arg=somedata">test</a>

If you want to use HTTP GET or HTTP POST then you need to enable a web
service to allow communication over HTTP GET and HTTP POST because they are
disabled by default for the 1.1 version of the framework. You can enable the
HTTP GET protocol for web services by uncommenting the following "HtttpGet"
line from your server's machine.config file:

<webServices>
<protocols>
<add name="HttpSoap1.2"/>
<add name="HttpSoap"/>
<!-- <add name="HttpPost"/> -->
<!-- <add name="HttpGet"/> -->
<add name="HttpPostLocalhost"/>
<add name="Documentation"/>
</protocols>
<webServices>

You can also call a web service using javascript and the Microsoft.XMLHTTP
component to invoke a web service.
http://dotnetjunkies.com/WebLog/davetrux/archive/2004/06/16/16745.aspx

Theres also an IE only option using the Web Service Behavior:
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/webservice/overview.asp

HTH,
Jorge
 
Jorge,

Thanks very much for your help! I particularly like the first method using
the HTTP Get, since it is browser independent. I actually tried this before,
but didn't realise that I needed to edit the machine config to get it to
work, and couldn't understand what was going wrong! So, your advice has been
very helpful!

Many thanks, and have a great weekend!

Steve.

Jorge L Matos said:
You can communicate with a .NET service using several protocols, the most
common being:

a) HTTP GET
b) HTTP POST
c) SOAP

You can issue a web service request pretty easily using HTTP GET within a
web page using the following syntax:

<a
href="http://[Server]/[ServiceName].asmx/[MethodName]?arg=somedata">submit
data by clicking here</a>

example:
<a
href="http://localhost/WebApplication2/Service1.asmx/DoSomething?arg=somedata">test</a>

If you want to use HTTP GET or HTTP POST then you need to enable a web
service to allow communication over HTTP GET and HTTP POST because they are
disabled by default for the 1.1 version of the framework. You can enable the
HTTP GET protocol for web services by uncommenting the following "HtttpGet"
line from your server's machine.config file:

<webServices>
<protocols>
<add name="HttpSoap1.2"/>
<add name="HttpSoap"/>
<!-- <add name="HttpPost"/> -->
<!-- <add name="HttpGet"/> -->
<add name="HttpPostLocalhost"/>
<add name="Documentation"/>
</protocols>
<webServices>

You can also call a web service using javascript and the Microsoft.XMLHTTP
component to invoke a web service.
http://dotnetjunkies.com/WebLog/davetrux/archive/2004/06/16/16745.aspx

Theres also an IE only option using the Web Service Behavior:
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/webservice/overview.asp

HTH,
Jorge


Steve Barker said:
Hi guys,

I have written a web service, but I want clients to be able to consume it
without having the .NET framework installed on their PC. The web service
doesn't return any values; it is just used to record requests: a user can
send their personal ID to the web service, and this is stored in a database.
Is is possible to launch this request from a hyperlink? What other options
have I got in terms of launching this service from a machine that does not
have the .NET framework installed?

Thanks in advance for your help,

Steve.
 
Back
Top