Options

Navision 2009 sp1 "Unable to connect to the remote server"

kamranshehzadkamranshehzad Member Posts: 165
edited 2011-02-21 in NAV Three Tier
I am calling the webservices that were running fine on navision 2009 but in 2009 sp1 i have started getting this exception. I am calling a webservice (code unit exposed as webservice) and it works for a while and all of sudden it starts throwing this exception....

in eventvwr i get this exception..
Timestamp: 06/09/2009 22:54:20
Message: EXCEPTION occured in BuisnessLayer.ProcessDocument(...) : Unable to connect to the remote server


i have changed the customconfig file here are the file contents i have modified... please advise..
<?xml version="1.0" encoding="UTF-8"?>
<appSettings>
	<!--  The network protocol used to access the database. Valid options: Default, NamedPipes, Sockets -->
	<add key="NetType" value="Default"/>
	<!--  Name of the database server to connect to. -->
	<add key="DatabaseServer" value="NAVISION"/>
	<!--  Name of the database instance to connect to. -->
	<add key="DatabaseInstance" value=""/>
	<!-- Name of the database to connect to. -->
	<add key="DatabaseName" value="DEV"/>
	<!-- Name of the Microsoft Dynamics NAV Server instance to connect to (for client) or listen on (for server). -->
	<add key="ServerInstance" value="DynamicsNAV"/>
	<!--  The listening TCP port for the Microsoft Dynamics NAV Server. This is part of the server's URL. Valid range: 1-65535 -->
	<add key="ServerPort" value="7046"/>
	<!--  The listening HTTP port for the Microsoft Dynamics NAV  Business Web Services. This is part of the web service's URL. Valid range: 1-65535 -->
	<add key="WebServicePort" value="7047"/>
	<!-- Turns on or off the https for Web Services -->
	<add key="WebServiceSSLEnabled" value="false"/>
	<!-- Maximum permitted size of a Web Services request, in kilobytes -->
	<add key="WebServicesMaxMsgSize" value="1024"/>
	<!-- Turns on or off NTLM authentication protocol for Web Services false: Use SPNEGO (recommended) true: Use NTLM only -->
	<add key="WebServicesUseNTLMAuthentication" value="false"/>
	<!-- Maximum time in seconds a call from the client to the server may take to return. Time span format: [dd.]hh:mm:ss[.ff] dd: days hh: hours mm: minutes ss: seconds ff: fractions of a second Or "MaxValue" to indicate there is no timeout. -->
	<add key="OperationTimeout" value="MaxValue"/>
	<!-- The security services used to protect the client/server data stream. Valid options: EncryptAndSign, Sign, None -->
	<add key="ProtectionLevel" value="EncryptAndSign"/>
	<!-- Maximum number of concurrent client calls that can be active on the  Microsoft Dynamics NAV Server. To disable this setting set the value to "MaxValue". -->
	<add key="MaxConcurrentCalls" value="MaxValue"/>
	<!-- The maximum number of concurrent client connection that the service will accept. To disable this setting set the value to "MaxValue". -->
	<add key="MaxConcurrentConnections" value="MaxValue"/>
	<!-- Sets the grace period within which the client can reconnect to a running session. Time span format: [dd.]hh:mm:ss[.ff] dd: days hh: hours mm: minutes ss: seconds ff: fractions of a second Or "MaxValue" to indicate there is no timeout. -->
	<add key="ClientReconnectPeriod" value="MaxValue"/>
	<!-- Sets the maximum number of orphaned connections to be kept alive  simultaneouly for a maximum time specified by the  ClientReconnectPeriod setting. A connection becomes an orphan when the client becomes involuntarily disconnected from the server. -->
	<add key="MaxNumberOfOrphanedConnections" value="20"/>
	<!-- Threshold for when to start compressing data sets to avoid that they  consume prohibitive amounts of memory. -->
	<add key="CompressionThreshold" value="64"/>
	<!-- Sets the Metadata Provider cache size (in number in objects cached).  Set to 0 to disable cache. -->
	<add key="MetadataProviderCacheSize" value="150"/>
	<!-- Limits the size of files that can be uploaded in order to avoid out of memory errors. This value is in megabytes. -->
	<add key="MaxUploadSize" value="100"/>
	<!-- With the EnableDebugging flag set to true the Microsoft Dynamics NAV Server will start with debugging mode enabled.  This mode has three main functions: 1)	Upon first connection by a RoleTailored Client all C# for that application will be generated.   2)	C# files will be persisted between server restarts. 3)  Application Objects will be compiled with debug information. -->
	<add key="EnableDebugging" value="false"/>
	<!-- Sets the maximum number of items to serialize or deserialize, in KB -->
	<add key="MaxItemsInObjectGraph" value="128"/>
	<!-- Sets the default size of a chunk, in KB. Should be a value between 4 and 80. -->
	<add key="ChunkSize" value="80"/>
