View Full Version : BadRequest Error while sending long Parameter to controller methods

7 Aug 2009, 6:04 AM
We have a viewport in a page which contains two panels(north and centre). The north panel is having a tabpanel which is used to select some criteria to a chart which is to be loaded in the centre panel. The centre panel is initialized with the following code :

var centerPanel = new Ext.Panel({
region: 'center',
id: 'centerPanelId',
border: false,
bodyCfg: { tag: 'iframe', id: 'SORiframe', src: '<%=ViewData.Model.SetReportName %>', frameBorder: 0, border: 0 }


Here the src syntax will be: "/[controller]/[Method]/[p1]/[p2]/[p3]"

The above url is executed and the chart is loading initially. But when i choose around 100 members(some company names)for the chart from the north tab panel controls and click a submit button from the north panel, I got the following error:

HTTP Error 400.0 - Bad Request
ASP.NET detected invalid characters in the URL.

On the button click handler I am setting the src attribute of the ifrme as follows:

var iframe = Ext.get('SORiframe');
iframe.dom.src = "<%= ViewData.Model.SetReportName %>/" + settingValue;

Here the settingValue will be string with "~" char as separator. A sample settingValue string is:

2000,2001,2002,2003,2004,2005,2006,2007~1 m{100001 bn~OperatingResults{Ebitda~1 ,2 ~off~20~Values~Normal Distribution~on~off~160066,56037,19071,156034,40079,73947,2446,158909

So, Is there any other way to pass a long parameter to the IFrame? Please note that the above error is coming only in IIS7.0 with Windows 2008 server. In win xp the page is loading properly.