I am working with two web applications, one is webform-based Site1 and other is an MVC application Site2.TODO:Pass a complex object from Site1 to Site2. In response get View from Site2 to Site1 and display it:       function test()    {               $.ajax(            {                type: 'POST',                contentType: application/json; charset=utf-8,                 url: '../Chart/Mypage.aspx/GetInformation',                async: false,                success: function (response) {                                        alert(response.d);                    var authHeader = window.btoa(Ankita:Ankita);                    var r = {Id:50345520,FirstName:Matthew,LastName:McCauley,MiddleName:,Suffix:null,NPI:1083043491,Address:614 Esplanade St.,City:Piscataway,State:NJ,ZIP:08854,Country:United States,SubscriberFirstName:null,SubscriberLastName:null,SubscriberMiddleName:null,SubscriberSSN:null,SubscriberDOB:null,SubscriberGender:null,SubscriberSuffix:null,SubscriberAddress:null,SubscriberCity:null,SubscriberState:null,SubscriberZIP:null,SubscriberCountry:null,VisitDate:null}                    $.ajax({                        type: 'POST',                        contentType: 'application/json; charset=utf-8',                        url: 'http://localhost:52099/Controller/Index',                        data: r,                                                     headers: { Authorization: authHeader},                                                 dataType: 'jsonp',                           success: function (response) {                            alert(done);                            // $(#popupdivmodal).find('div.body').html('').html(response);                            callFunction(response);                        },                        error: function(e){                            alert(e);                        }                    });                },                error: function () {                    alert(Error);                }            });        return false;    }    function callFunction(data){        $('#popupdivmodal').html(data.message);    }<asp:Button ID=Scriptbtn runat=server CssClass=button Text=SureScript OnClientClick=test();></asp:Button> At Controller side         [HttpGet]        [BasicAuthentication(Ankita, Ankita, BasicRealm = Test)]        public ActionResult Index([System.Web.Http.FromUri]ClientInformation client)        {                           return new JsonpResult(new { message = this.RenderRazorViewToString(Index, client) });                       }  public class JsonpResult : ActionResult{    private readonly object _obj;    public JsonpResult(object obj)    {        _obj = obj;    }    public override void ExecuteResult(ControllerContext context)    {        var serializer = new JavaScriptSerializer();        var callbackname = context.HttpContext.Request[callback];        var jsonp = string.Format({0}({1}), callbackname, serializer.Serialize(_obj));        var response = context.HttpContext.Response;        response.ContentType = application/json;        response.Write(jsonp);    }}public static class RazorViewToString{    public static string RenderRazorViewToString(this Controller controller, string viewName, object model)    {        controller.ViewData.Model = model;        using (var sw = new StringWriter())        {            var viewResult = ViewEngines.Engines.FindPartialView(controller.ControllerContext, viewName);            var viewContext = new ViewContext(controller.ControllerContext, viewResult.View, controller.ViewData, controller.TempData, sw);            viewResult.View.Render(viewContext, sw);            viewResult.ViewEngine.ReleaseView(controller.ControllerContext, viewResult.View);            return sw.GetStringBuilder().ToString();        }    }}By doing this I am getting a client object to the MVC app but via querystring. Is there any other way to achieve this, as querystring has its own limitation for length?
Passing a complex object across cross domain
c#;json;ajax;asp.net mvc