Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8250353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:51:40+00:00 2026-06-07T23:51:40+00:00

I have a ASP.NET MVC 4 application. This application will be embedded into another

  • 0

I have a ASP.NET MVC 4 application. This application will be embedded into another site (different domain) via an iFrame.

Part of the application has functionality to get a list of cities based off state. I’m using jQuery Ajax to do this. All browsers are working except IE.

Based off my googling, I’ve learned that I need to use XDomainRequest for IE. So here’s the code:

/* For dynamically getting list of cities by state */
        $("#state").change(function() {
            $(".city").empty();
            if ($(this).val() != "") {
                if ($.browser.msie && window.XDomainRequest) {
                    var data = "state=" + $(this).val();
                    var xdr = new window.XDomainRequest();
                    xdr.open("POST", "/Search/GetCities");
                    xdr.send(data);
                    xdr.onload = function() {
                        var json = $.parseJSON(xdr.responseText);
                        if (json == null || typeof(json) == 'undefined') {
                            json = $.parseJSON(data.firstChild.textContent);
                        }
                        processData(json);
                    };
                    xdr.send();
                } else {

                    $.ajax({
                        type: "POST",
                        url: "/Search/GetCities",
                        data: {
                            state: $(this).val()
                        },
                        dataType: "json",
                        success: function(data) {
                            if (data == '') {
                                $("#state").change();
                            } else {
                                $(".city").css("display", "none");
                                var items = "<option value=\"\" selected>Please Select</option>";
                                $.each(data, function(i, item) {
                                    items += "<option value='" + item.Value + "'>" + item.Text + "</option>";
                                });
                                $(".city").append(items);
                                $(".city").css("display", "");
                                $(".city").attr('disabled', false);
                            }
                        }
                    });
                }
            }
        });
        /* End dynamically getting list of cities by state */

Here’s the kicker. With FF, Chrome and Safari, the authentication cookie gets passed in the Ajax call but not in IE so IE thinks I’m not an authentication user so it responses with the login URL.

What am I missing to make this work with IE?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T23:51:42+00:00Added an answer on June 7, 2026 at 11:51 pm

    I’m going out on a limb that your problem is not related to the jquery you are using for the post but instead is a problem with cross domain cookies with IE.

    Try adding a P3P header. A good SO thread on the subject can be found here:

    Cookie blocked/not saved in IFRAME in Internet Explorer

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.NET MVC 3 application. This application requests records through jQuery. jQuery
I have an ASP.NET MVC application using Authorization Attributes on Controllers and Actions. This
I wrote an application using ASP.NET MVC, in this application I have an Index
I have written an ASP.NET MVC application that runs inside an IFrame. When one
Or I don't understand this at all. I have started my ASP.NET MVC application
I have this simple Delete Get and Post methods in a asp.net mvc application
This will be my first ASP.NET MVC application with forms authentication so I am
I'm working on a view in a ASP.NET MVC 2 application. This view will
I have a wizard in my asp.net MVC application which is built upon this
Have just started converting an existing job tracking system into an ASP.NET MVC application.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.