.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

Single class with service and callback contract

Posted By:      Posted Date: September 11, 2010    Points: 0   Category :WCF
Can a single class implement service and callback contract. Thanks-= JL =-

View Complete Post

More Related Resource Links

WCF Needs? How to Communicate Multiple Contract via Single Service?

why it needs.   i have many business objects how could i serve to my web application via single service.   i have nearly 500 different business objects. how could contract implement into client web applicatoin.    

Class To Contract: Enrich Your XML Serialization With Schema Providers In The .NET Framework


The Microsoft .NET Framework 1.x provided minimal options for mapping classes to schemas and serializing objects to XML documents, making this sort of mapping quite a challenge. The .NET Framework 2.0 changes all this with Schema providers and the IXmlSerializable interface.

Keith Pijanowski

MSDN Magazine June 2006

Service Station: Techniques for Contract-First Development


In my May 2005 column, I discussed contract-first development and appropriate times to use it (see Service Station: Contract-First Service Development). In this second part, I'm going to focus on some techniques for contract-first development within the ASMX framework.

Aaron Skonnard

MSDN Magazine June 2005

Service Station: Contract-First Service Development


In one of my previous columns on Service Orientation (SO), I introduced the concept of "contract-first" service development (see Service Station: SOA: More Integration, Less Renovation). Over the next two installments of this column, I'm going to cover the topic in depth.

Aaron Skonnard

MSDN Magazine May 2005

Web Service and Base Class Sub Routines



I have several Web Services that I call using jQuery, they are all <WebMethod()> _    Public Function and return either a boolean or string, depending on the function.

I have some Web Service functions, where I would like to call sub routines I have in my base class, they are Public Sub's.

When I add a call of a sub routine in the Web Service function, I get a blue line that says 'Object reference not set to an instance of an object'.  If I change the sub routine to Public Shared Sub, then the blue line and error go away, but I get other errors from the calls I was successfully making to the base class routines before.

Is there a way to get these two to work together?

How to update row using Domain Service Class programmatically?

How to update row using Domain Service Class programmatically in Silverlight without bind to any datagrid and other control? Please help.chanmm

How to update row using Domain Service Class programmatically?

How to update row using Domain Service Class programmatically in silverlight without binding to any datagrid and so? Please help.  chanmm

All data in class properties disappear across WCF service

Hi, I have a class that i share betwee silverlight client and wcf service. I populate properties of the class with real data from the client, to be used in the server. I use debugger to step through the code when the call gets to the server, all the data ara gone and are replaced with null. All DateTime value change to 1/1/1001. But if pass primitive types such as int, string, no problem. This is happening only on one machine, but not on ther machine. Can someone tell me what is going on here? Thanks in advance

separating service level data from business data in servcie contract

Hi I have read that service level data (like requestId, client name etc. required for tracing/auditing) should be separated from business data(required for actual business operation) ie. differencing "Message Header" from "message payload". When we say 'separation", does that mean service level data should not be defined/declared in my contract class. If so how clients will know what header info they have to pass? I can't enforce header info as part of my contract. i think http://blogs.microsoft.co.il/blogs/bursteg/archive/2006/04/23/141.aspx this is based on assumption that clients are aware what they have to pass in header. Regardssinghhome

How to use single windows service to host multiple WCF Services instances (Each instance of WCF is i

How to use single windows service to host multiple WCF Services. I have a mutiple instance of same WCF service in different folder, each instance has unique service name and port. WCFService has reference to Reg-Free COM Reference, i have Native.WCFService.manifest in each folder. Ex: WCFService1 is in "C:\WCFService01\WCFService.dll, Native.OCWCFService.manifest, OCWCFService.dll.config WCFService2 is in "C:\WCFService02\WCFService.dll, Native.OCWCFService.manifest, OCWCFService.dll.config Now i need host above services from single Windows Service. I am trying to create AppDomain for each above WCFService Instance from Windows Service and then host. Its working if i register COM dll in the server using regsvr32, but when i un register COM dll, i am getting unable to load COM component .... This looks like AppDomain is not loading COM DLL and Manifest files. Its looks strange but we need it in this way because we have production and test environment in the same server. Everything works fine if create a seperate Windows Service for each WCFService Instance, but my manager wants single Windows Service :). Any help whould be really appreciated.  ravi kumar reddy

