自从安装VS2010SP1 / IE10 Preview以来,会话ID发生了变化
||
我有一个可以安装插件的Web应用程序。为了创建这些插件,我创建了一个具有相同结构的新Web应用程序,并从主应用程序引用了程序集。
此后,我仅将aspx(标记)文件复制到主应用程序,因此我具有标记页和对程序集的引用,以便可以调试。
直到到目前为止,当Im进行修订时,这一切都一直很好,自从我上次研究以来,唯一改变的就是安装了VS2010 SP1。
现在在代码中有一个要点-我看不到它发生在外部代码中的确切位置,但是会话ID正在更改并且使会话中的所有内容丢失。
我有一段代码可以打开一个带有报告的新窗口:
string link = String.Format( \"window.open(\'{0}\');\", Page.ResolveUrl( \"~/CustomPages/BudgetOnlineMedia.aspx\" ) );
Page.ClientScript.RegisterStartupScript( this.GetType(), \"MedReport\", link, true );
在此之后,断点在基础页面中被命中:
/// <summary>
/// OnPreload
/// </summary>
/// <param name=\"e\">args</param>
[VersionChange( \"7.3.88.272\", \"13/04/2011\", \"Fully qualified path to login page\" )]
protected override void OnPreLoad( EventArgs e )
{
try
{
base.OnPreLoad( e );
if ( base.CurrentUser == null )
{
Response.Redirect( \"~/Pages/Login.aspx\", false );
}
}
catch ( Exception ex )
{
ErrorLogging.LogError( ex );
}
}
同样的断点再次被命中,但是这次SessionID改变了!
我现在可以读取调用栈,但是我的代码中没有更改会话的内容。
堆栈跟踪如下所示:
> Web.WAP.Objects.DLL!Web.WAP.Objects.Controls.UserPresencePage.OnPreLoad(System.EventArgs e) Line 28 C#
System.Web.dll!System.Web.UI.Page.ProcessRequestMain(bool includeStagesBeforeAsyncPoint, bool includeStagesAfterAsyncPoint) + 0x22b bytes
System.Web.dll!System.Web.UI.Page.ProcessRequest(bool includeStagesBeforeAsyncPoint, bool includeStagesAfterAsyncPoint) + 0x84 bytes
System.Web.dll!System.Web.UI.Page.ProcessRequest() + 0x51 bytes
System.Web.dll!System.Web.UI.Page.ProcessRequestWithNoAssert(System.Web.HttpContext context) + 0x16 bytes
System.Web.dll!System.Web.UI.Page.ProcessRequest(System.Web.HttpContext context) + 0x32 bytes
App_Web_-ti4sydr.dll!ASP.custompages_budgetexhibition_aspx.ProcessRequest(System.Web.HttpContext context) + 0x33 bytes C#
System.Web.dll!System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() + 0xb6 bytes
System.Web.dll!System.Web.HttpApplication.ExecuteStep(System.Web.HttpApplication.IExecutionStep step, ref bool completedSynchronously) + 0x4c bytes
System.Web.dll!System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(System.Exception error) + 0x133 bytes
System.Web.dll!System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(System.Web.HttpContext context, System.AsyncCallback cb, object extraData) + 0x7c bytes
System.Web.dll!System.Web.HttpRuntime.ProcessRequestInternal(System.Web.HttpWorkerRequest wr) + 0x17c bytes
System.Web.dll!System.Web.HttpRuntime.ProcessRequestNoDemand(System.Web.HttpWorkerRequest wr) + 0x63 bytes
System.Web.dll!System.Web.HttpRuntime.ProcessRequest(System.Web.HttpWorkerRequest wr) + 0x47 bytes
WebDev.WebHost20.dll!Microsoft.VisualStudio.WebHost.Request.Process() + 0x177 bytes
WebDev.WebHost20.dll!Microsoft.VisualStudio.WebHost.Host.ProcessRequest(Microsoft.VisualStudio.WebHost.Connection conn) + 0x6c bytes
[Appdomain Transition]
WebDev.WebHost20.dll!Microsoft.VisualStudio.WebHost.Server.OnSocketAccept(object acceptedSocket) + 0xd3 bytes
mscorlib.dll!System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(object state) + 0x2f bytes
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x6f bytes
mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(System.Threading._ThreadPoolWaitCallback tpWaitCallBack) + 0x53 bytes
mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(object state) + 0x59 bytes
什么是[应用程序域转换]?
您能看到导致会话ID更改的任何信息吗?
编辑:
好的,这可能与VS SP1不相关,但与IE10预览无关。
现在,当我执行window.ShowModalDialog时,然后从该对话框中打开window.open。 Internet Explorer创建一个新会话
没有找到相关结果
已邀请:
1 个回复
邵酮
然后使用基本的Page方法打开一个弹出窗口(用于检查传递的窗口对象)
然后在打开第二个窗口的页面中(调用基本页面方法)
注意:我在从dialogArguments传递的窗口对象上调用window.open。 当然这太可怕了,有人能找到更好的解决方案吗? 有关此问题的信息在这里: http://support.microsoft.com/kb/831678 更新:这也可能与IE10的安装有关,似乎我的某些互联网安全设置已重置,并且正在影响javascript。代码中的变通方法也很容易实现,以防将来再次出现这种情况。