the maximum number of service points was exceeded

Traitée the maximum number of service points was exceeded

  • mercredi 22 août 2012 14:40
     
     

    Hi,

    I am accessing SSRS Web Services in a WPF application by adding web services as web reference. I am setting the URL of web service in code. But when i access any api i get this error "the maximum number of service points was exceeded".

    I checked in my application the value of ServicePointManager.MaxServicePoints is 4. If in code if i set it to 0 then this problem doesn't come. I am not sure if this is right solution.

Toutes les réponses

  • jeudi 23 août 2012 05:45
    Modérateur
     
     Traitée

    Hi MaximRaven,

    The default value of MaxServicePoints is 0, which means there is no limit to the number of ServicePoint objects.

    You can either increase the maximum number of ServicePoint instances to maintain or set it to 0 without limitation. With former option, if ServiePoint objects with active connections is greater than the value of MaxServicePoints, the ServicePointManager object deletes the ServicePoint objects as they become idle, if no SevicePoint is idle, you got an exception.

    With MaxServicePoints set to 0, garbage collection response for releasing ServicePoint object. In most case, we can leave it as default value.


    Leo Tang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.