I am trying to authenticate using the current windows user's credentials. My login has access to the database as I can login through SQL Management Studio with windows authentication.
I am running from Web Dev 2010 express(as admin), but eventually I want this through iis. It seems others from the tutorial are having the same problem, as shown in the comments on the tutorial page. I don't want a user and password sitting in my config
file. I thought "<identity impersonate="true" />" would use the windows authentication.
why not use windows authentication in a windows domain controlled intranet environment. If using SQL authentication, won't everyone have access? How to you hide/encrypt the user and password?
I was only using VS server for development/ learning as shown in the tutorial. Isn't this tutorial an official asp.net publication? I would hope for it to be accurate. How frustrating.
why not use windows authentication in a windows domain controlled intranet environment. If using SQL authentication, won't everyone have access? How to you hide/encrypt the user and password?
Set the Application Pool Identity to a domain user account with limited rights (access the database and access the application folders).
Please click 'Mark as Answer' if my reply has assisted you
I was only using VS server for development/ learning as shown in the tutorial. Isn't this tutorial an official asp.net publication? I would hope for it to be accurate. How frustrating.
You get the permission denied in database 'master'." typically when another user set up SQL sever on your machine. The "set up user" is added to the SQL logins - you are not, even if you are an admin.
Have you tried my tutorial series?
stinkyjak
Member
40 Points
82 Posts
MVC3 CTP5 "CREATE DATABASE permission denied in database 'master'."
Feb 14, 2011 05:01 PM|LINK
I am working through the MVC3 movie store tutorial and I am getting the error posted below.
+ $exception {"CREATE DATABASE permission denied in database 'master'."} System.Exception {System.Data.SqlClient.SqlException}
I have tried adding <identity impersonate="true" /> to the web.config with no luck.
CTP5 MVC3
raduenuca
All-Star
24675 Points
4250 Posts
Re: MVC3 CTP5 "CREATE DATABASE permission denied in database 'master'."
Feb 14, 2011 05:41 PM|LINK
What security settings do you have in SQL Server?
If you deploy the application in IIS then you need to give permissions to the Application Pool Indentity
If you run from Visual Studio..start Visual Studio with Run as Administrator (assuming that the Administrator has enough rights in your SQL Server).
or use SQL Authentification and just use an user and password in web.config (you need Mixed Authentification in SQL Server).
Radu Enuca | Blog
stinkyjak
Member
40 Points
82 Posts
Re: MVC3 CTP5 "CREATE DATABASE permission denied in database 'master'."
Feb 14, 2011 06:14 PM|LINK
I am trying to authenticate using the current windows user's credentials. My login has access to the database as I can login through SQL Management Studio with windows authentication.
I am running from Web Dev 2010 express(as admin), but eventually I want this through iis. It seems others from the tutorial are having the same problem, as shown in the comments on the tutorial page. I don't want a user and password sitting in my config file. I thought "<identity impersonate="true" />" would use the windows authentication.
<div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"><identity impersonate="true" /></div> <div></div>Thanks for any help you can provide.
ignatandrei
All-Star
134973 Points
21638 Posts
Moderator
MVP
Re: MVC3 CTP5 "CREATE DATABASE permission denied in database 'master'."
Feb 14, 2011 08:23 PM|LINK
1. do not use windows authentication in sql connection if you do not have an intranet site( and even here I do reccomend against)
2. do not use VS Server (Cassini), Please use IIS
ricka6
All-Star
15070 Points
2272 Posts
Microsoft
Moderator
Re: MVC3 CTP5 "CREATE DATABASE permission denied in database 'master'."
Feb 14, 2011 09:34 PM|LINK
why are you using MVC3 CTP5 and not MVC 3 RTM? The advise given is correct
stinkyjak
Member
40 Points
82 Posts
Re: MVC3 CTP5 "CREATE DATABASE permission denied in database 'master'."
Feb 15, 2011 03:10 PM|LINK
I was just trying to follow the tutorial. I will use whatever is best.
stinkyjak
Member
40 Points
82 Posts
Re: MVC3 CTP5 "CREATE DATABASE permission denied in database 'master'."
Feb 15, 2011 03:16 PM|LINK
why not use windows authentication in a windows domain controlled intranet environment. If using SQL authentication, won't everyone have access? How to you hide/encrypt the user and password?
I was only using VS server for development/ learning as shown in the tutorial. Isn't this tutorial an official asp.net publication? I would hope for it to be accurate. How frustrating.
raduenuca
All-Star
24675 Points
4250 Posts
Re: MVC3 CTP5 "CREATE DATABASE permission denied in database 'master'."
Feb 15, 2011 03:22 PM|LINK
Set the Application Pool Identity to a domain user account with limited rights (access the database and access the application folders).
Radu Enuca | Blog
ricka6
All-Star
15070 Points
2272 Posts
Microsoft
Moderator
Re: MVC3 CTP5 "CREATE DATABASE permission denied in database 'master'."
Feb 15, 2011 07:48 PM|LINK
See How To: Connect to SQL Server Using SQL Authentication in ASP.NET 2.0
You get the permission denied in database 'master'." typically when another user set up SQL sever on your machine. The "set up user" is added to the SQL logins - you are not, even if you are an admin. Have you tried my tutorial series?
ricka6
All-Star
15070 Points
2272 Posts
Microsoft
Moderator
Re: MVC3 CTP5 "CREATE DATABASE permission denied in database 'master'."
Feb 15, 2011 07:58 PM|LINK
I'm pretty sure he's using Cassini and not the real IIS. The tutorial doesn't work with IIS until you fix up the script/css references.
He needs to add himself to the SQL logins (with appropriate permissions).