Reputation: 384
I'm working with a custom .Net application with a custom security framework. Among other things the framework enables user authentication to seamlessly pass to SQL Server Reporting Services for accessing reports in the viewer. However, I'm getting the following error for certain users:
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()
I've tried altering the web.config in both the app and the ReportServer and ReportManager folder based upon some suggestions including http://www.iis.net/configreference/system.webserver/security/requestfiltering/requestlimits and http://bartwullems.blogspot.com/2010/04/uploading-large-files-in-iis-7.html
However, I'm still getting the error message and users are unable to access the reports. Is there something else I need to do? Thanks.
Upvotes: 2
Views: 2849
Reputation: 11744
You can use the localStorage
when the CookieStore
is limiting.
Code example:
localStorage.setItem('ActionSecurity', '[largevalue]');
localStorage.getItem('ActionSecurity');
Reference W3CSchools
Upvotes: 0
Reputation: 2416
Did you set both ? http://forums.iis.net/t/1169846.aspx
However you are getting a CookieException, not a max request limit exception. The above settings have nothing todo with cookies. They refer to file uploads to the server.
Seems like are you trying to cram over 4K into a cookie. If so, you can't ..it's a system limit What is the maximum size of a web browser's cookie's key? ..Actually your mileage may vary depending on browser, but if you are setting over 4K in cookies, you probably need to change tactics like switch to sessions.
Said yes to N° 3 ? You can correct the error here ..but you'll still probably run into problem N° 3 :-)
Taken from your own stacktrace This exceeds the configured maximum size, which is '4096' ... at 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"
});
Upvotes: 2