Since the error is occurring in the report viewer, it indicates the report finds its connection string and tries to use it. The error is generated on the attempt for creating a connection object through the connection string, selected ADO.NET data provider and the related ADO.NET classes.
You might check the following settings of the report to verify the connection information:
1. SqlDataSource component's ConnectionString
- the string is the name of the connection string that will be searched in the web.config of the Reporting REST service's project;
2. SqlDataSource component's ProviderName
- the string is the name of the .NET data provider which should be the same as the provderName
attribute of the connection string stored under connectionStrings
3. The server address is correct;
4. The provided credentials to allow connection to the database;
5. For any security settings that may prevent connection to the database at the given port.
Most important, check the Reporting REST service's configuration file - it should contain a conectionStrings
element with an entry having name attribute the same as the SqlDataSource.ConnectionString property. You will have to ensure the database accepts external connections and the connectionString attribute (in the web.config) provides valid information for connecting the database.
Check the deployed web.config file and test the connection string added in the deployed file. Test connecting to the database with MSSQL Management Studio and the connection string in the deployed configuration file.
If you are changing connection strings at run-time as in Changing the connection string dynamically according to runtime data
, debug the code to get the used connection string.
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?
Telerik Feedback Portal
and vote to affect the priority of the items