+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Unable to connect to the remote server

Unable to connect to the remote server

4 posts, 0 answered
  1. Matt
    Matt avatar
    20 posts
    Registered:
    17 Oct 2008
    21 Jan 2009
    Link to this post

    Unable to connect to the remote server

    Hi we've been getting the error below for sometime in our live environment, it has been causing login errors and a lot of frustration for users.

    I finally got some time  to look at this properly today, and my first thought was that I would remove the newsletters module, since we don't and probably will never use it.

    It then occured to me to post here to see if there were any other modules that rely on the dyanmically generated proxy that I should remove while I'm at it, ( to ensure I don't get the same error with another module! ).
    I've been working under the assumption that this error was related to permissions on the SiteFinity/ServiceAssemblies directory, and that the application was unable to generate the proxy file as it doesn't have write permissions.

    What I just noticed in the below error, as I was depersonalising it to post, was that the WsdlHelper was trying to connect to our external live IP address, ( presumably it's using the hostname and .Net.Sockets is resolving it), our web servers are in a farm behind load balancers, and having just checked into it I've found that the routing from the web servers to the external facing IP is not available. 

    It seems likely that this is responsible for these errors rather than the fact that the proxy cannot be generated. (It would seem to fit with the sockets / timeout error, (whereas if the service simply didn't exist on the target server you would expect a fast 404 response ). I've put an entry into the hosts file for now, but if there isn't already it might be useful to make the hostname for this internal service reference configurable.

    I think I'm still going to go ahead with removing the newsletters module, and anything else that uses the dynamic proxy ( if I can ), so info on any other modules that use this would be appreciated.

    Slightly depersonalised error -- >

    ------------------------------------------------
    Timestamp: 21/01/2009 09:48:36
    Message: HandlingInstanceID: d1e269ad-f793-4aff-be5d-4a01ed469a7a
    An exception of type 'System.Net.WebException' occurred and was caught.
    -----------------------------------------------------------------------
    01/21/2009 09:48:36
    Type : System.Net.WebException, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Message : Unable to connect to the remote server
    Source : System
    Help link :
    Status : ConnectFailure
    Response :
    Data : System.Collections.ListDictionaryInternal
    TargetSite : System.Net.WebResponse GetResponse()
    Stack Trace :    at System.Net.HttpWebRequest.GetResponse()
       at Telerik.WebServices.DynamicProxy.WsdlHelper.GetWsdlFromUri(String uri, Cookie authCookie)
       at Telerik.WebServices.DynamicProxy.WebServiceDynamicProxy.BuildProxy()
       at Telerik.Notifications.Services.MailingServiceProxy..ctor(String wsdlUri)
       at Telerik.Notifications.Newsletters.DataManager.OnInitialized()
       at Telerik.ManagerBase`1.Initialize()
       at Telerik.ManagerBase`1..ctor(String providerName)
       at Telerik.ManagerBase`1..ctor()
       at Telerik.Notifications.Newsletters.DataManager..ctor()
       at Telerik.Notifications.Newsletters.DataManager.get_Providers()
       at Telerik.Notifications.Newsletters.DataManager.get_SecurityRoots()
       at Telerik.Notifications.Newsletters.NewsletterModule.get_SecurityRoots()
       at Telerik.Cms.Web.UI.Util.CheckPermissions(IModule module, Int32 perm)
       at Telerik.Cms.Web.UI.MainMenuSourceView.ExecuteSelect(DataSourceSelectArguments arguments)
       at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
       at System.Web.UI.WebControls.DataBoundControl.PerformSelect()
       at Admin_Admin.Page_Load(Object sender, EventArgs e)
       at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
       at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
       at System.Web.UI.Control.OnLoad(EventArgs e)
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    Additional Info:

    MachineName : MyMachine
    TimeStamp : 21/01/2009 09:48:36
    FullName : Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    AppDomainName : /LM/W3SVC/1/ROOT-1-123456
    ThreadIdentity : adminusername
    WindowsIdentity : NT AUTHORITY\NETWORK SERVICE
    Inner Exception
     ---------------
     Type : System.Net.Sockets.SocketException, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
     Message : A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 62.190.136.164:80
     Source : System
     Help link :
     ErrorCode : 10060
     SocketErrorCode : TimedOut
     NativeErrorCode : 10060
     Data : System.Collections.ListDictionaryInternal
     TargetSite : Void DoConnect(System.Net.EndPoint, System.Net.SocketAddress)
     Stack Trace :    at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
        at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
        at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)

    Category: OurWebApp
    Priority: 1
    EventId: -1
    Severity: Error
    Title:
    Machine: MyMachine
    Application Domain: /LM/W3SVC/1/ROOT-1-123456
    Process Id: 4504
    Process Name: c:\windows\system32\inetsrv\w3wp.exe
    Win32 Thread Id: 5288
    Thread Name:
    Extended Properties: RawUrl - /sitefinity/admin/Pages.aspx
    Connection - Keep-Alive
    Accept - image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/xaml+xml, application/vnd.ms-xpsdocument, application/x-ms-xbap, application/x-ms-application, application/x-shockwave-flash, */*
    Accept-Language - en-gb
    Cookie - cookiedatahidden
    Host - www.myhost.com
    Referer - http://www.myhost.com/sitefinity/admin/
    User-Agent - Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648)
    UA-CPU - x86
    X-REWRITE-URL - /sitefinity/admin/Pages.aspx
    SessionID - q34vwc55kjdztq45nqvv5d45

    ------------------------------------------------

  2. Matt
    Matt avatar
    20 posts
    Registered:
    17 Oct 2008
    21 Jan 2009
    Link to this post
    >>I've put an entry into the hosts file for now, but if there isn't already it might >>be useful to make the hostname for this internal service reference >>configurable.

    To answer my own implied question here I've just spotted in reflector that this can be configured.. using the MailingServiceWsdl attribute on the notifcations section in the config.

    the question remains though about other modules that are dependant on the MalingServiceProxy
  3. Matt
    Matt avatar
    20 posts
    Registered:
    17 Oct 2008
    22 Jan 2009
    Link to this post

    Further to the previous, having made the hosts entry we now get the following,
    Suspect that giving the IIS_WPG write permissions would resolve this, but must admit I'm always reluctant to give IIS write permissions if it can be avoided, and particularily for a module that unlikely to ever use :).

    Again I'd still like to know if removing the Notifications Newsletters module will be sufficient to stop this error happing, as it is stopping our CMS users from logging in on a frequent basis. I don't know why but this happens intermittently I've tried each server individually in the farm and you can log in, locally and remotely. But sometimes users are struggling to login, retrying a couple of times usually works for me, but our main cms user has reported more persistent problems.

    Given the intermittent nature of the problem, I'm starting to suspect that the wsdl proxy is only generated when one server in the farm tries to access the web service on another server. Since the hostname is resolved to the load balanced IP address ( now the internal load balanced ip address , rather than the external one that the servers didn't have a valid route to ). It seems that if the server that is first hit resolves its hostname to its own IP address it doesn't create the wsdl proxy and the login works, but if it resolves to a different server in the farm it tries to create the proxy and fails.

    ------------------------------------------------
    Timestamp: 22/01/2009 11:40:48
    Message: HandlingInstanceID: 7e6477f9-61aa-4e93-9d80-279bfb8bdf2d
    An exception of type 'System.UnauthorizedAccessException' occurred and was caught.
    ----------------------------------------------------------------------------------
    01/22/2009 11:40:48
    Type : System.UnauthorizedAccessException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Message : Access to the path 'C:\Inetpub\wwwroot\MyAppDir\Sitefinity\ServiceAssemblies\z9ymvaop.tmp' is denied.
    Source : mscorlib
    Help link :
    Data : System.Collections.ListDictionaryInternal
    TargetSite : Void WinIOError(Int32, System.String)
    Stack Trace :    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
       at System.CodeDom.Compiler.TempFileCollection.EnsureTempNameCreated()
       at System.CodeDom.Compiler.TempFileCollection.AddExtension(String fileExtension, Boolean keepFile)
       at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)
       at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)
       at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource(CompilerParameters options, String[] sources)
       at Telerik.WebServices.DynamicProxy.WebServiceDynamicProxy.BuildAssemblyFromWsdl(String strWsdl)
       at Telerik.WebServices.DynamicProxy.WebServiceDynamicProxy.BuildProxy()
       at Telerik.Notifications.Services.MailingServiceProxy..ctor(String wsdlUri)
       at Telerik.Notifications.Newsletters.DataManager.OnInitialized()
       at Telerik.ManagerBase`1.Initialize()
       at Telerik.ManagerBase`1..ctor(String providerName)
       at Telerik.ManagerBase`1..ctor()
       at Telerik.Notifications.Newsletters.DataManager..ctor()
       at Telerik.Notifications.Newsletters.DataManager.get_Providers()
       at Telerik.Notifications.Newsletters.DataManager.get_SecurityRoots()
       at Telerik.Notifications.Newsletters.NewsletterModule.get_SecurityRoots()
       at Telerik.Cms.Web.UI.Util.CheckPermissions(IModule module, Int32 perm)
       at Telerik.Cms.Web.UI.MainMenuSourceView.ExecuteSelect(DataSourceSelectArguments arguments)
       at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
       at System.Web.UI.WebControls.DataBoundControl.PerformSelect()
       at Admin_Admin.Page_Load(Object sender, EventArgs e)
       at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
       at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
       at System.Web.UI.Control.OnLoad(EventArgs e)
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    Additional Info:

    MachineName : MyMachineName
    TimeStamp : 22/01/2009 11:40:48
    FullName : Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    AppDomainName : /LM/W3SVC/1/ROOT-1-1234567
    ThreadIdentity : myadminusername
    WindowsIdentity : NT AUTHORITY\NETWORK SERVICE
    Category: MyEventCategory
    Priority: 1
    EventId: -1
    Severity: Error
    Title:
    Machine: MyMachineName
    Application Domain: /LM/W3SVC/1/ROOT-1-1234567
    Process Id: 7252
    Process Name: c:\windows\system32\inetsrv\w3wp.exe
    Win32 Thread Id: 6448
    Thread Name:
    Extended Properties: RawUrl - /sitefinity/admin/Pages.aspx
    Connection - Keep-Alive
    Accept - image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/xaml+xml, application/vnd.ms-xpsdocument, application/x-ms-xbap, application/x-ms-application, application/x-shockwave-flash, */*
    Accept-Language - en-gb
    Cookie - cookiedatahidden
    Host - www.mywebsite.com
    Referer - http://www.mywebsite.com/sitefinity/admin/default.aspx
    User-Agent - Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648)
    UA-CPU - x86
    X-REWRITE-URL - /sitefinity/admin/Pages.aspx
    SessionID - qsjzqzel5ahny5ryx3ouez45

    ------------------------------------------------

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    23 Jan 2009
    Link to this post
    Hello Matt,

    The first error is thrown from the Newsletter module. The second one is a permission issue. My suggestions are:
    1. Grant write permissions to ASP account to the restricted directory  C:\Inetpub\wwwroot\MyAppDir\Sitefinity\ServiceAssemblies\z9ymvaop.tmp' is denied.
    If the above does not help, you could try removing the Newsletter module from the web.config file( in case you do not want to use it)

     <modules> 
            <add type="Telerik.Cms.Engine.GenericContentModule, Telerik.Cms.Engine" /> 
            <add type="Telerik.News.NewsModule, Telerik.News" /> 
            <add type="Telerik.Blogs.BlogsModule, Telerik.Blogs" /> 
            <add type="Telerik.Lists.ListModule, Telerik.Lists" /> 
            <add type="Telerik.Polls.PollModule, Telerik.Polls" /> 
            <add type="Telerik.Forums.ForumsModule, Telerik.Forums" /> 
            <add type="Telerik.Libraries.LibrariesModule, Telerik.Libraries" /> 
            <add type="Telerik.Events.EventsModule, Telerik.Events" /> 
            <add type="Telerik.Notifications.Newsletters.NewsletterModule, Telerik.Notifications" /> 
          </modules> 


    There is a problem with the Newsletter module related to the remote server connections. The issue is being investigated.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Register for webinar
4 posts, 0 answered