.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Access business logic through a webservice

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :Windows Application

This should be fairly straightforward, but there seems to be nothing on how to do this.  So far  I've just created wrapper WebMethods and that accessed most of my methods fine, except for the one that returns an object that inherits icollection.  The error returned says to create a default accessor for the class (I don't want to touch the existing business classes, as they are being used elsewhere.)  But, I'm also sure theres many more problems along the way.  So, is there complete documentation to do this?  Or a proper tool to generate a webservice layer?


View Complete Post

More Related Resource Links

Logic to calculate business hours


Hi All,

I have tried searching all over the web for this logic. Got many but half of them did not match what i was looking for and half were malfunctioning.

I want to calculate business working hours between 2 datetime, where in I should be able to set the working hours as well as weekends and holidays should not be calculated.


Please help me guys... It will be a great help... 

is there any impact of using static methods in Business Access layer in 3 tier applciation


is there any impact of using static methods in Business Access layer in 3 tier applciation,

Please suggest me what are the best practices and standards

Access resource file using webservice


Hi I need to access a resource file in a web application, using a WCF web service.

The webservice will be hosted in the same domain as the web application, but its business logic is in another assembly.

How can I retrieve the correct resouce file (according to the current culture) from the business layer, and returning a List of KeyValue pair from it?

Thank you.

Data access from Remote system throwgh webservice

Hi, i wrote the webservice and configured in our server and having access the service through the browser from another system also working fine, But i am trying to access the service through in my application creating the proxy and accessing methods of the webservice, but it can't get the data from  the remote sqlserver through the webservice.    this is for my connection string  in  web config:   <add key="ConnectionString" value="server=EVEREST;initial catalog=MRMv1;uid=sa;pwd=kk"/>   the following the error was shown to me: Server was unable to process request. ---> Login failed for user 'sa' but i can login to sqlserver using 'sa' user in the remote server. how can i get the data from the remote server.        can you please guide to me. thanks and regards brite

How to access webservice using Jquery

