Implement WCF Service with N Tier Architecture in ASP.Net

nagaraju60
 
on Mar 28, 2018 07:21 AM
2803 Views

Dear All,

In my new project- SAMPLE i have 4 layers,

SAMPLE.WEB.UI - Presentation Layer
SAMPLE_BAL - Business Layer
SAMPLE_BOL - Business Objects
Sample_DAL - Data Access Layer.

in my SAMPLE.WEB.UI i have ASCX pages & ASPX pages.

in my ASCX pages i have lot of repeated autocomplete textboxes, so every time and every page using [System.Web.Services.WebMethod] in aspx page i am get the autocomplete data in ascx textboxes, it takes repeated code in every page. so, i want to use WCF webservices in to my project.

by using below sample code i am get simple wcf service for autocomplete

https://www.aspsnippets.com/Articles/Implement-ASP.Net-AJAX-AutoCompleteExtender-using-WCF-Web-Service.aspx

 

but in my N-tier architecture where can i use this wcf services. how to do this.
could you please explain with good example.

Download FREE API for Word, Excel and PDF in ASP.Net: Download
Mudassar
 
on Mar 28, 2018 07:23 AM

Unfortunately this is a specific requirement and not so small that can be answered with an example.

Thus we can suggest you that you can replace Business layer with WCF layer and expose it to your Web App.

It will be very similar only thing you need to create a separate project for WCF services and then Add reference of the WCF service in your Web App (Presentation Layer).