Able to solve this problem in following way. my problem is with Json string value.
public void RedirectHyperlink(System.IO.Stream jsonString)
{
string val = JsonSteamToString(jsonString);
string JsonVal = val.Replace("\"", "'");
var json_serializer = new JavaScriptSerializer();
H2JsonStateObject myobj = json_serializer.Deserialize<H2JsonStateObject>(JsonVal);
H2RequestRedirect.RedirectToTemp(myobj.url, myobj.stateId);
}
in here string needs to be in following format.
JsonVal = "{'url': 'RedirectPage.aspx','stateId': '89aafdec-0a9e-4d05-b04e-1ca4bf8cfeb9' }";
When i'm calling this method i send json object without JSON.stringify(data);
var data = '{"url":"' + link + '","stateId":"' + value + '"}';
$.ajax({
cache: false,
url: "StateRedirectService.svc/RedirectHyperlink",
type: "POST",
async: false,
data: data,
success: function (data, textStatus, jqXHR) {
//alert('OK');
window.location.href = link; },
error: function (xhr, status, error) {
alert('error');
}
});
Then it works as a charm...