Symptoms
After installing versaSRS and attempting to login to the application, the following error is reported;
"Error Accessing Database. Login failed for user “NT AUTHORITY\NETWORK SERVICE”. Microsoft OLE DB Provider for SQL Server.
Resolution
This is a commonly reported SQL Server Issue, and can be rectified in the following manner;
For MS Win 2000/XP installations:
VersaDev have provided a script to resolve this situation. Download (right-click, Save-as) the script here; http://www.versadev.com/downloads/versasrs/patches/VersaSRS_GrantPermissions_ForLocal.txt
Before applying the script, define the settings <TRUSTEDACCOUNT> appropriately as defined in the above Text File. This setting will be dependant on your Operating System. Examples of syntax are included in the file.
Via Query Analyzer in MS SQL Server Enterprise Manager, apply this script.
If this does not work or does not resolve the problem, please refer to the following MS SQL related Knowledge Base Article here; http://www.cgnit.com/resources/ntauthority_networkservice_error.html
For MS Win 2003 installations:
(1) Grant permissions to the database by running the script in MS SQL Query Analyser; "VersaSRS_GrantPermissions_ForRemote.sql" (found under the default install path of "Program Files\VersaDev\VersaSRS\Setup\SQLScripts").
This should then set the authentication to SQL authentication, which will then require a change to the versaSRS Application web.config file as per step (2).
(2) Open the versaSRS web.config file using a text editor (found under the default install path of "Program Files\VersaDev\VersaSRS\VersaSRS).
Under <configuration><appSettings><add key="DSN" ... />, change the value attribute of the key to reflect your DSN connection string setting, using 'versasrs' and 'versa2003' as the uid and password respectively.
You will then need to change the following web.config sections of both VersaSRS and VersaSRSWebServices as follows;
<add key="DSN" value="provider=SQLOLEDB.1;data source=SERVER; initial catalog=VERSASRS;uid=versasrs;pwd=versa2003" />
Where SERVER is the name of your SQL server.
Note: Within the web.config of versaSRS set the value of checklistDSN and CRMDSN to the same value as defined by the DSN connection string settings.