I m going to publish new weboiste developed in asp.net , i have used couple of stored procedures there
While working on development I use sql database 'sa' user but now i have created new user for that database and im using username and password for new user in web.config in connection string
I also given permission for that user to access stored procedure etc.
but when i publish this project with web config having connectionstring with new user i get error and if i use sa user it is working finely.
As it is security issue i want to replace sa user .
I suggest you trying to open Vs and then choose "Views"=>"Server Explorer" and then try to create a connection to the remote db first, and then if successfully, please try to copy the connection string from the property panel and paste into your web.config.
Check Server Roles in Login Property of the new user.
Select appropriate roles for the user based on authorization
Hi Thanks it worked, it was my mistake for first reply, I check the stored prcodure properties and then set user as db_owner, but I read your message carefully that you asked me to set properties og loin and it worked ..
Hi Thanks it worked, it was my mistake for first reply, I check the stored prcodure properties and then set user as db_owner, but I read your message carefully that you asked me to set properties og loin and it worked ..
Thanks a lot :)
Congratulation!
I'll close this issue so if you have anything urgent, please feedback by creating another new thread.
sonal.mcs
0 Points
15 Posts
Error when changed user in connectionstring in web.config for database
Nov 28, 2012 12:28 PM|LINK
Hi there
I m going to publish new weboiste developed in asp.net , i have used couple of stored procedures there
While working on development I use sql database 'sa' user but now i have created new user for that database and im using username and password for new user in web.config in connection string
I also given permission for that user to access stored procedure etc.
but when i publish this project with web config having connectionstring with new user i get error and if i use sa user it is working finely.
As it is security issue i want to replace sa user .
Could somebody help me what im missing here...
Thanks in advance :)
oned_gk
All-Star
36280 Points
7394 Posts
Re: Error when changed user in connectionstring in web.config for database
Nov 28, 2012 12:36 PM|LINK
Suwandi - Non Graduate Programmer
sh_asp.net
Member
59 Points
20 Posts
Re: Error when changed user in connectionstring in web.config for database
Nov 28, 2012 12:39 PM|LINK
Check Server Roles in Login Property of the new user.
Select appropriate roles for the user based on authorization
Sheik.
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Error when changed user in connectionstring in web.config for database
Nov 29, 2012 12:42 AM|LINK
Hello,
I suggest you trying to open Vs and then choose "Views"=>"Server Explorer" and then try to create a connection to the remote db first, and then if successfully, please try to copy the connection string from the property panel and paste into your web.config.
sonal.mcs
0 Points
15 Posts
Re: Error when changed user in connectionstring in web.config for database
Dec 03, 2012 10:09 AM|LINK
Hi
Thanks but I already have set the new user as db_owner, in database role_membership
sonal.mcs
0 Points
15 Posts
Re: Error when changed user in connectionstring in web.config for database
Dec 03, 2012 10:11 AM|LINK
given role as db_owner, db_datawriter, dd_datareader...
sonal.mcs
0 Points
15 Posts
Re: Error when changed user in connectionstring in web.config for database
Dec 03, 2012 10:21 AM|LINK
Hi Decker Dong - MSFT,
Thanks but that didnt work , I copied connectionstring, it is the same as my previous one...
though error , in my one of user control which using stored procedure,
sonal.mcs
0 Points
15 Posts
Re: Error when changed user in connectionstring in web.config for database
Dec 03, 2012 11:28 AM|LINK
Hi Thanks it worked, it was my mistake for first reply, I check the stored prcodure properties and then set user as db_owner, but I read your message carefully that you asked me to set properties og loin and it worked ..
Thanks a lot :)
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Error when changed user in connectionstring in web.config for database
Dec 04, 2012 12:25 AM|LINK
Congratulation!
I'll close this issue so if you have anything urgent, please feedback by creating another new thread.