Href无效(即MVC 5) [英] Href not working in ie (MVC 5)

查看:111
本文介绍了Href无效(即MVC 5)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一些动态文字附加在网址中,我无法导航到控制器



请在IE中找到网址



http://abc.net/Dashboard/(X(1)S(f3tcqvxjactcgej1eikoxci1))/Login/Index



但在Chrome中它的工作



http://abc.net/Dashboard/Login/Index



i想要删除那个动态来自网址的文字



我的尝试:



Some dynamic text is appending in url through which i cannot navigate to controller

Please find the url in IE

http://abc.net/Dashboard/(X(1)S(f3tcqvxjactcgej1eikoxci1))/Login/Index

But in chrome its working

http://abc.net/Dashboard/Login/Index

i want to remove that dynamic text from url

What I have tried:

<a href="~/Home/MyDashboard">click here</a>

推荐答案

以下示例显示如何在Web.config文件中指定表单身份验证需要通过SSL传输的cookie。

The following example shows how to specify in the Web.config file that Forms Authentication requires a cookie that is transmitted over SSL.

<authentication mode="Forms">
    <forms ... cookieless="UseCookies" />
</authentication>






FormsAuthenticationConfiguration类(System.Web.Configuration)| Microsoft Docs [ ^ ]



你可能还需要在会话状态配置元素 [ ^ ]和匿名标识元素 [ ^ ]。


FormsAuthenticationConfiguration Class (System.Web.Configuration) | Microsoft Docs[^]

You may also need to disable cookieless mode in the session state configuration element[^] and the anonymous identification element[^].


对我来说,你的MVC应用程序设计糟糕或设置错误。



我建议读这个:ASP.NET Blog | ASP.NET MVC 5中的属性路由 [ ^ ]
As to me, your MVC application is badly designed or wrongly setted.

I'd suggest to read this: ASP.NET Blog | Attribute Routing in ASP.NET MVC 5[^]


这篇关于Href无效(即MVC 5)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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