本文介绍了错误:数据库'master'中的CREATE DATABASE权限被拒绝。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我刚刚完成了asp应用程序的设置。我将我的数据库放入App_Data文件夹。我的问题是它在设置之前尝试从我的应用程序运行时工作正常..但是当我尝试在安装后从IIS(Internet信息服务器)运行时,它给出错误:
I have just finished my setup of asp 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上创建数据库 www.iis/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 www.iis/learn/manage/configuring-security/application-pool-identities Option 2: Give a try to remove "Initial Catalog=project;" from your connection string.
更多推荐
错误:数据库'master'中的CREATE DATABASE权限被拒绝。
发布评论