Tuesday, 12 October 2010

fix for The state information is invalid for this page and might be corrupted Error

This error suggests that  the Viewstate information between postback are not same after first postback so when you click on a page's any server control , it will give this error.
Problem :You might have embedded a page which contains "runat= "server"  within a Masterpage.
For example f you have a placed jquery tabs in master page and jquery tabs pointing to an aspx page with
  attribute it will give this error.
Just remove "runat=server" from
tag in calling page .It will fix the error.

Friday, 8 October 2010

Fix for URL Rewriting With Intelligencia dll and IIS 5.1 Problem

If  a rewritten URL contains GUID( where Guid is encrypted in this example) and extra under  Intelligencia rewriter  and  IS 5.1 or IIS 6 ,  Request.QueryString["guid"]   will always read guid+ extra querystring.
For Example we have a following  rewritten URL.

Though URL have been  precisely configured  in web.config as
<rewrite url="/mysite/Preview/(.+)" to="/mysite/Preview.aspx? guid =$1">rewrite>
However, Request.QueryString["guid”] will always read this URL as

To fix this problem so that Request.QueryString["guid"] gets only Guid part of the URL, place .aspx extension with URL in web.config.

<rewrite url="/mysite/Preview/(.+).aspx" to="/mysite/Preview.aspx? guid =$1">rewrite>

And in code,  place.aspx extension with URL.

 this will generate URL as

and now Request.QueryString["guid”] will read only guid