Hi to all   I have some queries regarding accessing web service deploy on another server.  I have two project both on same machin under same solution.One is my webservice and another inculde my webproject that access that webservice using jquery .I am using flexigrid control to populate my data.it is working fine when i am trying to use the webservice on my machin under same solution but when i try to use webservice reside on another machin it not working for me.This is my aspx page<script type="text/javascript"> $(document).ready(function() { var SessionUserID = ('<%=Session["UserId"].ToString()%>').val; var myDate = new Date(); var prettyDate = myDate.getDate() + '/' + (myDate.getMonth() + 1) + '/' + myDate.getFullYear(); $("#<%= txtAuctionDate.ClientID %>").val(prettyDate); $("#<%=txthiddenDate.ClientID %>").val(prettyDate); $("#flex1").flexigrid ( { url: 'http://localhost:2158/TWWebService.asmx/getBuyerDealBook', dataType: 'xml', colModel: [ { display: 'LotNo', name: 'LotNo ', width: 120, sortable: true, align: 'left', hide: false }, { display: 'DealNo', name: '

Best way to implement business logic

I am trying to migrate our current SQL CRM to Sharepoint Server 2010. At first I tried using BCS but I couldn't figure out how to implement a many-to-many lookup relationship. So now I am trying to use SSIS to move the SQL data into the lists in Sharepoint. Right now, I have accounts and contacts as lists. Now I am trying to implement the business logic where an account can have multiple contacts and a contact can have multiple accounts and when a user associates a contact with an account (or vice versa), that account should automatically be associated back with the contact. It seems this cannot be accomplished with a declarative work flow like in SPD. Am I correct in thinking that the best way to implement this is with 2 sequential workflows in Visual Studio?  Also, is a workflow always preferrable to an event receiver? Thanks!

VB code behind the Business Logic Layer ???


Hello. I was hoping for some general help and comments.

I went through a lot of the ASP.Net Web Forms Tutorials.

I also went though the whole "ASP.Net in 24 Hours" book by Scott Mictchell. I followed everything that went on in that book and built the final project successfully. I also used the tutorials here to better understand the whole Membership Provider/User tables setup that was going on in the book.

Next, I thought I would learn more about accessing data for ASP.Net since that is what most application do.

I went through the first Data Tutorial here. I seemed to understand what was going on just fine.

The second Data Tutorial seemed to just show a lot of VB code to build the Business Logic Layer. There was not much explanation about how to do it yourself.

I think I can keep going in the tutorials here. I downloaded the code from the second tutorial and went through it.I am guessing that the code in the second tutorial was given just to proceed with the overall project that is being built throughout the tutorial sequence.

I just wish I understood what is going on in those long lists of VB code. I can see some of what is going on. I don't know VB very well at all. So, what is the next step?

I have started working through a VB book. Will learning VB help me understand the code in that tu

Securing Asp.net Webservice from anonymous access.


Hello friends,

     Actually I am working on a project in which I have several webservices(.asmx pages) in which I have some webmethods. Now what I need to do is, securing the webmethods as well as the .asmx pages from anonymous access. Only application can use those methods or you can say those webservices.

Please give me some ideas or solutions or some sort of techniques by which I can be able to secure them from anonymous access.

A very Fast reply is awaited.




Cannot access Business Data (and other) web parts


I've created a BDC model in Visual Studio and I'm able to create external lists (using that ECT) in Sharepoint.  However, I've had problems displaying and associating the data in my external lists.

I've since upgrade to a trial version of Sharepoint Server 2010 Enterprise assuming the business data web parts will help solve that problem.  However, even through the Central Admin and other tools indicate the upgrade was successful, I cannot access the business data web parts to display my lists...

Do these web parts have to be enabled in some way to access them from a web part page or in Sharepoint Designer?

I'm running a development environment on Windows 7 x64.  I'd appreciate any help to get past this problem.




Thanks, KBW

Help with access external webservice



I'm trying to connect to a webservice  but my experiens of webservice i limited

            Dim strLicensPlate As String = Trim(LicensPlate).ToUpper()
            Client.SoapVersion = Services.Protocols.SoapProtocolVersion.Soap12

            Dim info As New carWorkOrderInfo
            Dim infoRequest As New CarWorkOrderInfoRequest()
            Dim body As New RequestCarBody()

            body.licensePlateNumber = strLicensPlate
            body.limit = 1

            Dim Header As New RequestHeader

            Header.userName = ConfigurationManager.AppSettings("User")
            Header.password = ConfigurationManager.AppSettings("Pass")

            infoRequest.requestCarBody = body
            infoRequest.requestHeader = Header
            info.request = infoRequest

            Dim CarValues As carWorkOrderInfoResponsePart = Client.carWorkOrderInfo(info)

Dim strAreaID As String = CarValues.response.carWorkOrderInfoResult

The values that I would like to get

Sync local db access 2007 to webservice having sqlserver 2005



   From last few days i am struggling to auto sync from windows application developed in c# having connection with MS ACCESS 2007(.accdb) database, and having sqlserver 2005 in webservice.

 The problem is i cannot syncronize the access 2007 to sqlserver 2005, if any one have any idea about this plz help me out.


Separate class library for controllers,models,repositories,business logic


Alright after scratching my mind for a while.. I still cant figure out how to go ahead with my architecture: http://forums.asp.net/p/1618613/4149672.aspx#4149672

nor i can find a decent link / info on it...So, iam goin to give this one more try.

Web Part remote update and centrally located business logic


Hi everyone,

We have a web application with a search engine that our customers want to integrate into their Sharepoint environment with automatic login. I'm not familiar with Sharepoint myself but have a question around the practicality of it. I realise that we have two options:

1. Display my web app in an IFRAME. The benefit of this approach is that my Sharepoint users will automatically benefit from any update made to the web app. The downside is that they cannot download any search results directly to their Sharepoint folders.

2. Create a full Web Part to "rebuild" the full user interface of my search engine for Sharepoint. The Web Part will access my web app through back-end APIs. The benefit of this approach is that users can download results directly into their Sharepoint folders. However a big downside is that anytime there's an update to the web app, I have to implement it separately on the Web Part and redeploy it. I'm discouraged by this because that means I have to update the Web Part on every customer's Sharepoint instance.


My question is. Is there option #3 that's a midway between option #1 and #2? Is there a way I can create a thin Web Part accessing "proxy" code that is centrally updateable without having to touch every Web Part deployment? Hopefully this option allows me to get the ben

How to use business logic in MVC



I've got a C# MVC 2 application using EF 4. My DAL project gets data from the Model, translates them into POCO's and returns ViewModels to the BLL which is called from the controllers.

I've set up validation attributes on the POCO classes and that works for "Required" fields etc. I would like to add business logic such as "From" has to be before the "To" date. Can this be done on the POCO classes so it is automatically validated client-side in the view?

Also, I would like to add some functionality to the BLL layer such as checking if a resource is already booked between the From and To dates to avoid double bookings. This should fire before the ViewModel is saved. I tried a Try/Catch statement in the controller so that I can throw an error in the BLL, but I don't understand how to return this error to the view with an appropriate error message added.



Cannot Import application Definition to Business Data Catalog (BDC) -- Error: Access Denied

I want to import an application definition to my Business Data Catalog (BDC).

I log into my Shared Service and select Import application definition.

I am redirected to page that says Error: Access Denied

My account is:

1. An Administrator on the windows server running sharepoint
2  A member of the Farm Administrators
3. Added individually with Full Control to Central Administation
4. Added individually with Full Control to my shared service.

John Bailo

[Business Logic Handler debugging] - The assembly is not loaded by inetinfo.exe process


Hi there,

Here is my story - my merge replication topology consists of one publisher (sql server 2008), a distributor (same server as publisher) and a subscriber (sql server 3.5 CE). I use web synchronization for my merger replication. Publisher, Distributor, Subscriber and IIS run all on the same (development) machine. I use MSSMS to synchronize the subscriber.

I've created a custom resolver (Business Logic Handler) that should perform some data modification that has been inserted at the subscriber, before it is merged into the publisher. It should but it doesn't so I need to debug it to see what's going on. I've followed steps form here http://msdn.microsoft.com/en-us/library/ms365150.aspx on how to debug a business logic handler on a Web server using Web synchronization and I'm stuck at step 7. MY PROBLEM IS when I attache to inetinfo.exe process from VS2008, I don't see my assembly to be loaded neither in Output nor in Modules window and the break points say that they will not be hit because the symbols were not loaded.

I configured web synchronization almost exactly as it says here http://msdn.microsoft.com/en-us/library/ms151810.aspx , the only difference is that I didn't configured and

Unable to access the webservice developed with wcf



i have developed a webservice using wcf. and i deployed on IIS 7.

when i try to browse the svc file(http://localhost/service1.svc)  it is opening .

But when i browse with ( http://localhost/service1.svc ?wsdl ) it is saying page canot be diplayed.

i didnot understand what is the problem. please help me in this.


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend