none
Setting InactivityTimeout as Infinite prevents from generating a proxy via svcutil RRS feed

  • Question

  • I'm using wsHttpBinding for a WCF service; when I try to generate a proxy for the client, I get the following error in the output box:

     

    Attempting to download metadata from 'http://<domain name>/<service name>.svc?wsdl' using WS-Metadata Exchange or DISCO.

    Error: Cannot import wsdl:binding

    Detail: An exception was thrown in a call to a policy import extension.

    Extension: System.ServiceModel.Channels.ReliableSessionBindingElementImporter

    Error: The wsrm:InactivityTimeout assertion's Milliseconds attribute does not fall within the range this binding uses. The ReliableSessionBindingElement could not be created.

     

    This is because I set InactivityTimeout's value to be Infinite.

     

    from the server's web.config:

     

    <wsHttpBinding>

    <binding name="ReliableWSHttpBinding" receiveTimeout="Infinite">

    <reliableSession enabled="true" inactivityTimeout="Infinite" />

    </binding>

    </wsHttpBinding>

     

    However, it doesn't make sense that Infinite is a valid value for InactivityTimeout (if I manually insert the binding config in the app.config, the application works fine) but svcutil will throw an error. I'm wondering if there's a patch for this issue? It's getting a little irritating to have to go into app.config and figure out what I am missing each time I use svcutil, and I do want to keep the inactivityTimeout value to be Infinite.

    Thursday, June 28, 2007 5:42 PM

Answers

  • would this number help :

    24.20:31:23.6470000 instead.

     

    think this issue will be fixed in orcas,

    allan

    Thursday, June 28, 2007 7:06 PM
  • Ever wonder what int.MaxValue is in milliseconds?  Smile  Now you know! 

     

    Sorry for the confusion here.  This is an issue that we will need to fix.

     

    -- Dave

    Friday, June 29, 2007 1:04 AM

All replies

  • would this number help :

    24.20:31:23.6470000 instead.

     

    think this issue will be fixed in orcas,

    allan

    Thursday, June 28, 2007 7:06 PM
  • Your number worked Smile

     

    Can you explain why 24.20:31:23.6470000 works? I tried changing it to other values like 24.23:31:23.6470000 and it threw an error.

    Thursday, June 28, 2007 8:44 PM
  • hi GinaK,

    I have no explaination as for the numbers, reflector.exe told me. The numbers are are strange, but I guess Infinite means 23 days 20 hours, 31 minutes and 23 seconds and then some , which is useful to know !! if one is designing a service that would run .... well Infinite!.

     

    regards Allan

    Thursday, June 28, 2007 9:09 PM
  • Ever wonder what int.MaxValue is in milliseconds?  Smile  Now you know! 

     

    Sorry for the confusion here.  This is an issue that we will need to fix.

     

    -- Dave

    Friday, June 29, 2007 1:04 AM
  •  Dave I realize that, but why not use zero as infinite as you have been using this number since MTS came out in 97, instead of hardcoding this value in a bindingelement

     

    int.MaxValue rocks as a direct explaination of course, thanks.

    allan

    Friday, June 29, 2007 5:54 AM