0

I'm working through a tutorial to become familiar with using Visual Studio, and selected the Report Website option. In the datasource connection wizard, I selected ODBC and there's a question asking Yes/No to save sensitive information in the connection string, along with a note stating it's a security risk to do so. So I selected No.

Now what? How do I connect? When I run the basic report, there's an error "Cannot create a connection to data source"

devlin carnate
  • 8,309
  • 7
  • 48
  • 82

1 Answers1

0

You need to make sure it is set as a "Trusted Connection".

http://msdn.microsoft.com/en-us/library/ms811006.aspx

Trusted_Connection This parameter specifies whether the data source should use trusted connections when connecting to SQL Server. 1 specifies trusted connections; omitting the parameter specifies no trusted connections. For more information, see "Integrated and Standard Security."

To set a trusted connection set the following parameter in your connection string instead of User Id and Password

Trusted_Connection=True;

For more info on this see this answer.

You can also encrypt the connection strings stored in web.config. See the section marked "Encrypting Configuration File Sections Using Protected Configuration" in the linked page.

Community
  • 1
  • 1
SilverlightFox
  • 32,436
  • 11
  • 76
  • 145