Sharepoint 2010 http 400 自定义操作错误(功能区)

发布于 2024-11-26 11:45:37 字数 6786 浏览 0 评论 0原文

在我的生产环境(win2008)上,我收到 400 错误(请求错误),“服务器在处理请求时遇到错误。有关更多详细信息,请参阅服务器日志”。如果我尝试对文档库元素执行自定义操作,则会出现错误。

如果我尝试获取 http://sharepoint.product.com:8080/_vti_bin/client .svc/ProcessQuery 我收到 400 错误。但是当我尝试 GET my localhost 时返回 405(没关系,因为我使用 GET 而不是 POST),

我尝试设置 FailedRequest 日志记录,但没有记录此错误。

Fiddler 请求和响应

POST /pro%20XXX/Forms/AllItems.aspx?RootFolder=%2Fpro%20XXX%2FGarwolin&FolderCTID=0x0120000187CA95D092EC41B3757A02269D8D12&View={25EAB044-0F7F-4428-A493-FB0B6AC9A913} HTTP/1.1

HTTP/1.1 401 Unauthorized
Server: Microsoft-IIS/7.0
SPRequestGuid: 7ba8dbfd-df03-4289-b97f-af3a8c01d308
WWW-Authenticate: NTLM
X-Powered-By: ASP.NET
MicrosoftSharePointTeamServices: 14.0.0.4762
Date: Thu, 28 Jul 2011 06:59:23 GMT
Content-Length: 0
Proxy-Support: Session-Based-Authentication


POST /pro%20XXX/Forms/AllItems.aspx?RootFolder=%2Fpro%20XXX
%2FGarwolin&FolderCTID=0x0120000187CA95D092EC41B3757A02269D8D12&View={25EAB044-0F7F-4428-A493-FB0B6AC9A913} HTTP/1.1
HTTP/1.1 401 Unauthorized
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
WWW-Authenticate: NTLM TlRMTVNTUAACAAAAFAAUADgAAAAFgomiS//Gvbz0rhMAAAAAAAAAAMAAwABMAAAABgByFwAAAA9FAEsATwBLAEEATABPAFIASQBBAAIAFABFAEsATwBLAEEATABPAFIASQBBAAEAEABIAFAARwBVAEUAUwBUADEABAAiAEUAawBvAGsAYQBsAG8AcgBpAGEALgBjAG8AbQAuAHAAbAADADQASABQAEcAVQBFAFMAVAAxAC4ARQBrAG8AawBhAGwAbwByAGkAYQAuAGMAbwBtAC4AcABsAAUAIgBFAGsAbwBrAGEAbABvAHIAaQBhAC4AYwBvAG0ALgBwAGwABwAIAPpMSOLzTMwBAAAAAA==
Date: Thu, 28 Jul 2011 06:59:24 GMT
Content-Length: 341
Proxy-Support: Session-Based-Authentication

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Not Authorized</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Not Authorized</h2>
<hr><p>HTTP Error 401. The requested resource requires user authentication.</p>
</BODY></HTML>


POST /pro%20XXX/Forms/AllItems.aspx?RootFolder=%2Fpro%20XXX%2FGarwolin&FolderCTID=0x0120000187CA95D092EC41B3757A02269D8D12&View={25EAB044-0F7F-4428-A493-FB0B6AC9A913} HTTP/1.1

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Encoding: gzip
Vary: Accept-Encoding
Server: Microsoft-IIS/7.0
SPRequestGuid: 22795fa6-ba9b-4c58-b80f-b156b06ff331
Set-Cookie: WSS_KeepSessionAuthenticated={288a5ad3-46ea-4f8c-b1ce-2b32472a69d1}; path=/
X-SharePointHealthScore: 0
Set-Cookie: WSS_KeepSessionAuthenticated={288a5ad3-46ea-4f8c-b1ce-2b32472a69d1}; path=/
X-AspNet-Version: 2.0.50727
Set-Cookie: http%3A%2F%2Fsharepoint%2EXXX%2Ecom%2Epl%3A8080%2FDiscovery=WorkspaceSiteName=UEtC&WorkspaceSiteUrl=aHR0cDovL3NoYXJlcG9pbnQuZWtva2Fsb3JpYS5jb20ucGw6ODA4MA==&WorkspaceSiteTime=MjAxMS0wNy0yOFQwNjo1OToyNA==; expires=Sat, 27-Aug-2011 06:59:24 GMT; path=/_vti_bin/Discovery.asmx
X-Powered-By: ASP.NET
MicrosoftSharePointTeamServices: 14.0.0.4762
Date: Thu, 28 Jul 2011 06:59:24 GMT
Content-Length: 34907


