Hi,
I am new to NAV and am learning NAV 2009 per my employer's request. I read that in order to switch the database in the RTC you have to change it in the .config file. When I try to change anything in the .config file I get the following error:
"The operation could not be completed - access is denied."
It opens in Visual Studio 2005. I tried changing it in Notepad but I get the same error message. Would appreciate any help.
0
Comments
Solution:
Copy the usersettings.config file to your "my documents" folder. Open, change, save, and copy back to the folder it was in.
New problem:
Now I need to find out what I need to change as just changing the database name in the config file didn't seem to work.
2) After you change the config, you need to restart the service which use it - it means the NAV service tier...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I tried changing this line in the config file:
<add key="DatabaseName" value="Demo Database NAV (6-0)"></add>
to my new database name (which is "test") Then restarted my computer.
The Role Tailored Client would not open at all so I had to change it back.
Perhaps I need to change more than just the line of code : <add key="DatabaseName" value="Demo Database NAV (6-0)"></add>
Could you tell me what else I need to change in order to get the RTC to open a different database? I know how to do this in C/Side Classic Client with SQL but not in the RTC.
Thank you.
2) You need to change the value only, and restart the NST. Check the event log for more info about possible problems.
3) If you place the file into the folder under normal permissions (not as administrator leveraged permissions), the file you see could be somewhere else than you think. Just read something about UAC and folder mapping under Win7 and Vista.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
This is my config file under ...Dynamics NAV 2009/ Services/
What do I need to change in here to access another database? I have learned other programming languages but I am very new to NAV. I am trying to understand and I appreciate your patience. :-k
<?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"></add>
<!--
Name of the database server to connect to.
-->
<add key="DatabaseServer" value="GATEWAY_LAPTOP"></add>
<!--
Name of the database instance to connect to.
-->
<add key="DatabaseInstance" value=""></add>
<!--
Name of the database to connect to.
-->
<add key="DatabaseName" value="Demo Database NAV (6-0)"></add>
<!--
Name of the Microsoft Dynamics NAV Server instance to connect
to (for client) or listen on (for server).
-->
<add key="ServerInstance" value="DynamicsNAV"></add>
<!--
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"></add>
<!--
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"></add>
<!--
Turns on or off the https for Web Services
-->
<add key="WebServiceSSLEnabled" value="false"></add>
<!--
Maximum permitted size of a Web Services request, in kilobytes
-->
<add key="WebServicesMaxMsgSize" value="512"></add>
<!--
Turns on or off NTLM authentication protocol for Web Services
false: Use SPNEGO (recommended)
true: Use NTLM only
-->
<add key="WebServicesUseNTLMAuthentication" value="false"></add>
<!--
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"></add>
<!--
The security services used to protect the client/server data stream.
Valid options: EncryptAndSign, Sign, None
-->
<add key="ProtectionLevel" value="EncryptAndSign"></add>
<!--
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="40"></add>
<!--
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="150"></add>
<!--
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="00:10:00"></add>
<!--
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"></add>
<!--
Threshold for when to start compressing data sets to avoid that they
consume prohibitive amounts of memory.
-->
<add key="CompressionThreshold" value="64"></add>
<!--
Sets the Metadata Provider cache size (in number in objects cached).
Set to 0 to disable cache.
-->
<add key="MetadataProviderCacheSize" value="150"></add>
<!--
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="5"></add>
<!--
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"></add>
<!--
Sets the maximum number of items to serialize or deserialize, in KB
-->
<add key="MaxItemsInObjectGraph" value="128"></add>
<!--
Sets the default size of a chunk, in KB. Should be a value between 4 and 80.
-->
<add key="ChunkSize" value="28"></add>
</appSettings>
After that, you need to go into Control Panel - Administration tools - Services (or just search for services in start menu), find the correct service there (e.g. something like "Microsoft Dynamics NAV Server") and restart it.
Look into event log, that there are no errors or warnings in the application log connected to this restarted service. If not, you can try to open RTC again at it should connect to correct DB.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I tried to change that same value before - but I did not stop and restart the service. Now I know.
What if I wanted to keep the NST on my computer and connect to a database on another computer? Where, in the CustomSettings.config file, do I put the IP address of the computer that has the SQL database? I tried changing some things but it did not work.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.