“用dbo权限运行ASP.NET工作进程”是什么意思?

时间:2022-09-03 20:12:06

I am having issues implementing SqlSiteMapProvider using the Wicked Code article. I am using VB.NET and SQL Server 2008 - and the OnSiteMapChanged event is not firing (the SqlDepdencyCache just seems to simply be not working at all).

我在使用Wicked Code文章实现SqlSiteMapProvider时遇到问题。我正在使用VB.NET和SQL Server 2008 - 并且OnSiteMapChanged事件没有被触发(SqlDepdencyCache似乎根本就不起作用)。

The article states "You also need to run the ASP.NET worker process with dbo privileges for SQL Server 2005 cache dependencies to work automatically.)"

该文章指出“您还需要运行具有dbo权限的ASP.NET辅助进程,以便SQL Server 2005缓存依赖项自动运行。”

I don't understand what this means. I know what the ASPNET user account is and that it runs aspnet_wp.exe which is basically the ASP.NET run time as I understand it. I know what DBO privs are on SQL. But my SQL and web servers are on different machines, and ASPNET is not a domain account. And it seems crazy to make it one to try to simply get the SqlDepdencyCache to work, and I have trouble believing everyone is doing this?

我不明白这意味着什么。我知道ASPNET用户帐户是什么,它运行aspnet_wp.exe,这基本上是我理解的ASP.NET运行时间。我知道DBO privs在SQL上是什么。但我的SQL和Web服务器位于不同的计算机上,ASPNET不是域帐户。尝试简单地让SqlDepdencyCache工作似乎很疯狂,我很难相信每个人都这样做?

Anyone have any clue what I'm missing here?

任何人都有任何线索我在这里缺少什么?

Thanks very much

非常感谢

EDIT: I FOUND MY ISSUE!!! SET NOCOUNT ON INSIDE MY STORED PROC WAS CAUSING IT!! BEWARE AS THIS IS NOWHERE IN THE MSDN DOCUMENTATION!!!!

编辑:我发现了我的问题!在我的存储PROC内部设置NOCOUNT导致它!请注意,因为这在MSDN文档中无处可寻!

2 个解决方案

#1


1  

SqlDependencyCache uses SqlDependency and SqlDependency deploys at runtime a set of services, queues and stored procedures in your database as part of its infrastructure. You can read this article on more details what really happens The Mysterious Notification.

SqlDependencyCache使用SqlDependency和SqlDependency在运行时将数据库中的一组服务,队列和存储过程部署为其基础结构的一部分。你可以阅读这篇文章,详细了解真正发生的神秘通知。

When you create your site map provider, you provide a connection string. This connection string specifies either a SQL login and password, or it specifies that SSPI (or Trusted, or Integrated) Authentication should be used. When a user and password are provided then this user is used to log in into your application database (the ASP database). When SSPI is used then the conenction is made using the ASP thread identity, which is either the app pool identity or the impersonated user identity. Whichever login ends up being used, this login must have the priviledges necessary to deploy the SqlDependency infrastructure (create a queue, create a service, create a stored procedure). The simplest way is to simply make this login's user in the database member of the db_owner role (which is the correct wording for what the article calls 'dbo priviledges').

创建站点地图提供程序时,您将提供连接字符串。此连接字符串指定SQL登录名和密码,或者指定应使用SSPI(或受信任或集成)身份验证。提供用户和密码后,此用户将用于登录应用程序数据库(ASP数据库)。当使用SSPI时,使用ASP线程标识进行连接,该标识是应用程序池标识或模拟的用户标识。无论最终使用哪个登录,此登录必须具有部署SqlDependency基础结构所需的特权(创建队列,创建服务,创建存储过程)。最简单的方法是在db_owner角色的数据库成员中简单地创建此登录用户(这是文章称为'dbo priviledges'的正确措辞)。

So depending on yoru connection string, your app pool identity and your impersonation settings, the database user that corresponds to the login used by the map provider must be added to the db_owner role. I can't tell what you need to do, because it all depends on the variable factors enumerated above.