POST /_layouts/inplview.aspx?List={6BA8B198-7710-4750-936B-7273027EA98C}&View={25EAB044-0F7F-4428-A493-FB0B6AC9A913}&ViewCount=15&ListViewPageUrl=http://sharepoint.XXX.com.pl:8080/pro%2520XXX/Forms/AllItems.aspx&IsXslView=TRUE&Cmd=EcbView&FolderCTID=0x0120000187CA95D092EC41B3757A02269D8D12 HTTP/1.1

HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Transfer-Encoding: chunked
Content-Type: text/html; charset=utf-8
Content-Encoding: gzip
Expires: -1
Vary: Accept-Encoding
Server: Microsoft-IIS/7.0
SPRequestGuid: c7ae7a42-ccd7-46f9-9c36-057cb9093da9
Set-Cookie: WSS_KeepSessionAuthenticated={288a5ad3-46ea-4f8c-b1ce-2b32472a69d1}; path=/
X-SharePointHealthScore: 0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
MicrosoftSharePointTeamServices: 14.0.0.4762
Date: Thu, 28 Jul 2011 06:59:27 GMT

113c


POST /_vti_bin/client.svc/ProcessQuery HTTP/1.1

HTTP/1.1 400 Bad Request
Cache-Control: private
Content-Type: text/html
Server: Microsoft-IIS/7.0
SPRequestGuid: 6eddd041-2427-42f6-b69c-1c6ac1d3abd1
Set-Cookie: WSS_KeepSessionAuthenticated={288a5ad3-46ea-4f8c-b1ce-2b32472a69d1}; path=/
X-SharePointHealthScore: 0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
MicrosoftSharePointTeamServices: 14.0.0.4762
Date: Thu, 28 Jul 2011 06:59:29 GMT
Content-Length: 1165

<?xml version="1.0" encoding="utf-8"?><HTML><HEAD><STYLE type="text/css">#content{ FONT-SIZE: 0.7em; PADDING-BOTTOM: 2em; MARGIN-LEFT: 30px}BODY{MARGIN-TOP: 0px; MARGIN-LEFT: 0px; COLOR: #000000; FONT-FAMILY: Verdana; BACKGROUND-COLOR: white}P{MARGIN-TOP: 0px; MARGIN-BOTTOM: 12px; COLOR: #000000; FONT-FAMILY: Verdana}PRE{BORDER-RIGHT: #f0f0e0 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #f0f0e0 1px solid; MARGIN-TOP: -5px; PADDING-LEFT: 5px; FONT-SIZE: 1.2em; PADDING-BOTTOM: 5px; BORDER-LEFT: #f0f0e0 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: #f0f0e0 1px solid; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e5e5cc}.heading1{MARGIN-TOP: 0px; PADDING-LEFT: 15px; FONT-WEIGHT: normal; FONT-SIZE: 26px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 3px; MARGIN-LEFT: -30px; WIDTH: 100%; COLOR: #ffffff; PADDING-TOP: 10px; FONT-FAMILY: Tahoma; BACKGROUND-COLOR: #003366}.intro{MARGIN-LEFT: -15px}</STYLE>
<TITLE>Request Error</TITLE></HEAD><BODY>
<DIV id="content">
<P class="heading1">Request Error</P>
<BR/>
<P class="intro">The server encountered an error processing the request. See server logs for more details.</P>
<P class="intro"></P>
</DIV>
</BODY></HTML>

以及来自自定义操作的 xml 请求

<Request xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009" SchemaVersion="14.0.0.0" LibraryVersion="14.0.4762.1000" ApplicationName="Javascript Library">
<Actions>
<ObjectPath Id="1" ObjectPathId="0"></ObjectPath>
<ObjectPath Id="3" ObjectPathId="2"></ObjectPath>
<ObjectPath Id="5" ObjectPathId="4"></ObjectPath>
<Query Id="6" ObjectPathId="2">
<Query SelectAllProperties="true">
<Properties></Properties>
</Query>
</Query>
<Query Id="7" ObjectPathId="4">
<Query SelectAllProperties="true">
<Properties></Properties>
</Query>
</Query>
</Actions>
<ObjectPaths>
<StaticProperty Id="0" TypeId="{3747adcd-a3c3-41b9-bfab-4a64dd2f1e0a}" Name="Current"></StaticProperty>
<Property Id="2" ParentId="0" Name="Site"></Property>
<Property Id="4" ParentId="0" Name="Web"></Property>
</ObjectPaths>
</Request>

