Contract requires Duplex Error
Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3722
Printed Date: 26-Mar-2025 at 7:24am
Topic: Contract requires Duplex Error
Posted By: Vonzkie
Subject: Contract requires Duplex Error
Date Posted: 16-Oct-2012 at 7:53pm

We are having this kind of problem when trying to access the EntityServer via browser. What configurations or actions we need to do to get this thing working?
|
Replies:
Posted By: kimj
Date Posted: 17-Oct-2012 at 5:58pm
The Push service is the only part of DevForce which requires a duplex binding, so I assume you've enabled it somewhere. I'll also assume that you've modified your web.config or subclassed the ServiceHostEvents class to change DevForce binding defaults, so it will help if you can provide these, along with any client config or ServiceProxyEvents code.
|
Posted By: Vonzkie
Date Posted: 17-Oct-2012 at 7:40pm
Hi,
We didn't enabled Push Service in our BOS and the weird thing is this only happens on a single machine and all working are working fine.
Here's the code of our ServiceHostEvents:
public class ServiceEventsManager : ServiceHostEvents {
public override void OnEndpointCreated(System.ServiceModel.Description.ServiceEndpoint endpoint) { base.OnEndpointCreated(endpoint); }
public override void OnServiceHostCreated(System.ServiceModel.ServiceHost host) { base.OnServiceHostCreated(host); } }
Actually it's plain..
Are there any configuration or IIS settings we need to check to here?
Thanks, Von
|
Posted By: Vonzkie
Date Posted: 18-Oct-2012 at 4:26am
Hi,
uploads/1228/iRely.BusinessObjectServer.zip - uploads/1228/iRely.BusinessObjectServer.zip
I've attached the BOS that I deployed on our test server. Please take note that it only happens on that specific server. MY local IIS works fine with this same BOS and another test server is also working with this same BOS.
Thanks, Von
|
Posted By: kimj
Date Posted: 18-Oct-2012 at 10:20am
The log file from your upload indicates the EntityServer.svc started successfully. I was also able to run your BOS on Winodws 7 - IIS 7.5. Are you sure this is from the failing test server? We've never seen this error before, and as I said, only the Push service uses a duplex binding. Whenever something fails on one machine but works everywhere else, I would focus on what is different about the configuration of that machine - maybe a different OS, a different version of .NET framework, etc. Also, fyi, the EntityService.svc and EntityServer.svc files are not necessary when you register the DevForce ServiceVirtualPathProvider, as the global.asax code is doing.
|
Posted By: Vonzkie
Date Posted: 18-Oct-2012 at 7:38pm
Hi,
Here is the actual BOS on the actual server where we get the error.
uploads/1228/iRely.BusinessObjectServer_-__Bangalore_Server.zip - uploads/1228/iRely.BusinessObjectServer_-__Bangalore_Server.zip
We can assign a public IP for it if you want to connect and look at its configuration.
Thanks, Von
|
Posted By: kimj
Date Posted: 19-Oct-2012 at 10:23am
This zip contains only the binaries, which are not in question. I need the web.config and debug log from the test server which is getting the error. If you have a client config file, and generate a debug log, I'd like to see those too. If you're using a ServiceProxyEvents, that code will help too.
|
Posted By: Vonzkie
Date Posted: 21-Oct-2012 at 6:34pm
Hi,
Actually, the error is only seen when we browse (right click ->browse) EntityServer.svc from the IIS manager. I'll try connecting through a client and will send you the config and log files.
Thanks, Von
|
Posted By: Vonzkie
Date Posted: 23-Oct-2012 at 3:43am
uploads/1228/iRely.BusinessObjectServer_-__Bangalore_Server2.zip - uploads/1228/iRely.BusinessObjectServer_-__Bangalore_Server2.zip
Here is the complete BOS Server..
|
Posted By: kimj
Date Posted: 25-Oct-2012 at 11:10am
Your zip all looks fine, and the debug log indicates the DevForce services are starting correctly. If you're only getting the error within IIS Manager, and only on a certain server, I would focus on what's different in the configuration - specifically the enabled protocols and bindings.
|
Posted By: Vonzkie
Date Posted: 28-Oct-2012 at 6:55pm
Hi,
If I give you a login credential to our server, will you be able to help us by checking out our configuration?
Thanks, Von
|
Posted By: kimj
Date Posted: 29-Oct-2012 at 11:01am
We can try. PM me with the info, or email IdeaBladeSupport.
|
Posted By: kimj
Date Posted: 30-Oct-2012 at 2:39pm
Hi Von, I have connected to your server, and can now also reproduce the problem in some applications on one of our test servers. What's happening is that WCF "simplified configuration" is kicking in and trying to add an endpoint with the BasicHttpBinding for all services implemented by the EntityServer. This is not the correct or desired behavior, but I don't yet know why this behavior seems to occur in some applications and not others, so will be investigating further.
|
Posted By: Vonzkie
Date Posted: 04-Nov-2012 at 5:34pm
Hi,
How's this going? Just wanted to ask for an update.
Thanks, Von
|
Posted By: kimj
Date Posted: 04-Nov-2012 at 5:37pm
Hi Von, is this problem blocking for you?
|
Posted By: Vonzkie
Date Posted: 05-Nov-2012 at 2:58am
Yes, the problem is that this error is consistent with the production server and 2 other test servers of our client.. So we really have no choice but to fix the main problem..
Thanks,
|
Posted By: kimj
Date Posted: 07-Nov-2012 at 12:31pm
You'd previously indicated you saw this problem only when browsing to the EntityServer.svc, not when running your application, and I assume that is still the case. I'm not seeing this problem in the upcoming 6.1.9 release, which is due this week. We did not specifically attempt to fix this problem, so it's unclear why this release seems to work while 6.1.7 (and 6.1.8, and maybe other releases) do not. You can also check the debuglog when you navigate to either EntityService.svc or EntityServer.svc. If generated, it may indicate the problem. For example, if the license key is not found or is invalid you may see this contract error, since DevForce will not create service endpoints when a license is not found, therefore triggering the WCF simplified configuration to do so. We have an open bug report to look into this further.
|
Posted By: Vonzkie
Date Posted: 07-Nov-2012 at 6:01pm
OK thanks! Please inform us as soon as the build is released. We need to try it out as soon as possible.
Thanks, Von
|
Posted By: Vonzkie
Date Posted: 11-Nov-2012 at 7:04pm
Hi,
So we upgraded our components and tried it out again but unfortunately, the error has now been consistent to all of our servers. We used to not experience the error here on our Developer test servers but now we do.
Thanks, Von
|
Posted By: Vonzkie
Date Posted: 11-Nov-2012 at 10:10pm
Here is the my actual code on instantiation of my TransactionBase
var constructorInfo = typeof(E).GetConstructor(new Type[] { typeof(bool), typeof(string) , typeof(EntityServiceOption), typeof(string) });
try { var entityManager = constructorInfo.Invoke(new object[] { true, connectionKey, EntityServiceOption.UseDefaultService, null}) as E;
Here is the actual Error string when Invoke is called.
Content Type application/x-gzip was not supported by service http://108.175.8.58/iRely.BusinessObjectServer11.5/EntityService.svc. The client and service bindings may be mismatched.
THanks, Von
|
Posted By: kimj
Date Posted: 12-Nov-2012 at 10:25am
This looks like a different problem than you first reported. Here you're getting an error on the EntityService when using the application, not when browsing to EntityServer.svc. First make sure that you recompiled your application against 6.1.9. Then check the debuglog generated on the server to see what it shows.
|
Posted By: Vonzkie
Date Posted: 12-Nov-2012 at 7:06pm
Hi,
We're still getting the error when we browse the entityserver.svc. What I'm showed you on my post was the error when our application tries to connect to this BOS. But we're good now, I found out that our development server's BOS was using the older Ideablade.Aop DLL. We just now have to compile this and try it out on our client's server where the original issue occured. Will let you know.
Thanks, Von
|
|