Home > Net >  The iframe has resulted in the session for failure
The iframe has resulted in the session for failure

Time:09-24

If I wrote two interfaces, in the first interface to save a data like this: the HttpContext. Current. The Session (" uid ")="1"; I read the figures in the second interface, under normal circumstances I open a page in your browser, request, in turn, these two interfaces is no problem, I put the program on the IIS server, write a page in Vs, inside is & lt; The iframe id="frame1" width="500" height="500" SRC="http://192.168.2.158:89/test1.html" & gt; </iframe> To perform these two interfaces, found that the data is null, after tests found that the request first interface to create a sessionId sessionId and the second interface is different, in principle, should be the same

CodePudding user response:

A great god for help

CodePudding user response:

Iframe URL and main website URL is the same?
Inconsistent session should can't pass,

CodePudding user response:

Do not agree if you can pass parameters,
In the iframe in acquiring,

CodePudding user response:

refer to the second floor Zhang Qi response:
iframe URL and main website URL is the same?
Inconsistent session should can't pass,
certainly is not the same, on an external network, a network, if the primary site and nesting sites are deployed in the unit, can again

CodePudding user response:

You use parameters, then inside the iframe gain parameters

CodePudding user response:

Different domains you won't get ah..

Use relative path.

CodePudding user response:

reference 5 floor Zhang Qi reply:
you use a parameter passing, and inside the iframe gain parameter
I didn't want to pass parameters, both interface in the child pages, I don't want the parent page and child pages have what data interaction, I'm just in an interface to save a child pages the background, to another interface, take not to come out,
  •  Tags:  
  • C#
  • Related