Академический Документы
Профессиональный Документы
Культура Документы
Connecttoasqlserver2008databasefromawebapplicationCodeProject
11,333,088 members 36,876 online
Sign in
home
articles
quick answers
discussions
features
community
help
Searchforarticles,questions,tips
Ask a Question
FAQ
Next
ASP.NET
Rate this:
Hello,
My question is how can i set a local database with my sql server management studio? and how i can
Top Experts in 24hrs
connect it with the asp.net application?
I saw a lot of tutorials on the net but i failed when i tried them, i had lot of errors and i'm new with
sql server and asp.net and i could not solve any of them.
0 OriginalGriff
2 Peter Leow
Cannot alter the user 'dbo'. Microsoft SQL Server, Error: 15150
BUTTONS:
OK
http://www.codeproject.com/Questions/521806/Connectplustoplusaplussqlplusserverplusplusdat
295
255
209
200
125
9,301
8,160
4,839
3,210
2,267
1/4
3/28/2015
Connecttoasqlserver2008databasefromawebapplicationCodeProject
Thanks
Add a Solution
2 solutions
Top Rated
Solution 1
Most Recent
Rate this:
In order to connect to the database, you need to use a SqlConnection[^] have a look at the example
in the end.
When you use local Sql Server instance, you can define a name of the computer or you can refer it
using . dot which is a shortcut for local computer in connection strings.
Not sure why you're trying to alter any user. When you connect to the database, you either use Sql
Server user authentication which means that you define a user name with a password in order to
connect to the database or you use windows authentication which again means that your current
credentials will be used for the connection.
If you use Windows authentication, notice that the credentials that are used with IIS are used for the
connection. For example, have a look at Setting up SQL Server 2008 for an ASP.NET website on IIS
7.0[^]
Comments
Espen Harlinn at 6Jan13 9:14am
5'ed!
Solution 2
Rate this:
http://blog.sqlauthority.com/2008/11/02/sqlserverfixerrorloginfailedforuserusernamethe
userisnotassociatedwithatrustedsqlserverconnection/[^]
http://www.codeproject.com/Questions/521806/Connectplustoplusaplussqlplusserverplusplusdat
2/4
3/28/2015
Connecttoasqlserver2008databasefromawebapplicationCodeProject
Preview
Existing Members
...or Join us
Password
Your Email
Optional Password
Forgot your password?
This content, along with any associated source code and files, is licensed under The Code Project Open License CPOL
http://www.codeproject.com/Questions/521806/Connectplustoplusaplussqlplusserverplusplusdat
3/4
3/28/2015
Connecttoasqlserver2008databasefromawebapplicationCodeProject
CodeProject, 503250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 4168498900 x 100
http://www.codeproject.com/Questions/521806/Connectplustoplusaplussqlplusserverplusplusdat
4/4