且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在没有cookie的ASP.NET中进行表单身份验

更新时间:2022-10-24 18:30:42

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

了解ASP.NET无Cookie功能如何工作 [ ^ ]

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



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



希望,它有帮助:)


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

引用:

 <   sessionstate     cookieless   =  true >  <   / sessionstate  >  

ckquote>

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>