My connection string, defined in Web.Config, states that the user or password is not required:
<connectionStrings> <add name="CinemaxConnectionString" connectionString="Data Source=PCName\SQLEXPRESS;Initial Catalog=Cinemax;Integrated Security=True" providerName="System.Data.SqlClient" /> </connectionStrings>
I would like to add a user and password, for example:
<connectionStrings> <add name="CinemaxConnectionString" connectionString="Data Source=PCName\SQLEXPRESS;Initial Catalog=Cinemax;User=cinemax; Password=abc" providerName="System.Data.SqlClient" /> </connectionStrings>
Obviously, for this you need to change some parameters on the Sql server to add a user and password . What is the best way to do this? I indicate that I have Sql Server 2005 Express, and the current authentication mode is "Sql Server and Windows Authentication" . Thanks in advance for your help. It would be nice to see a dual approach to this: the user interface and the code solution.
source share