Need help with deciding to use or not to use web services in a web application

Hi all,

I haven't used web services at all in my web application development and now I was asked to use web services in my web application.  I was a novice in ASP.NET since I'm just changed to ASP.NET from a Java background.

I used the tutorial on MSDN to create the DAL (which is a .xsd file type) and the BLL layers and it works pretty well for what the web application suppose to be but since I was asked to add a web service layer to this, I wonder how to do it?  And I wonder if it is necessary to have an additional layer?  What is the pros and cons for adding the web service to a web application?

Thanks in advance for all your help!


3/25/2008 4:42:17 PM 7071 articles. 0 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 30


  • The data (and business possibly) tiers can now be hosted in a seperate application, even on a different machine.
  • If hosted on a different machine(s), you can take advantage of setting up a web farm.
  • This separation allows for performance improvements through output caching, and security settings (run as different account, etc)
  • Changes to the data and business tiers can be deployed easier, since they are now loosely coupled with the web application.


  • Adds another layer of complexity
  • Performance degradation in small usage scenarios (additional request, XML serialization, possibly caching overhead)

Basically, if you think you'll have a lot of usage, go with the web services as they will allow you to tweak performance even further than you normally would be able to in a web application. If this app is only for a handful of users, don't bother with it.

The only other consideration for using web services is if you have an external facing site -- you probably don't want your web machine talking directly to your database. You want the database to be firewalled off from the web machine and use a web services machine as a bridge between the two.

There are probably a lot more scenarios to look at, but those are what I usually take into consideration.

Steve Commisso
3/25/2008 5:35:57 PM

Hi scommisso,

Thanks for your answer.  I have some other questions though: 

Now, I decide to go with web service and my web service will be WCF service, not the regular web service .asmx.  Could you tell me the difference?

Another thing is I'm going to use some AJAX extender which examples out there deal mostly with the .asmx web service.  Can I still create a WCF service and call it in the AJAX extender the same way as AJAX extender calls .asmx web service?



3/26/2008 10:15:17 PM

Similar Artilces:

Mobile web application using web services---HELP
Hi all, I am interested in creating a website which will used by our field support people who can check in what, where and when are their pending/new appointments through their mobile device. The field support people should be able to close their pending tickets etc.  This application should be accessible through most of mobiles so I am not sure whether i should use .net mobile controls. Is it a feasible idea to create a html site and use webservices?? Also, is scripting (javascript etc) supported in most of mobiles?   Please suggest me how should i proceed. ...

Changing URL in web.config for web service
I added a web reference to asmx file. In web.config - it adds - undefinedadd key="CoreService.CoreServices" value="http://test/CoreServices.asmx I then change it to <add key="CoreService.CoreServices" value="http://test2/CoreServices.asmx"/> But CoreService.CoreServices still looks for http://test/CoreServices.asmx.  What else do i have to change? I think CoreService.CoreServices are hard coded into the source code.  Girijesh I think CoreService.CoreServices are hard coded into the source code.  Girijesh So no ...

Consuming Web service from .net 3.5 web application using ajax
Hi , Before in .net 2005 ,I use to consume the  web service from client side via Ajax and java script. that's just adding web service inside the script manger services.But  it was not possible with .net 2008 version WEB APPLICATION   , Even it works well with .net 2008 web sites. Please help me to solve the issue. I have no idea what you mean. Please post the code that "does not work". NC...   I have the same problem.  I have a .NET 3.5 Web Application not Web Site.  I fully qualify the web service with the namespace i,e,  &n...

Cannot call a web service from java script using ajax in .net 3.5 web applications
As like 2005 .net websites i tried to consume a web service from client side java script  using Ajax script manager in  .net 3.5 (2008) version web application it was not working, Event it works with 3.5 web sites, What i have to do to solve the issue. Thanks in advance Hi, can you create the least amount of code to reproduce it and post it? This gives us the ability to check out your code and better guide you. Also please check out this article: Create a Simple WCF Web Service and Use In JavaScript With Visual Studio 2008 and .Net 3.5.  Grz, Kris.Read my blog. Handy Fire...

New to web services...need help consuming web service
Hi guys. I am trying to use the NBA standing web service(developed by 4guysfromrolla) on my website and I cant seem to get it to work correctly. Its listed below. Tutorial is on the below page-- I made a web reference in my web project but when I go to create the object it gives me the Type "NBA.standings " not defined. I am copying the code exactly from the page. I put the imports at the top of the page. This is my code from the page load event Dim proxy As N...

send data from web service to local computer, using web services.
hii have a web application, on web server , and a database on my local computer in my office.i want to send data from my web pages to my local database.i think one way is using web services.i used that, but it has permission errors.that web service have this error :  Server Error in '/in' Application. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: BC30180: Keyword does not name a type.Source Err...

