What is the best authentication mode for asp.net application using SQL Server 2005 Express? -
i have inherited asp.net 2.0 application uses sql server 2005 express database , grappling authentication mode.
i have read windows authentication more secure , locally works fine. use default machine account , trusted connection in connection string similar :
value="trusted_connection=true;server=mymachinename\sqlexpress;database=databasename;pooling=false"
on server though, find myself having grant more privileges aspnet user (execute, update) in database , wondering if makes sense after all. login verification handled application.
does make more sense set database user , use credentials in connection string? acceptable connection string?
value="server=myservername\sqlexpress; database=mydatabase; user id=myusername; password=mypassword;"
if you’re not in need high security you’ll doing fine sql authentication.
try connection string instead
<add name="connstring" connectionstring="data source=myservername\sqlexpress; initial catalog=mydatabase; persist securityinfo=true;user id=myusername; password=mypassword" providername="system.data.sqlclient"/>
Comments
Post a Comment