简体   繁体   English

如何为IIS配置SQL Server Express 2017

[英]How do I configure SQL Server Express 2017 for IIS

I have a new install of SQL Server Express 2017 running on Windows Server 2016. IIS 10 cannot access the database on this SQL Server. 我有一个新安装的Windows Server 2016上运行的SQL Server Express2017。IIS10无法访问此SQL Server上的数据库。 (No problem from Visual Studio.) What security do I need to configure in SQL Server, IIS, and the file system (.mdf files)? (Visual Studio没问题。)我需要在SQL Server,IIS和文件系统(.mdf文件)中配置什么安全性? I have researched this for many hours, but cannot find a current solution. 我已经研究了许多小时,但是找不到当前的解决方案。 I used to be able to solve this by adding NETWORK SERVICE or SYSTEM under NT AUTHORITY, but that doesn't seem to do the trick. 我曾经能够通过在NT AUTHORITY下添加NETWORK SERVICE或SYSTEM来解决此问题,但这似乎并不能解决问题。 Does something have to be done with Application Pools? 应用程序池是否需要做些事情?

From your comments I guess that you should map your login to your database: 根据您的评论,我想您应该将登录名映射到数据库:

use xxx;
create user [WEBBER\s4$] from login [WEBBER\s4$];

This will fix your error but for normal working you should also give the necessary permissions to your user. 这将解决您的错误,但是对于正常工作,您还应该向用户授予必要的权限。

If it should have control over database xxx, make him db_owner like this: 如果它应该控制数据库xxx,则使他成为db_owner,如下所示:

ALTER ROLE [db_owner] ADD MEMBER  [WEBBER\s4$];

The "strange" name you see is your pc's name, this is because Network Service or Local System accounts goes to network under the pc name. 您看到的“奇怪”名称是您的计算机名称,这是因为网络服务或本地系统帐户以该计算机名称进入网络。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何配置IIS以便在连接到SQL Server时使用用户的域凭据? - How do I configure IIS so that the user's domain credentials are used when connecting to SQL server? 配置IIS 8以进行SQL Server身份验证 - Configure IIS 8 for SQL Server Authentication 如何在IIS Express中设置AspMaxRequestEntityAllowed? - How Do I Set AspMaxRequestEntityAllowed In IIS Express? 如何配置IIS或Web服务器以允许其读取和写入文件? - How do I configure IIS or the web server to allow it to read and write files? 如何在IIS6和asp.net中配置上载文件夹? 赢得服务器2003 SP2 - How do I configure a upload folder in IIS6 and asp.net? win server 2003 sp2 如何在IIS 7上配置asp.net以读取/写入文件服务器上的文件? - How do I configure asp.net on IIS 7 to read/write files on a file server? 如何配置 IIS Express 以调试子目录中的应用程序? - How to configure IIS Express to debug an application in a subdirectory? 如何配置IIS来处理真正大的文件上传? - How do I configure IIS to handle really large file uploads? 如何配置 IIS 以接受 POST 请求? - How do I Configure IIS to accept POST requests? 如何将 VS19 路径更改为 IIS Express? - How do I change VS19 path to IIS Express?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM