发生未处理的访问异常、msmq、Sharepoint 错误

发布于 2024-08-08 21:52:59 字数 2882 浏览 4 评论 0原文

我的服务器重新启动后出现了一个问题。我在 SharePoint 中有一些功能,可以用来做各种事情。他们所做的一件事是将项目添加到几个不同的 MSMQ 队列中。服务器重新启动后,如果我尝试登录到 SharePoint,然后转到我的自定义页面,然后单击该页面中的按钮(然后将创建 msmq 项目),我会进入一个显示以下内容的页面:以下:

该网站拒绝显示该网页 此错误(HTTP 403 禁止)意味着 Internet Explorer 能够连接到该网站,但无权查看该网页

如果我深入研究事件日志,我会在应用程序中发现以下错误:

Event ID: 1314
An unhandled access exception has occurred

AND in the Security event logs:

3 of these:
Event ID: 560
Object Open:
    Object Server:  SC Manager
    Object Type:    SERVICE OBJECT
    Object Name:    MSDTC
....
    Accesses:   Query status of service 

Event ID: 560
Object Open:
    Object Server:  SC Manager
    Object Type:    SC_MANAGER OBJECT
    Object Name:    ServicesActive
...
    Image File Name:    C:\WINDOWS\system32\services.exe
...
    Accesses:   Connect to service controller 
            Query service database lock state 

Event ID: 560
Object Open:
    Object Server:  SC Manager
    Object Type:    SERVICE OBJECT
    Object Name:    MSDTC
...
    Image File Name:    C:\WINDOWS\system32\services.exe
...
    Accesses:   Query service configuration information 

另外,如果我挖掘在 SharePoint 日志中,我发现以下错误:

访问 /my/site/url/MyPage.aspx 时出现应用程序错误,Error=Access 被拒绝。 (HRESULT 异常:0x80070005 (E_ACCESSDENIED)) 服务器堆栈跟踪:位于 System.Transactions.Oletx.IDtcProxyShimFactory.ConnectToProxy(字符串 节点名称、Guid 资源管理器标识符、IntPtr 管理标识符、 布尔& nodeNameMatches, UInt32&行踪大小、CoTaskMemHandle& 行踪Buffer、IResourceManagerShim&资源管理器垫片)位于 System.Transactions.Oletx.DtcTransactionManager.Initialize() 在 System.Transactions.Oletx.DtcTransactionManager.get_ProxyShimFactory() 在 System.Transactions.Oletx.OletxTransactionManager.CreateTransaction(TransactionOptions 属性)在 System.Transactions.TransactionStatePromoted.EnterState(InternalTransaction TX)...
...在 System.Transactions.EnlistableStates.Promote(InternalTransaction tx)
在 System.Transactions.Transaction.Promote() 处 System.Transactions.TransactionInterop.ConvertToOletxTransaction(事务 交易)于 System.Transactions.TransactionInterop.GetDtcTransaction(事务 交易)于 System.ServiceModel.Channels.MsmqQueue.GetNativeTransaction(MsmqTransactionMode 交易模式)在 System.ServiceModel.Channels.MsmqQueue.SendDtcTransacted(NativeMsmqMessage 消息、MsmqTransactionMode 事务模式)位于 System.ServiceModel.Channels.MsmqQueue.Send(NativeMsmqMessage消息, MsmqTransactionMode 交易模式) at System.ServiceModel.MsmqIntegration.MsmqIntegrationOutputChannel.OnSend(消息 消息,TimeSpan 超时)在 System.ServiceModel.Chann...

我有两台虚拟机,一台用于 Web(共享点)机器,一台用于数据库机器(其中存储所有内容数据库等)。数据库服务器是主域控制器,两台计算机属于同一域。我已创建一个用于 SharePoint 应用程序池的域用户。

奇怪的是,通过转到应用程序的不同部分并运行该代码(这也会在 msmq 中添加一个条目)可以使错误消失。一旦完成,应用程序的所有其余部分都会正常工作。

任何帮助将不胜感激。

注意:我注意到该错误与 SharePoint 站点的 IIS 中的匿名用户 (IUSR...) 有关。我将该用户更改为域管理员用户,并且不再发生该错误。所以,这与 IUSR.. 用户的权限有关,但我不知道是什么......

I have an issue that is occurring after my server reboots. I have some features in SharePoint, for doing various things. One thing they do is add items into a couple of different MSMQ queues. Immediately after a server reboot, if I try to log in to SharePoint and I go to a custom page of mine, and click on a button within that page (which would then create the msmq item) I get taken to a page that displays the following:

The website declined to show this webpage
This error (HTTP 403 Forbidden) means that Internet Explorer was able to connect to the website, but it does not have permission to view the webpage