How to call a .net web service from another .net web service?
Hi all,I have developed two asp .net web services using visual studio .net 2003.I wish to call one web service from another web service.I tried adding a web reference of the web service in another web service and was able to do so.but i m not able to access the web methods provided by the web servicecould you please suggest a way to go about itExpecting quick replyThanxCharmy try to make sure that you reference it in the web reference and call it properly this is sample  [WebMethod()] public double CalcDistance(int x1, int y1, int x2, int y2) { Calculator.Service1 calc = new...

xml web service --uploading the file to the xml web service
how can we upload the file in the xml web service 1.i mean what will be the return value in the proxy class 2.and how am i going to send the file to the xml web service----regards Bipul Kumar Here are some links to articles that helped us get this done: Hope this helps....

Need helps on deploying a web services or web app to an existing web server
Hi people, I am going to deploy a new web service and a new web application to an existing web server, which is also hosting several other web apps. I am told that the IIS CAN NOT BE STOPPED, which means I can not build a MSIs to install them. Looks like only two options I can use: 1) XCOPY 2) Publish the web service or web app through the VS 2008. Can anyone please give me some advices what is the best way to have a deployment without any interruptings and less problems. Thank you.    use FTP to copy files from your system to web hoster system. you ca...

Web service in .NET from Java Web Service
Hi there,I'm pretty new to .net (although i have years of experience with the old vb 6, access 2k, as well as java)... and need some with perhaps either some syntax or something.Here is the wsdl.<wsdl:definitions targetNamespace="">−<wsdl:types>−<schema targetNamespace="GetBookInfoByISBN">−<complexType name="BookInfoType">−<sequence><element maxOccurs="1" minOccurs="0" name="Title" nillable="true" type="xsd:string"/><element maxOccurs=&quo...

How to use a web service from a web site
Hi, I would like to know how to consume a web service from a web site on internet. i want to use's web service in my application for showing the weather. How to do this? If anyone could refer me some good articles with sample code on this. I would be really grateful for the help. Regards, Faisal Shahzad Hi  Faisal, First of  all  ,  you  need  to  add  something  like this in  your  Web.Config  <appSettings>  <add key="Name of the file" value="File Path"/>  &...

Missing Design Tab in using Web Matrix for XML Web Services
Did anyone come across the following situation? After selecting the XML Web Service template with VB.NET as the language, Sample as the class and MatrixDemo as the namespace, a code view was opened by Web Matrix. However, unlike the usually interface, I can't find any tabs underneath the code view. No design tab, no HTML tab and no ALL tab. Did I miss anything?...

Pass data from one Web Application to another using Web Service
Hello,    I went through an early post of passing data from one Web Application to another. Got hint that its possible using WebServices. Am having data to be passed from one application to another (about 100 fields). For both the applications databases are different. But, Application data between 2 Web Apps is having commonality. So the end user inserting the data in 1st application might want to copy the input data in another application. Can anyone explain or provide sample how to do using Web Service?    Yes, we doing the same thing. First of ...

change a web reference to a web service in the config file of an object used by a windows service
In my solution (visual studios 2005), I have a windows service and a business object.  The business object has a web reference to a web service.  I maid the web reference dynamic and it created an applicationSettings section in the appconfig:<configuration>           <applicationSettings>        <Objects.Properties.Settings>            <setting name="Objects_LookupService_auth"        &nbs...

Web resources about - Need help with deciding to use or not to use web services in a web application -

Application - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Pre-Christmas job application rush hits Australian public service
Speed required for pre-Christmas job window opening for public servants. Check out who is hiring.

Second visa application 'likely' to be approved
The family of a terminally ill Pakistani student can 'hopefully come to Australia sooner rather than later' says Immigration Minister Peter Dutton. ...

Tashfeen Malik's visa application under scrutiny - Business Insider Deutschland
The US government has released the visa application for Tashfeen Malik, who along with her husband killed 14 people in an attack in San Bernardino, ...

MBA: Mortgage Applications Decrease in Latest MBA Weekly Survey, Purchase Applications up 34% YoY
From the MBA: Mortgage Applications Decrease in Latest MBA Weekly Survey Mortgage applications decreased 1.1 percent from one week earlier, ...

Cal State Schools Get Record Number Of Applications For 2016 Term
Schools in the California State University system received a record number of applications for the upcoming 2016 fall term, with more than 830,000 ...

German-Based Spirea Promotes Decentralized PV Applications In Uruguay
... Its technical operations specialist, Laurie Lawrence, pointed out that Uruguay [&hellip German-Based Spirea Promotes Decentralized PV Applications ...

Visa application of San Bernardino shooter released
CNN Visa application of San Bernardino shooter released CNN (CNN) The visa application of one of the San Bernardino shooters was released ...

NTU research team discovers optoelectronic application for molybdenum disulfide
A research team under the National Taiwan University (NTU) has discovered an optoelectronic application for molybdenum disulfide (MoS2), a 2-dimensional ...

Pre-K Applications Begin Jan 25, a Month Earlier Than Last Year, City Says
The DOE has moved the process up to Jan. 25 on the heels of a similar schedule shift for kindergarten. MANHATTAN — The application period for ...

Resources last updated: 12/30/2015 12:13:27 PM