The remote certificate is invalid according to the validation procedure.

4 posts, 0 answers
  1. towpse
    towpse avatar
    224 posts
    Member since:
    Mar 2008

    Posted 26 Nov 2009 Link to this post

    Just moved my web app up to a staging environment and I'm getting this error. I suspect it has something to do with an IIS error I was getting locally on my machine and used the following code to resolve it.
    It seems that this is not working on our staging environment. Not sure how to resolve at this point. Maybe someone can offer some suggestions.

    [AuthenticationException: The remote certificate is invalid according to the validation procedure.]
       System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception) +1425171

    [WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.]
       System.Net.WebClient.UploadDataInternal(Uri address, String method, Byte[] data, WebRequest& request) +302
       System.Net.WebClient.UploadString(Uri address, String method, String data) +170
       System.Net.WebClient.UploadString(String address, String method, String data) +35
       Telerik.Web.UI.SchedulerWebServiceClient.GetResources() +460

    [Exception: Unable to retrieve response message]
       Telerik.Web.UI.SchedulerWebServiceClient.GetResources() +622

    Setup web service in rad scheduler:
    <WebServiceSettings Path="SchedulerWebService.asmx"   
                    ResourcePopulationMode="ServerSide" /> 

    Handle on resource populating 





            protected void RadScheduler1_ResourcesPopulating(object sender, Telerik.Web.UI.ResourcesPopulatingEventArgs e)  
                HttpCookie cookie = FormsAuthentication.GetAuthCookie(User.Identity.Name, false);  
                string cookieHeader = string.Format("{0}={1}", cookie.Name, cookie.Value);  
                e.Headers.Add(HttpRequestHeader.Cookie, cookieHeader);  
  2. T. Tsonev
    T. Tsonev avatar
    2760 posts

    Posted 30 Nov 2009 Link to this post


    Since you're accessing the RadScheduler web service via HTTPS, you'll need to handle the certificate validation using the ServerCertificateValidationCallback.

    This is a short sample. Be sure to actually verify the certificate in the actual production code.

    ServicePointManager.ServerCertificateValidationCallback = ValidateCertificate;
    // ...
    protected virtual bool ValidateCertificate(Object obj, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
        if (errors == SslPolicyErrors.None)
            return true;
        return false;

    I hope this helps.

    Tsvetomir Tsonev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft R3 2016 release webinar banner
  4. Mehmet
    Mehmet avatar
    100 posts
    Member since:
    Jun 2014

    Posted 16 Sep 2015 in reply to T. Tsonev Link to this post

    Hi Tsvetomir,

    I am facing the same issue and I have to find out what to do asap. 
    This is how we define the web service method call

    <WebServiceSettings Path="Schedule/SchedulerWebService.asmx" ResourcePopulationMode="ServerSide">

    Where is that above example snippet code supposed to be stated ? global asax ???  

    Thank you

  5. Plamen
    Plamen avatar
    2723 posts

    Posted 21 Sep 2015 Link to this post


    Since it is a global "setting" it would be preferred to set it in the Application_Start method in Global.asax. Yet this is a rather general issue that is not related to RadScheduler so I would recommend you to refer to some other ASP. NET forum.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top