If I dig in to the Event Logs I find the following errors in Application:

Event ID: 1314
An unhandled access exception has occurred

AND in the Security event logs:

3 of these:
Event ID: 560
Object Open:
    Object Server:  SC Manager
    Object Type:    SERVICE OBJECT
    Object Name:    MSDTC
....
    Accesses:   Query status of service 

Event ID: 560
Object Open:
    Object Server:  SC Manager
    Object Type:    SC_MANAGER OBJECT
    Object Name:    ServicesActive
...
    Image File Name:    C:\WINDOWS\system32\services.exe
...
    Accesses:   Connect to service controller 
            Query service database lock state 

Event ID: 560
Object Open:
    Object Server:  SC Manager
    Object Type:    SERVICE OBJECT
    Object Name:    MSDTC
...
    Image File Name:    C:\WINDOWS\system32\services.exe
...
    Accesses:   Query service configuration information 

ALSO, if I dig in to the SharePoint logs, I find the following errors:

Application error when access /my/site/url/MyPage.aspx, Error=Access
is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
Server stack trace: at
System.Transactions.Oletx.IDtcProxyShimFactory.ConnectToProxy(String
nodeName, Guid resourceManagerIdentifier, IntPtr managedIdentifier,
Boolean& nodeNameMatches, UInt32& whereaboutsSize, CoTaskMemHandle&
whereaboutsBuffer, IResourceManagerShim& resourceManagerShim) at
System.Transactions.Oletx.DtcTransactionManager.Initialize() at
System.Transactions.Oletx.DtcTransactionManager.get_ProxyShimFactory()
at
System.Transactions.Oletx.OletxTransactionManager.CreateTransaction(TransactionOptions
properties) at
System.Transactions.TransactionStatePromoted.EnterState(InternalTransaction
tx) ...
...at System.Transactions.EnlistableStates.Promote(InternalTransaction tx)
at System.Transactions.Transaction.Promote() at
System.Transactions.TransactionInterop.ConvertToOletxTransaction(Transaction
transaction) at
System.Transactions.TransactionInterop.GetDtcTransaction(Transaction
transaction) at
System.ServiceModel.Channels.MsmqQueue.GetNativeTransaction(MsmqTransactionMode
transactionMode) at
System.ServiceModel.Channels.MsmqQueue.SendDtcTransacted(NativeMsmqMessage
message, MsmqTransactionMode transactionMode) at
System.ServiceModel.Channels.MsmqQueue.Send(NativeMsmqMessage message,
MsmqTransactionMode transactionMode) at
System.ServiceModel.MsmqIntegration.MsmqIntegrationOutputChannel.OnSend(Message
message, TimeSpan timeout) at System.ServiceModel.Chann...

I have two VMs, one for the web (sharepoint) machine, and one of the DB machine (where all the content dbs etc are stored). The DB server is a primary domain controller, and both machines are part of the same domain. I've created a domain user to use for the SharePoint application pool.

Strangely, it is possible to make the errors go away by going to a different part of my application and running that code (which also adds an entry into the msmq). Once that is done, then all of the rest of the application works as normal.

Any help would be incredibly appreciated.

Note: I noticed that the error had something to do with the anonymous user (IUSR...) in IIS for the SharePoint site. I changed that user to be a domain administrator user, and the error no longer happens. So, it's something to do with the permissions of the IUSR.. user, but I don't know what...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

方觉久 2024-08-15 21:52:59

天哪,

好吧,所以我尝试了一些东西,这是一个很渺茫的机会,但我已经无计可施了。

我将所有与 MSMQ 通信的代码(将项目添加到队列中)封装在具有提升权限的运行中,并且它有效!

SPSecurity.RunWithElevatedPrivileges(委托()
{
//此处为MSMQ代码
});

现在,我可以重新启动服务器,并执行之前出错的操作,并且工作正常!

O M G

Ok, so I tried something, it was a LONG shot, but I was at my wits end.

I wrapped all of the code that was talking to the MSMQ (adding items to the queue) in the run with elevated privelages thang, and it worked!!!!

SPSecurity.RunWithElevatedPrivileges(delegate()
{
//MSMQCode here
});

Now, I can reboot the server, and do the stuff that was erroring before, and it works fine!

來不及說愛妳 2024-08-15 21:52:59

考虑在服务器重新启动时运行预热脚本。

http://blogs.msdn.com/joelo/archive/ 2006/08/13/697044.aspx

Consider running warm up scripts upon server reboot.

http://blogs.msdn.com/joelo/archive/2006/08/13/697044.aspx

尽揽少女心 2024-08-15 21:52:59

给每个人对 inetpub\wss 等下的 bin 目录的读取权限。

Give everyone read permission to the bin directory under inetpub\wss etc..

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文