简体   繁体   English

使用ASP.NET表单身份验证和PostgreSQL

[英]Using ASP.NET Forms Authentication and PostgreSQL

I have an ASP.NET C# WebForms application built using the following: 我有一个使用以下内容构建的ASP.NET C#WebForms应用程序:

  • Mono 单声道
  • Apache 阿帕奇
  • PostgreSql PostgreSQL的
  • NPGSQL NPGSQL
  • OS Linux 操作系统Linux

Because those platforms are used a custom user/role management system was written for the application login. 因为使用了那些平台,所以为应用程序登录编写了定制的用户/角色管理系统。

One of the features we need is to redirect a visitor if they try to access a page if they have not logged in to the application. 我们需要的功能之一是如果访问者未登录到应用程序而尝试访问页面,则将其重定向。

I have been researching the Forms Authentication 我一直在研究表单身份验证

As expected almost everything I find is using the ASP.NET built-in tools that are prominently used in Windows environments. 不出所料,我发现的几乎所有东西都使用Windows环境中显着使用的ASP.NET内置工具。 ( Which is not necessarily the case I have in my application ) 我的申请不一定是这种情况

My question is can Forms Authentication be used in my scenario? 我的问题是可以在我的方案中使用表单身份验证吗? Or is there another approach I could take to accomplish the same result. 还是我可以采取另一种方法来实现相同的结果。

PLEASE NOTE: Before marking this as a possible duplicate question notice my environment is not the normal ASP.NET stack. 请注意: 在将其标记为可能的重复问题之前,请注意我的环境不是普通的ASP.NET堆栈。

Using [Sessions] is my solution. 使用[会话]是我的解决方案。

This StackoverFlow question gives a really good explanation. 这个StackoverFlow问题给出了很好的解释。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM