C# 为什么弹出窗口再次要求用户凭据?
这就是我使用javascript从C#调用弹出窗口的方式:C# 为什么弹出窗口再次要求用户凭据?,c#,javascript,asp.net,authentication,popup,C#,Javascript,Asp.net,Authentication,Popup,这就是我使用javascript从C#调用弹出窗口的方式: ScriptManager.RegisterClientScriptBlock(UpdatePanelReportViewer, UpdatePanelReportViewer.GetType(), "jscript" + i.ToString(), "window.open('" + pageUrl + "','_blank','status=0,toolbar=0,height=620,width=680')", true); 除
ScriptManager.RegisterClientScriptBlock(UpdatePanelReportViewer, UpdatePanelReportViewer.GetType(), "jscript" + i.ToString(), "window.open('" + pageUrl + "','_blank','status=0,toolbar=0,height=620,width=680')", true);
除了第一次弹出窗口没有打开请求的url外,其他一切正常。相反,它被重定向到登录页面。如果用户正确登录,那么它将转到最初请求的url
为什么会这样
我怎样才能避免这种情况
更新:这是我构建请求的页面URL的方式:
string pageUrl = Request.Url.Scheme;
pageUrl += "://";
pageUrl += Request.Url.Authority;
pageUrl += Request.Url.AbsolutePath;
您打开的弹出式ulr属于同一个域?@Furqan是的,它属于同一个域。我刚刚更新了问题,以显示页面Url是如何生成的。您是否尝试直接在web浏览器中键入弹出式Url,以查看它是否显示登录页面?@Massanu我刚刚选中了此项,它还要求用户再次登录。有什么线索吗?你有没有检查你的弹出URL和你的应用程序完全相同?你能在这里发布这两个URL吗?(源页面url和目标url)