web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

IFRAME throws exception while launching another page using response.redirect within IFRAME.

(0) ShareShare
ReportReport
Posted on by 3,634

I have a couple of web pages say Deafault.aspx and docPage.aspx. I have deployed that web application at local IIS. When I browse it load the Default.aspx and from that page I can call the docPage.aspx, so far so good.

Now, I configured the web application winthin an IFRAME on Order form. It loads the Default.aspx but when I clicked to open docPage.aspx it throws an exception.

Exception:

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]

  Default2.Page_Load(Object sender, EventArgs e) +60

  System.Web.UI.Control.OnLoad(EventArgs e) +108

  System.Web.UI.Control.LoadRecursive() +67

  System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4497

*This post is locked for comments

I have the same question (0)
  • ScottDurow Profile Picture
    21 on at

    What code is in your on load event at line 60?

  • Mohsin Ali Profile Picture
    3,634 on at

    It is commented line. Default.aspx I am setting values of session and on PageLoad event in docPage.aspx I am getting values from session.  here is what I have in pageLoad event:

    string docType = Session["docType"].ToString();
    
    string docName = Session["docName"].ToString();
    
    SearchParameters searchParam = (SearchParameters)Session["profile"]; //cuser defined type SearchParameters


  • Mohsin Ali Profile Picture
    3,634 on at

    I think it sets the session to null.

  • ScottDurow Profile Picture
    21 on at

    Then the session is dependent on cookies being saved and so if your aspx pages are in a different domain I suspect that the iframe is not persisting 3rd party cookies - see stackoverflow.com/.../setting-cookie-in-iframe-different-domain

    Hope this helps

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans