错误:数据库'master'中的CREATE DATABASE权限被拒绝。 [英] Error : CREATE DATABASE permission denied in database 'master'.
本文介绍了错误:数据库'master'中的CREATE DATABASE权限被拒绝。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我刚刚完成了asp.net应用程序的设置。我将我的数据库放入App_Data文件夹。我的问题是它在设置之前尝试从我的应用程序运行时工作正常..但是当我尝试在安装后从IIS(Internet信息服务器)运行时,它给出错误:
I have just finished my setup of asp.net application. I put my database into App_Data folder. My problem is it is working fine when i try to run from my application before setup.. But when i try to run from IIS (Internet information Server) after installation, it gives error :
CREATE DATABASE permission denied in database 'master'.
Cannot attach the file 'C:\inetpub\wwwroot\BigProject\App_Data\project.mdf' as database 'project'.
我的连接字符串如下所示..
My connection string is like below..
<connectionStrings>
<add name="database_con" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\project.mdf;Initial Catalog=project;Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
我搜索谷歌上几乎所有内容但没有找到任何内容。希望你能帮助我..任何帮助将不胜感激。如何解决这个问题?
I searched almost everything on google but didn't find anything. Hope you will Help me.. Any help would be appreciated. How to solve this prolbem??
推荐答案
选项1:
您的关键字是:应用程序池身份
您需要为App Pool用户设置一个帐户有权在SQL上创建数据库
http://www.iis.net/learn/manage/configuring-security/application-pool-identities
选项2:
尝试删除Initial Catalog = project;来自你的连接字符串。
Option 1:
Your keyword are: application pool identities
You need to set App Pool user an account have permission to create DB on SQL
http://www.iis.net/learn/manage/configuring-security/application-pool-identities
Option 2:
Give a try to remove "Initial Catalog=project;" from your connection string.
这篇关于错误:数据库'master'中的CREATE DATABASE权限被拒绝。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文