因此,根据yoru连接字符串,应用程序池标识和模拟设置,必须将与地图提供程序使用的登录对应的数据库用户添加到db_owner角色。我不知道你需要做什么,因为这完全取决于上面列举的变量因素。

#2


2  

Your worker process identity needs to be changed to either a domain user OR a user with a matching username/password on both the web and database servers. The SQL Server would also need Windows authentication (or Mixed authentication) enabled.

您的工作进程标识需要更改为域用户或Web和数据库服务器上具有匹配用户名/密码的用户。 SQL Server还需要启用Windows身份验证(或混合身份验证)。

Under IIS 5 (Windows XP/2000), you need to modify the ASP.NET Process Identity in the machine.config file.

在IIS 5(Windows XP / 2000)下,您需要修改machine.config文件中的ASP.NET进程标识。

Under IIS 6 / 7 (Windows Vista/7/2003/2008/R2) you should just be able to modify the Application Pool identity. If this doesn't work, enable <identity impersonate="true" /> in your web.config.

在IIS 6/7(Windows Vista / 7/2003/2008 / R2)下,您应该能够修改应用程序池标识。如果这不起作用,请在web.config中启用

#1


1  

SqlDependencyCache uses SqlDependency and SqlDependency deploys at runtime a set of services, queues and stored procedures in your database as part of its infrastructure. You can read this article on more details what really happens The Mysterious Notification.

SqlDependencyCache使用SqlDependency和SqlDependency在运行时将数据库中的一组服务,队列和存储过程部署为其基础结构的一部分。你可以阅读这篇文章,详细了解真正发生的神秘通知。

When you create your site map provider, you provide a connection string. This connection string specifies either a SQL login and password, or it specifies that SSPI (or Trusted, or Integrated) Authentication should be used. When a user and password are provided then this user is used to log in into your application database (the ASP database). When SSPI is used then the conenction is made using the ASP thread identity, which is either the app pool identity or the impersonated user identity. Whichever login ends up being used, this login must have the priviledges necessary to deploy the SqlDependency infrastructure (create a queue, create a service, create a stored procedure). The simplest way is to simply make this login's user in the database member of the db_owner role (which is the correct wording for what the article calls 'dbo priviledges').

创建站点地图提供程序时,您将提供连接字符串。此连接字符串指定SQL登录名和密码,或者指定应使用SSPI(或受信任或集成)身份验证。提供用户和密码后,此用户将用于登录应用程序数据库(ASP数据库)。当使用SSPI时,使用ASP线程标识进行连接,该标识是应用程序池标识或模拟的用户标识。无论最终使用哪个登录,此登录必须具有部署SqlDependency基础结构所需的特权(创建队列,创建服务,创建存储过程)。最简单的方法是在db_owner角色的数据库成员中简单地创建此登录用户(这是文章称为'dbo priviledges'的正确措辞)。

So depending on yoru connection string, your app pool identity and your impersonation settings, the database user that corresponds to the login used by the map provider must be added to the db_owner role. I can't tell what you need to do, because it all depends on the variable factors enumerated above.

因此,根据yoru连接字符串,应用程序池标识和模拟设置,必须将与地图提供程序使用的登录对应的数据库用户添加到db_owner角色。我不知道你需要做什么,因为这完全取决于上面列举的变量因素。

#2


2  

Your worker process identity needs to be changed to either a domain user OR a user with a matching username/password on both the web and database servers. The SQL Server would also need Windows authentication (or Mixed authentication) enabled.

您的工作进程标识需要更改为域用户或Web和数据库服务器上具有匹配用户名/密码的用户。 SQL Server还需要启用Windows身份验证(或混合身份验证)。

Under IIS 5 (Windows XP/2000), you need to modify the ASP.NET Process Identity in the machine.config file.

在IIS 5(Windows XP / 2000)下,您需要修改machine.config文件中的ASP.NET进程标识。

Under IIS 6 / 7 (Windows Vista/7/2003/2008/R2) you should just be able to modify the Application Pool identity. If this doesn't work, enable <identity impersonate="true" /> in your web.config.

在IIS 6/7(Windows Vista / 7/2003/2008 / R2)下,您应该能够修改应用程序池标识。如果这不起作用,请在web.config中启用