</appSettings>
KS

Answers

  • Options
    freddy.dkfreddy.dk Member, Microsoft Employee Posts: 360
    So when you restart the service tier you can again run for a while and then it crashes?

    are there any entries in the Event Log?
    Freddy Kristiansen
    Group Program Manager, Client
    Microsoft Dynamics NAV
    http://blogs.msdn.com/freddyk

    The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
  • Options
    kamranshehzadkamranshehzad Member Posts: 165
    Yes... the service was nav business service was initially crashing but then i put it on aut restart..
    and it works for a while like 2-3 mins and then it starts failing... it starts returning unable to connect to the remote server error....

    i used both IIS and vs dev webservers...

    event log has only error entry
    Service: 
    User: EASYCOM\Administrator
    Type: System.Data.SqlClient.SqlException
    Class: 11
    LineNumber: 0
    Number: -2
    Server: NAVISION
    State: 0
    Source: .Net SqlClient Data Provider
    ErrorCode: -2146232060
    Message: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
    

    and it didn't happen after a server restart.. but still getting unable to connect to remote server..

    regards
    KS
  • Options
    freddy.dkfreddy.dk Member, Microsoft Employee Posts: 360
    That looks like an event log on the client - are there anything on the service tier.
    The timeout is probably because the service tier has crashed - and the event log on the service tier could hopefully tell you why?
    (uncompiled codeunits or other things)
    Freddy Kristiansen
    Group Program Manager, Client
    Microsoft Dynamics NAV
    http://blogs.msdn.com/freddyk

    The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
  • Options
    kamranshehzadkamranshehzad Member Posts: 165
    event log was of server...running navision..
    i did recompile all code units / xmlports related to project....

    is there any other time out settings??

    regards,
    KS
  • Options
    HanenHanen Member Posts: 281
    Can anyone help me with this message in the event log???



    User:
    Type: Microsoft.Dynamics.Nav.Types.NavConfigurationException
    Message:
    Configuration file error:

    The configuration section cannot contain a CDATA or text element. (C:\Program Files (x86)\Microsoft Dynamics NAV\60\Service\CustomSettings.config line 52)
    StackTrace:
    at Microsoft.Dynamics.Nav.Types.ConfigSettings.GetRawSetting(String settingName, Boolean& specified)
    at Microsoft.Dynamics.Nav.Types.ConfigSettings.GetStringSetting(String settingName, String defaultValue)
    at Microsoft.Dynamics.Nav.Types.ConfigSettings.LoadServerInstance()
    at Microsoft.Dynamics.Nav.Types.ServerUserSettings.LoadSettings()
    at Microsoft.Dynamics.Nav.Types.ServerUserSettings.get_Instance()
    at Microsoft.Dynamics.Nav.WindowsServices.NavServerWindowsService.OnStart(String[] args)
    Source: Microsoft.Dynamics.Nav.Types
    Type: System.Configuration.ConfigurationErrorsException
    Message: The configuration section cannot contain a CDATA or text element. (C:\Program Files (x86)\Microsoft Dynamics NAV\60\Service\CustomSettings.config line 52)
    BareMessage: The configuration section cannot contain a CDATA or text element.
    Filename: C:\Program Files (x86)\Microsoft Dynamics NAV\60\Service\CustomSettings.config
    Line: 52
    StackTrace:
    at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)
    at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)
    at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
    at System.Configuration.BaseConfigurationRecord.GetSection(String configKey, Boolean getLkg, Boolean checkPermission)
    at System.Configuration.Configuration.GetSection(String sectionName)
    at System.Configuration.Configuration.get_AppSettings()
    at Microsoft.Dynamics.Nav.Types.ConfigSettings.GetRawSetting(String settingName, Boolean& specified)
    Source: System.Configuration
    Regards

    Hanen TALBI
  • Options
    kamranshehzadkamranshehzad Member Posts: 165
    Looks like your configuration file is not right.. what were you doing??
    KS
Sign In or Register to comment.