错误:数据库'master'中的CREATE DATABASE权限被拒绝。

编程入门 行业动态 更新时间:2024-10-20 00:24:18
本文介绍了错误:数据库'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权限被拒绝。

本文发布于:2023-10-15 03:04:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1493053.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:被拒   权限   错误   数据库   master

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!