On my production environment (win2008) I get 400 error (Request Error), "The server encountered an error processing the request. See server logs for more details". The error appears if I try to execute my custom action on document library elemeents.

If I try get http://sharepoint.production.com:8080/_vti_bin/client.svc/ProcessQuery I get 400 error. But when I try GET my localhost the 405 (it is ok because I use GET not POST)

I tried to set up FailedRequest logging but this error is not logged.

Fiddler requests and responses

POST /pro%20XXX/Forms/AllItems.aspx?RootFolder=%2Fpro%20XXX%2FGarwolin&FolderCTID=0x0120000187CA95D092EC41B3757A02269D8D12&View={25EAB044-0F7F-4428-A493-FB0B6AC9A913} HTTP/1.1

HTTP/1.1 401 Unauthorized
Server: Microsoft-IIS/7.0
SPRequestGuid: 7ba8dbfd-df03-4289-b97f-af3a8c01d308
WWW-Authenticate: NTLM
X-Powered-By: ASP.NET
MicrosoftSharePointTeamServices: 14.0.0.4762
Date: Thu, 28 Jul 2011 06:59:23 GMT
Content-Length: 0
Proxy-Support: Session-Based-Authentication


POST /pro%20XXX/Forms/AllItems.aspx?RootFolder=%2Fpro%20XXX
%2FGarwolin&FolderCTID=0x0120000187CA95D092EC41B3757A02269D8D12&View={25EAB044-0F7F-4428-A493-FB0B6AC9A913} HTTP/1.1
HTTP/1.1 401 Unauthorized
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
WWW-Authenticate: NTLM TlRMTVNTUAACAAAAFAAUADgAAAAFgomiS//Gvbz0rhMAAAAAAAAAAMAAwABMAAAABgByFwAAAA9FAEsATwBLAEEATABPAFIASQBBAAIAFABFAEsATwBLAEEATABPAFIASQBBAAEAEABIAFAARwBVAEUAUwBUADEABAAiAEUAawBvAGsAYQBsAG8AcgBpAGEALgBjAG8AbQAuAHAAbAADADQASABQAEcAVQBFAFMAVAAxAC4ARQBrAG8AawBhAGwAbwByAGkAYQAuAGMAbwBtAC4AcABsAAUAIgBFAGsAbwBrAGEAbABvAHIAaQBhAC4AYwBvAG0ALgBwAGwABwAIAPpMSOLzTMwBAAAAAA==
Date: Thu, 28 Jul 2011 06:59:24 GMT
Content-Length: 341
Proxy-Support: Session-Based-Authentication

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Not Authorized</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Not Authorized</h2>
<hr><p>HTTP Error 401. The requested resource requires user authentication.</p>
</BODY></HTML>


POST /pro%20XXX/Forms/AllItems.aspx?RootFolder=%2Fpro%20XXX%2FGarwolin&FolderCTID=0x0120000187CA95D092EC41B3757A02269D8D12&View={25EAB044-0F7F-4428-A493-FB0B6AC9A913} HTTP/1.1

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Encoding: gzip
Vary: Accept-Encoding
Server: Microsoft-IIS/7.0
SPRequestGuid: 22795fa6-ba9b-4c58-b80f-b156b06ff331
Set-Cookie: WSS_KeepSessionAuthenticated={288a5ad3-46ea-4f8c-b1ce-2b32472a69d1}; path=/
X-SharePointHealthScore: 0
Set-Cookie: WSS_KeepSessionAuthenticated={288a5ad3-46ea-4f8c-b1ce-2b32472a69d1}; path=/
X-AspNet-Version: 2.0.50727
Set-Cookie: http%3A%2F%2Fsharepoint%2EXXX%2Ecom%2Epl%3A8080%2FDiscovery=WorkspaceSiteName=UEtC&WorkspaceSiteUrl=aHR0cDovL3NoYXJlcG9pbnQuZWtva2Fsb3JpYS5jb20ucGw6ODA4MA==&WorkspaceSiteTime=MjAxMS0wNy0yOFQwNjo1OToyNA==; expires=Sat, 27-Aug-2011 06:59:24 GMT; path=/_vti_bin/Discovery.asmx
X-Powered-By: ASP.NET
MicrosoftSharePointTeamServices: 14.0.0.4762
Date: Thu, 28 Jul 2011 06:59:24 GMT
Content-Length: 34907


