RE: webservice to expose existing app functionality

From: Dan Rogers (danro_at_microsoft.com)
Date: 12/20/04


Date: Mon, 20 Dec 2004 22:53:48 GMT

Hi David,

I see some issues you're going to have to face.

First off, if you want to use ASP.net hosted under IIS as a way to expose
and manage your web services, then you need to create a web service project
to manage that interface. You could create an empty project if you like
as well, and then manually do all of the things that the web service
project wizard does for you (e.g. set up a vroot, set the application
settings, link the project to the vroot for deployment testing purpose,
etc).

The next problem you face is making the service running under a headless
IIS setting find your console application. As a rule, a console
applicaiton makes a poor multi-user server because the console application
typically requires that a user be logged in, have a winsession, and be able
to interact with the desktop. Crossing that secure user boundary between
the IIS sand-box (a good thing) and your application server will require
that you engineer some sort of communication layer so that your web service
code can access the instance of the data you are interested in.

Something to consider is creating a windows service project, and hosting
your data structure there (again headless). You would still need to make
your data management applicaiton have a communication layer so that you can
control/interact with the service from your new console application. The
benefit is that once you refactor your app in this way, you will have the
protocol you need to expose query/etc from your web service.

Think of the web service itself as a separate hosted appliction responsible
for dispatching requests to your data service.

Alternatly, you could write a web server/method dispatcher/security/soap
layer into your own application, but this is likely the harder path.

I hope this helps

Dan Rogers
Microsoft Corporation
--------------------
>From: david.mcshane@terminalfour.com (Davey)
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
>Subject: webservice to expose existing app functionality
>Date: 20 Dec 2004 07:56:52 -0800
>Organization: http://groups.google.com
>Lines: 27
>Message-ID: <791b99c2.0412200756.3be0463a@posting.google.com>
>NNTP-Posting-Host: 217.33.79.126
>Content-Type: text/plain; charset=ISO-8859-1
>Content-Transfer-Encoding: 8bit
>X-Trace: posting.google.com 1103558212 20899 127.0.0.1 (20 Dec 2004
15:56:52 GMT)
>X-Complaints-To: groups-abuse@google.com
>NNTP-Posting-Date: Mon, 20 Dec 2004 15:56:52 +0000 (UTC)
>Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.s
ul.t-online.de!t-online.de!news.glorb.com!postnews.google.com!not-for-mail
>Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.aspnet.webservices:27303
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
>
>hi all,
>I have a c# socket server application (console application) that is
>responsible for maintaining an array of objects. The server does lots
>of things but alot of it relates to the array of objects.
>I want to add functionality to the server app by exposing some of the
>methods as webservices. The webservices would allow other apps to get
>info on the list etc..
>The problem is that I am using visual studio, and I cant seem to
>create a webservice without creating a new webservice project within
>my solution.
>But if I create a new webservice project, how can I access the array
>managed by the main app???
>
>
>i..e
>+ Solution
>| __ + ConsoleApplication (Main app)
> MyArrayList managing state
> Other functions
>|
>|__+ Webservice Project
> AddToMyArrayList()
> RetrieveMyArrayList()
>
>is this kind of set up possible?
>Thanks
>dave
>



Relevant Pages

  • Re: Web service testing
    ... To test if my code was faulty or not, I back-ported the web service to a standard 2.0 web service using Visual Studio 2005. ... The service is run under IIS on a Windows 2003 server, so there are no server side connection limits that can explain this. ... ASP.NET webservice application. ... In addition, since the problems occur at client, you can use Visual studio ...
    (microsoft.public.dotnet.framework.webservices)
  • RE: Operation timed-out downloading web service durning Add Web Reference - still no solutio
    ... remote webservice, and the problem is occuring after your server upgrated ... to a DNS/AD server,yes? ... So based on the changing of your webservice hosting server, ... Operation timed-out downloading web service durning Add Web ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: accessing WebService from asp.net App on load balanced Servers
    ... he found that this worked only when the webservice is on the same ... they have not network credentials. ... same server with the asp.net web app.... ... | I have an ASP.Net application that retrieves Data from a Web Service. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: several responses from same webservice?
    ... The idea of having both apps with a webservice could also be an good ... - A client uses a webservice to notify the server app that it wants ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • RE: Consuming a PHP Webservice
    ... I am currently using NuSoap for the server implementation. ... > Just add the php as a "web reference" in your project. ... The web service works OK using a testing PHP client. ... >> web service to consume the webservice. ...
    (microsoft.public.dotnet.framework.webservices)