在没有cookie的ASP.NET中进行表单身份验 [英] Form authentication in ASP.NET without cookies

查看:89
本文介绍了在没有cookie的ASP.NET中进行表单身份验的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在没有Cookie的情况下,表单身份验证是否可以在 asp.net中运行?我已经学习了一些其中,没有cookie身份验证正常工作但借助于 查询字符串但是 我正在禁用Cookie我的表单身份验证 失败消息浏览器中 此页面无法设置Cookie  

我是否需要进行一些配置更改以使其在查询 string 标记的帮助下工作?

我尝试过:

表格认证在启用cookie后正常工作。

解决方案

虽然我们不知道你的代码,但你还没有分享,但是你可能想先阅读一些关于此的好文章并尝试按照以下文章中的描述进行更改 -

了解ASP.NET无Cookie功能如何工作 [< a href =https://msdn.microsoft.com/en-us/library/aa479315.aspxtarget =_ blanktitle =New Window> ^ ]

如何让Cookieless FormsAuthentication与自行发布的FormsAuthenticationTickets和自定义UserData一起使用 - Scott Hanselman [ ^ ]



如果您仍然遇到任何问题,请分享相关代码如果我们可以进一步帮助你,请告诉我们。



希望,它有帮助:)


是的,你需要配置设置。请参阅 - 如何让Cookieless FormsAuthentication与自行发布的FormsAuthenticationTickets和自定义UserData一起使用 - Scott Hanselman [ ^ ]。

引用:

 <   sessionstate     cookieless   =  true >  <  < span class =code-leadattribute> / sessionstate  >  


Is it possible that form authentication can work in asp.net without cookies? I have learnt some where that without cookies authentication work normally but with help of token in query string but when I am disabling cookies my form authentication is failing with message in browser "This page was prevented from setting cookies"

Do I need to make some configuration changes to make it work with help of query string token?

What I have tried:

Form authentication work normally after enabling cookies.

解决方案

While we don't know your code as you haven't shared yet but, you may like to start by reading some good articles on this and try to do the changes as described in following articles-
Understand How the ASP.NET Cookieless Feature Works[^]
How to get Cookieless FormsAuthentication to work with self-issued FormsAuthenticationTickets and custom UserData - Scott Hanselman[^]

If you still face any problem, please share the relevant code and let us if we can help you further.

Hope, it helps :)


Yes you need configuration setting. Refer - How to get Cookieless FormsAuthentication to work with self-issued FormsAuthenticationTickets and custom UserData - Scott Hanselman[^].

Quote:

<sessionstate cookieless="true"></sessionstate>


这篇关于在没有cookie的ASP.NET中进行表单身份验的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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