POST /_layouts/inplview.aspx?List={6BA8B198-7710-4750-936B-7273027EA98C}&View={25EAB044-0F7F-4428-A493-FB0B6AC9A913}&ViewCount=15&ListViewPageUrl=http://sharepoint.XXX.com.pl:8080/pro%2520XXX/Forms/AllItems.aspx&IsXslView=TRUE&Cmd=EcbView&FolderCTID=0x0120000187CA95D092EC41B3757A02269D8D12 HTTP/1.1

HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Transfer-Encoding: chunked
Content-Type: text/html; charset=utf-8
Content-Encoding: gzip
Expires: -1
Vary: Accept-Encoding
Server: Microsoft-IIS/7.0
SPRequestGuid: c7ae7a42-ccd7-46f9-9c36-057cb9093da9
Set-Cookie: WSS_KeepSessionAuthenticated={288a5ad3-46ea-4f8c-b1ce-2b32472a69d1}; path=/
X-SharePointHealthScore: 0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
MicrosoftSharePointTeamServices: 14.0.0.4762
Date: Thu, 28 Jul 2011 06:59:27 GMT

113c


POST /_vti_bin/client.svc/ProcessQuery HTTP/1.1

HTTP/1.1 400 Bad Request
Cache-Control: private
Content-Type: text/html
Server: Microsoft-IIS/7.0
SPRequestGuid: 6eddd041-2427-42f6-b69c-1c6ac1d3abd1
Set-Cookie: WSS_KeepSessionAuthenticated={288a5ad3-46ea-4f8c-b1ce-2b32472a69d1}; path=/
X-SharePointHealthScore: 0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
MicrosoftSharePointTeamServices: 14.0.0.4762
Date: Thu, 28 Jul 2011 06:59:29 GMT
Content-Length: 1165

<?xml version="1.0" encoding="utf-8"?><HTML><HEAD><STYLE type="text/css">#content{ FONT-SIZE: 0.7em; PADDING-BOTTOM: 2em; MARGIN-LEFT: 30px}BODY{MARGIN-TOP: 0px; MARGIN-LEFT: 0px; COLOR: #000000; FONT-FAMILY: Verdana; BACKGROUND-COLOR: white}P{MARGIN-TOP: 0px; MARGIN-BOTTOM: 12px; COLOR: #000000; FONT-FAMILY: Verdana}PRE{BORDER-RIGHT: #f0f0e0 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #f0f0e0 1px solid; MARGIN-TOP: -5px; PADDING-LEFT: 5px; FONT-SIZE: 1.2em; PADDING-BOTTOM: 5px; BORDER-LEFT: #f0f0e0 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: #f0f0e0 1px solid; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e5e5cc}.heading1{MARGIN-TOP: 0px; PADDING-LEFT: 15px; FONT-WEIGHT: normal; FONT-SIZE: 26px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 3px; MARGIN-LEFT: -30px; WIDTH: 100%; COLOR: #ffffff; PADDING-TOP: 10px; FONT-FAMILY: Tahoma; BACKGROUND-COLOR: #003366}.intro{MARGIN-LEFT: -15px}</STYLE>
<TITLE>Request Error</TITLE></HEAD><BODY>
<DIV id="content">
<P class="heading1">Request Error</P>
<BR/>
<P class="intro">The server encountered an error processing the request. See server logs for more details.</P>
<P class="intro"></P>
</DIV>
</BODY></HTML>

And xml request from custom action

<Request xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009" SchemaVersion="14.0.0.0" LibraryVersion="14.0.4762.1000" ApplicationName="Javascript Library">
<Actions>
<ObjectPath Id="1" ObjectPathId="0"></ObjectPath>
<ObjectPath Id="3" ObjectPathId="2"></ObjectPath>
<ObjectPath Id="5" ObjectPathId="4"></ObjectPath>
<Query Id="6" ObjectPathId="2">
<Query SelectAllProperties="true">
<Properties></Properties>
</Query>
</Query>
<Query Id="7" ObjectPathId="4">
<Query SelectAllProperties="true">
<Properties></Properties>
</Query>
</Query>
</Actions>
<ObjectPaths>
<StaticProperty Id="0" TypeId="{3747adcd-a3c3-41b9-bfab-4a64dd2f1e0a}" Name="Current"></StaticProperty>
<Property Id="2" ParentId="0" Name="Site"></Property>
<Property Id="4" ParentId="0" Name="Web"></Property>
</ObjectPaths>
</Request>

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

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

发布评论

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

评论(1

空气里的味道 2024-12-03 11:45:37

解决方案是重新创建 Web 应用程序并将身份验证设置为 Windows Classic。

the solution was recreating web application and setting authentication to windows classic.

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