host and consume wcf rest service in web project in single solution

I have  create a solution which have multiple class library project and a web application Like Web(UI),BL,DAL etc. I have also add a WCF REST starter kit Collection project in the same Solution.WCF Rest API is working fine if I host it on IIS but i want to consume this in my web project without using IIS. Is this possible? if yes then what will be the URI  for my WCF Rest services? Add service reference is also not working because WSDL is disable in rest.

Two different services, same callback contract

I have two different service using the same callback contract.  Is that permitted?  I am getting weird behavoior.  When a client subscribes to the two callbacks, the messages seem to come back to the wrong callback.Batman

Workflow - Same Contract used in two service - Conversion problem

Hello, I'm trying at the moment to use WF to create a basic Workflow, and face a conversion problem. Here's the setup : Service 1 : Create objects based on a defined Data Contract Service 2 : Apply an operation on objects of type defined in service 1. Service 1 is imported as Service reference. I created a simple Workflow which imports both services. It first call Service one to get an object, and then send it to Service 2 to apply the operation. But when I try to do this I receive an error of type : 'WF.Service1.Entity' cannot be converted to 'WF.Service2.Entity'. The Contract used is only defined in the Service 1 and reused in Service 2, so it's the same object. The only difference is in the proxy client generated which creates both definitions, each one in it's specific namespace (Service1 and Service2). Do you see any solution to this situation ? Except creating an activity that copy every property from one object to another :-) P.S. : I uploaded the basic setup here : http://www.mediafire.com/?e6j9c2dv4rvcdoh

How to Listen to MSMQ and Database table from a single WCF service

Hi, I have one WCF service which is listenibg to MSMQ. Once message is added to MSMQ, it will start processing the business logic. But my requirement is to make this WCF service to listen to one database table also. If any message is logged to this table or any message added to MSMQ, the WCF service should start processing the business logic. Could you please let me know if it's feasible using WCF service. It would be great if you can tell me the alternate approaches to implement this functionality. Ram.  .NET related discussions

Class project in Web Service-consuming website

I have a website project in VC2008. I add a web reference to a web service, and give it a name (ws). I can now do this:         ws.Service testService = new ws.Service();         ws.Customer objCustomer = testService.GetCustomer("1");   Perfect. Now, is it possible to move the Web Reference into a class file, referenced by my web project? I've done that, but now I can't access the ws object from the website application. Is this even possible? I've seen it done in another project, which I've tried to mimic exactly, but it's not working for me. Could it be an older version worked like that??   Thanks Sean

Expose data contract used in two services as a single type on client side?


I have a .dll that contains my data contracts and I reference this dll in two different services.

Now, on the client side I don't want to add this dll because I need both WPF-clients and Silverlight clients. So, what I want is to be able to use a single data contract on the client side and not with different namespaces for the different services. As I understand this should be possible but I don't know how.

Can someone explain how I can generate a single data contract on client side that can be used for calls to both services?

Thanks for help!

svcutil /metadata - how to export metadata for service contract that has generic type



I am using svcutil /metadata to get metadata for a WCF service project assembly, the service class implements the IChildServiceContract below, and the IChildServiceContract interface implements a base interface which accept a generic type.

public interface IChildServiceContract : IServiceBaseContract<string>

I can generate metadata for IChildServiceContract , I am curious and also want to try generate meta data for base interface, an error come up which seems have problem with the generic based contract:

There was an error exporting the contract loaded from the type: xxx.xxx.xxx.IServiceBaseContract`1

Is it possible to generate metadata in this situation?


Thanks in advanced


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