Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 11th, 2009, 02:40 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
Default requestLimits maxQueryString="length"

I have a querystring for a page which exceeds the IE limit (~2048 bytes). When this occurs there is no warning from IE - the link just fails to work. I read that this could be changed by adding <requestLimits maxQueryString="length"> to the webserver section of the web.config:

http://learn.iis.net/page.aspx/143/h...est-filtering/

I added this to the project in question, but increasing the setting to 10,000 does not appear to have permitted a larger querystring - the link still fails to work. I have been able to find very little information about it on-line.

Is the QS length hard-coded in IE or variable in ASP.NET? Have I misunderstood what this setting actually does or where it's supposed to be inserted? Is it only available in IIS 7?
 
Old August 11th, 2009, 03:19 PM
Lee Dumond's Avatar
Wrox Author
 
Join Date: Jan 2008
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

The URL limit is hardcoded into the browser, and varies slightly among the different browsers.

You can use request filtering to limit the size of the URL or querystring, which simply causes the server to return a 404 status code. This however has no effect whatsoever on the client. Even if you set request filtering to a very high limit, this simply means it will let a long querystring request through to the client without filtering it. However, the limits built into the client still apply.

There is no way to my knowledge to override the URL limit in IE.

I would advise that if your querystring is this long, you need to use a different mechanism to pass the information. Maybe encapsulate the data into a custom object and pass the object via Session or some other means.
__________________
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}
 
Old August 12th, 2009, 08:59 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
Default

Thanks for your quick response. IE is my only concern, but it sounds as though even upgrading to IIS7 will not help. Hard to believe somebody at MS would think that 2048 bytes should be more than enough for anybody! My projects always seem to test the limits of the available technology, lucky me!

As to your suggestion of changing my transport mechanism, the page is being called from a link on a Summary report which is opening a Detail report, not with a postback. The QS contains filter information to tell the detail Report what to list. I know that's a hell of a lot of data to pass in the querystring, but nothing else would work. Session variables proved too unreliable (see Session Variables Randomly Disappear? if you have an hour to read all the responses) and cookies are too small for my needs.

Barring any other solutions, I suppose I will have to write this data to a database record and pass the key in the QS instead. I am somewhat concerned that will impact performance, since it will have to write a record for each possible link, but slow is better than broken, I guess.

Thanks again!





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to go back to last position after move mouse by mouse_event Lib "user32" Hoang Excel VBA 0 July 7th, 2009 11:00 PM
Chapter 2 "An attempt to attach an auto-named database for file.." Gredkins BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 4 May 28th, 2009 11:55 PM
Code not going as planned: "icicle" vs "savedinstancestate" joopthecat BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 3 May 3rd, 2009 03:09 PM
Chapter-5 on Intents:ContactPickerTester does not show the button "Pick a Contact" sunilm12 BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 3 April 15th, 2009 11:55 AM
How to download Code in "Professional Active Server Page 3.0 " book. renjith0 All Other Wrox Books 2 April 2nd, 2009 05:06 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.