gpt4 book ai didi

c# - System.Net.CookieException -- ... 超出配置的最大大小,即 '4096'

转载 作者:太空宇宙 更新时间:2023-11-03 11:01:44 25 4
gpt4 key购买 nike

我正在使用带有自定义安全框架的自定义 .Net 应用程序。除其他事项外,该框架使用户身份验证能够无缝传递到 SQL Server Reporting Services,以便在查看器中访问报告。但是,某些用户出现以下错误:

2013-07-03 11:43:00,580 Default.Page_Load(:0) - Initialized ReportServer Url: 'https://www.DOMAIN.com/ReportServer' 2013-07-03 11:43:00,696 ReportNavigation.LoadReportCatalog(:0) - Error while accessing the Report Catalog from Web Service Exception: System.Net.CookieException Message: The value size of the cookie is '.ActionSecurity=AAEAAAD___AQAAAAAAAAAMAgAAAE1TeXN0ZW0uV2ViLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49YjAzZjVmN2YxMWQ1MGEzYQUBAAAALVN5c3RlbS5XZWIuU2VjdXJpdHkuRm9ybXNBdXRoZW50aWNhdGlvblRpY2tldAkAAAAIX1ZlcnNpb24FX05hbWULX0V4cGlyYXRpb24KX0lzc3VlRGF0ZQ1fSXNQZXJzaXN0ZW50CV9Vc2VyRGF0YQtfQ29va2llUGF0aBBfSW50ZXJuYWxWZXJzaW9uDV9JbnRlcm5hbERhdGEAAQAAAAEBAAcIDQ0BCAICAAAAAQAAAAYDAAAADy5BY3Rpb25TZWN1cml0eQC1nPAlRtBIAHnk1vdF0IgBBgQAAAC4GEFBRUFBQURfX19fX0FRQUFBQUFBQUFBTUFnQUFBRTlEWVdsMGFHNWxjM05OVFM1WFpXSXVVMlZqZFhKcGRIa3NJRlpsY25OcGIyNDlNUzR3TGpBdU1Dd2dRM1ZzZEhWeVpUMXVaWFYwY21Gc0xDQlFkV0pzYVdOTFpYbFViMnRsYmoxdWRXeHNEQU1BQUFCTlUzbHpkR1Z0TGxkbFlpd2dWbVZ5YzJsdmJqMDBMakF1TUM0d0xDQkRkV3gwZFhKbFBXNWxkWFJ5WVd3c0lGQjFZbXhwWTB0bGVWUnZhMlZ1UFdJd00yWTFaamRtTVRGa05UQmhNMkVGQVFBQUFEQkRZV2wwYUc1bGMzTk5UUzVYWldJdVUyVmpkWEpwZEhrdVFXTjBhVzl1VTJWamRYSnBkSGxRY21sdVkybHdZV3dJQUFBQUNWOXBaR1Z1ZEdsMGVRaGZkbVZ5YzJsdmJndGZaWGh3YVhKbFJHRjBaUXBmYVhOemRXVkVZWFJsRFY5d2NtOTJhV1JsY2s1aGJXVUpYM1Z6WlhKT1lXMWxFMTlwYzBGamRHbHZia...'. This exceeds the configured maximum size, which is '4096'. Source: System at System.Net.CookieContainer.Add(Cookie cookie, Boolean throwOnError) at System.Net.CookieContainer.Add(Cookie cookie)
at APPNAMEMM.Reporting.WebServiceClient.ReportServerProxy.GetCookies() in D:\APPNAME\Code\Core\APPNAMEMM.Reporting.WebServiceClient\ReportServerProxy.cs:line 131 at APPNAMEMM.Reporting.WebServiceClient.ReportServerProxy.GetWebRequest(Uri uri) in D:\APPNAME\Code\Core\APPNAMEMM.Reporting.WebServiceClient\ReportServerProxy.cs:line 71 at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at APPNAMEMM.Reporting.WebServiceClient.ReportingService.ReportingService2005.ListChildren(String Item, Boolean Recursive) in D:\APPNAME\Code\Core\APPNAMEMM.Reporting.WebServiceClient\Web References\ReportingService\Reference.cs:line 871 at APPNAMEMM.Reporting.WebServiceClient.ReportCatalogService.GetCatalogItemList(String path) in D:\APPNAME\Code\Core\APPNAMEMM.Reporting.WebServiceClient\ReportCatalogService.cs:line 162 at APPNAMEMM.Reporting.WebServiceClient.ReportCatalogService.GetReportList(String path, Boolean showHidden, String subFolder) in D:\APPNAME\Code\Core\APPNAMEMM.Reporting.WebServiceClient\ReportCatalogService.cs:line 116 at APPNAMEMM.Reporting.WebServiceClient.ReportCatalogService.GetReportList(String path, Boolean showHidden) in D:\APPNAME\Code\Core\APPNAMEMM.Reporting.WebServiceClient\ReportCatalogService.cs:line 108 at APPNAMEMM.Reporting.WebServiceClient.ReportCatalogService.GetReportList(String path) in D:\APPNAME\Code\Core\APPNAMEMM.Reporting.WebServiceClient\ReportCatalogService.cs:line 81 at ReportNavigation.LoadReportCatalog()

2013-07-03 11:43:00,749 ASP.global_asax.Application_Error(:0) - An unexpected error has occurred. (URL: /Income Reports/Default.aspx
Form Fields: Exception: System.Configuration.Provider.ProviderException Message: Unable to retrieve current HttpContext for this operation. Source: APPNAMEMM.Web.Security at APPNAMEMM.Web.Security.ActionSecurity.DeleteCookie() in D:\APPNAME\Code\Core\APPNAMEMM.Web.Security\ActionSecurityProvider\ActionSecurity.cs:line 265 at APPNAMEMM.Web.Security.ActionSecurityModule.OnLeave(Object sender, EventArgs e) in D:\APPNAME\Code\Core\APPNAMEMM.Web.Security\ActionSecurityProvider\ActionSecurityModule.cs:line 192 at System.Web.HttpApplication.RaiseOnPreSendRequestHeaders()

我已尝试根据一些建议(包括 http://www.iis.net/configreference/system.webserver/security/requestfiltering/requestlimits)更改应用程序以及 ReportServer 和 ReportManager 文件夹中的 web.config。和 http://bartwullems.blogspot.com/2010/04/uploading-large-files-in-iis-7.html

但是,我仍然收到错误消息,用户无法访问报告。还有什么我需要做的吗?谢谢。

最佳答案

  1. 你都设置了吗? http://forums.iis.net/t/1169846.aspx

  2. 但是您得到的是 CookieException,而不是最大请求限制异常。以上设置与cookies无关。他们指的是文件上传到服务器。

  3. 您似乎是想将超过 4K 的内容塞进 cookie。如果是这样,你不能..这是系统限制What is the maximum size of a web browser's cookie's key? ..实际上,您的里程可能因浏览器而异,但如果您在 cookie 中设置超过 4K,您可能需要改变策略,例如切换到 session 。

  4. 对 N° 3 说是吗?您可以在此处更正错误..但您仍然可能会遇到问题 3 :-)

取自您自己的堆栈跟踪 这超过了配置的最大大小,即“4096”...在 System.Net.CookieContainer.Add(Cookie cookie) ...ReportServerProxy.cs:line 131


var container = new System.Net.CookieContainer {
MaxCookieSize = 8192
};

container.Add(new System.Net.Cookie {
Value = "somehugevalue"
});

关于c# - System.Net.CookieException -- ... 超出配置的最大大小,即 '4096',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17453837/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com