RE: Create WebService without Visual Studio?

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Tu-Thach (TuThach_at_discussions.microsoft.com)
Date: 12/09/04


Date: Thu, 9 Dec 2004 07:03:05 -0800

All you need is an .asmx file and the [WebMethod] attribute to define your
Web service:

Your asmx file can look like this:

<%@ WebService Language="C#" Class="Util" %>
    using System;
    using System.Web.Services;
    public class Util: WebService
     {
       public int Add(int a, int b)
       {
          return a + b;
       }
    
       [ WebMethod]
       public long Multiply(int a, int b)
       {
          return a * b;
       }
   }

If you want to store your code inside a .cs file, then bring it out of your
asmx file. Then, compile the .cs file as a dll and put both the asmx file
onto IIS application and the dll inside the bin/ directory of your
application.

"localhost" wrote:

>
> Can anyone provide any pointers or sample code on how to create/code a
> web service without using Visual Studio? I would like to make a
> single-file .cs class library with all the plumbing it needs to be a
> web service - it will be hosted in IIS.
>
> Thanks.
>
>
>



Relevant Pages

  • Re: Webservice IP address trouble in device emulator
    ... Can the web service be accessed via another machine on the network (not ... Check the XP firewall is not blocking port 3220 if it is, ... I don't *think* pocket IE could render the ASMX file anyway, ... "Could not establish connection to network". ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Tutorial for Web Service
    ... Get wsdl from asmx file by typing something like following in the ... Use WSML file to compile source for dll - this will produce ... proxy class that is similar to the class defined in the .asmx file. ... Web service. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Web Service Question
    ... You need to copy asmx file and asmx.cs file over to where you want to ... I am using VS 2005 and am testing my first web service. ... move the asmx file and App_Code directory to that library the .dll file is ... is set to compile a debug version, Visual Studio creates a project .pdb ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Help with Deployment!
    ... >> I have a web service running fine on my dev machine, ... >> When I try to deploy it to a client, when I browse the ASMX file, I just ... >> If I look at the mappings under IIS configuration, ... >> This machine is windows xp, not a server. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Webservice IP address trouble in device emulator
    ... Can the web service be accessed via another machine on the network (not ... Check the XP firewall is not blocking port 3220 if it is, ... I don't *think* pocket IE could render the ASMX file anyway, ...
    (microsoft.public.dotnet.framework.compactframework)