Last post Apr 07, 2013 06:00 PM by amirhussein.samiani
Dec 01, 2009 05:12 PM|Armysniper|LINK
I am using an ObjectDataSource to connect to a WCF service I am using. I have been doing this for a while but we had to introduce a new endpoint today and now I need to be able to setup the object data source to go to the right endpoint.When I go through
the wizard to configure the ObjectDataSource it shows two instances fo my service (obviously the two endpoints) but it wont differentiate them and it does not in the code. How can I set this up in the ObjectDataSource?
Dec 01, 2009 06:46 PM|anup1252000|LINK
what u re telling is not the case. suppose u re using WSHttp binding in both endpoint but the contract and address is different cant be same.
Dec 01, 2009 07:06 PM|Armysniper|LINK
This is not the issue...I have manual source code calls to the services and they work fine with the both end points defined. The issue is simply...how do you define an endpoint in an ObjectDataSource? Before I had the different endpoints, I used to define
the Type parameter as "MyServices.MyService" (name changed to protect the innocent ). This worked fine because I had one endpoint...now
I have two.
In code I would define it like this MyServiceClient services = new MyServiceClient("SecureEndpoint"); as an example...how do you do this with the ObjectDataSource?
Dec 01, 2009 08:59 PM|anup1252000|LINK
when u ve multiple endpoints configured then u should provide configuration name while generating proxy.
Dec 01, 2009 11:12 PM|Armysniper|LINK
I did do that...this has nothing to do with the proxy! This has to do with how you configure an object data source to work with multiple endpoint configured services.
Apr 07, 2013 06:00 PM|amirhussein.samiani|LINK
protected void Page_Load(object sender, EventArgs e)
objectDataSourceProducts.ObjectCreating += new ObjectDataSourceObjectEventHandler(objectDataSourceProducts_ObjectCreating);
void objectDataSourceProducts_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
e.ObjectInstance = new ProductService.ProductClient("NetNamedPipeBinding");