The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Add a web service to an existing web project (?)

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Peter van Ooijen

Posts: 284
Nickname: petergekko
Registered: Sep, 2003

Peter van Ooijen is a .NET devloper/architect for Gekko Software
Add a web service to an existing web project (?) Posted: Jan 16, 2006 7:42 AM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Peter van Ooijen.
Original Post: Add a web service to an existing web project (?)
Feed Title: Peter's Gekko
Feed URL: /error.htm?aspxerrorpath=/blogs/peter.van.ooijen/rss.aspx
Feed Description: My weblog cotains tips tricks and opinions on ASP.NET, tablet PC's and tech in general.
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Peter van Ooijen
Latest Posts From Peter's Gekko

Advertisement

Here's the problem : We have quite a website which works with quite a database. The end user can only reach the web-server, the web server itself is the only one who can connect to the database. All works well but there is an extra feature which has to pump and check bulk data into the database from a COM server. The COM server itself has the tendency to pop up occasional dialogs so it just has to run on a manned workstation. (Imagine a web server popping up a dialog. It will have to wait until someone will visit the server room and take a look at that particular screen. Could take weeks) A good way for the client side app to communicate with the database is a web service. The server-side code of the web service implementation can reach the database. The client side sends and receives XML datasets to and from the web service.

There are several ways to implement an asmx web service with Visual Studio

  • Listen carefully to the story Christian Weyer has to tell and use his Contract First tool
  • Create a new project and pick new web service
  • Add a web service to the existing web site project. Right click the project and just pick it:

 

The latter works like a snap. After all a web service is not that much different from a web page. Both a a matter of request and response. In the case of a web page a bunch of HTML is returned, in the case of a web service a bunch of XML is returned. When you browse through the classes in the .NET framework which are used you will see great overlap. Both a web service project and a web site project are based on the System.Web.HttpApplication class (in global.asax)

Implementing a service this way has some big pro's

  • It can use the same  data access code which is there for the web site
  • It's deployed with the site itself. No extra steps needed.
  • It uses the same web.config. No extra configuration required.

It could have some con's as well

  • I don't know..
you think ?

Read: Add a web service to an existing web project (?)

Topic: Arguments for and against using stored procedures Previous Topic   Next Topic Topic: Language Design & Paying the UI

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use