IE10注入令牌到.NET MVC链接 [英] IE10 injects token into .NET MVC links

查看:113
本文介绍了IE10注入令牌到.NET MVC链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个工作.NET MVC应用程序,但IE10在Windows 8上访问时,浏览器源$ C ​​$ C表明,所有动态生成的URL,例如。与 Url.Action(指数,家)写为:

I have a working .NET MVC application, but when accessing with IE10 on Windows 8 the browser source code shows that all dynamically generated URLs, eg. with Url.Action("Index", "Home") are written as:

/(F(usb6gVWyFnXevozQyFvVxVdbsN0uM9kZ5wNu9gT9pWBINGuodOdzLKkIQzfhqy3UhnCLyXf78LugXZO2UPYfMbNzSJJawmbqUBL56TjKpXgWpiMdVAjB1T3YcPlGhZePwFd6C9P_f_Y89KiDnWcA9EfR1m0ud3IcBYTW8OwZxOMTd8bxt5hM8mgXVN6OSdoo3IMwRA2))/Home/Index

/(F(usb6gVWyFnXevozQyFvVxVdbsN0uM9kZ5wNu9gT9pWBINGuodOdzLKkIQzfhqy3UhnCLyXf78LugXZO2UPYfMbNzSJJawmbqUBL56TjKpXgWpiMdVAjB1T3YcPlGhZePwFd6C9P_f_Y89KiDnWcA9EfR1m0ud3IcBYTW8OwZxOMTd8bxt5hM8mgXVN6OSdoo3IMwRA2))/Home/Index

而不是:

/首页/指数

如果我们写与静态的HTML链接:

If we write the link with static HTML:

<a href="/Home/Index">[linktext]</a>

IE10重定向到登录页面。
问题是在离开现场时临时去,有一个链接返回到第一个网站的合作伙伴网站。作为注射的code缺少返回URL不再有效并重定向到登录。

IE10 redirects to the login page. The problem is when leaving the site temporarily to go to a partner site that has a link back to the first site. As the injected code is missing the return URL is no longer valid and redirects to the login.

任何人知道为什么code注射(Framework或IE10问题?)

Anybody knows why this code is injected (Framework or IE10 issue?)

推荐答案

这code是的 ASP.NET的Cookie会话功能。您可以禁用它在web.config &LT;结构&gt;&LT;&的System.Web GT; 第:

That code is part of ASP.NET's cookieless session feature. You can disable it in the web.config <configuration><system.web> section with:

<sessionState cookieless="false" />

或用:

<forms cookieless="UseCookies" />

我不知道为什么IE10是这样做。你也许可以在更新IE10信息App_Browsers文件添加一个浏览器文件来告诉它支持Cookie。或者,也许你的cookies禁用?

I don't know why IE10 is doing that. You could probably add a browser file in app_browsers with updated IE10 info to tell it it supports cookies. Or perhaps you have cookies disabled?

这篇关于IE10注入令牌到.NET MVC链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