gpt4 book ai didi

asp.net - 如何让基于 PhoneGap 的应用程序针对 ASP.NET 表单例份验证后端进行身份验证?

转载 作者:行者123 更新时间:2023-12-03 20:57:01 27 4
gpt4 key购买 nike

有没有人设法让 ASP.NET 表单例份验证(使用 cookie)与基于 PhoneGap 的移动应用程序一起使用?

我遇到了以下有关在 PhoneGap 中管理 cookie 和正确配置服务器的问题:

  • Where cookie is managed in phonegap app with jquery?
  • https://github.com/phonegap/phonegap-iphone/issues/190
  • Asp.Net Forms Authentication when using iPhone UIWebView

  • 但不幸的是,这些解决方案都不起作用。来自 PhoneGap 应用程序的请求并不指示经过身份验证的用户,即使当我在 Safari 中将相同的dashboard.html 代码作为文件运行时,请求显示为经过身份验证。

    最佳答案

    解决方案:
    cookieless="UseCookies"在 web.config 最后为我做的:

    <authentication mode="Forms"> 
    <forms loginUrl="~/Account/LogOn" timeout="2880" cookieless="UseCookies" />
    </authentication>

    REF: https://groups.google.com/forum/?fromgroups#!topic/phonegap/Thj0fS2GDh4

    关于asp.net - 如何让基于 PhoneGap 的应用程序针对 ASP.NET 表单例份验证后端进行身份验证?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7523721/

    27 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com