密码和用户名相关查询 [英] password and username related query

查看:70
本文介绍了密码和用户名相关查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,先生,我在一家软件公司工作.先生,我的主要问题是,当我完成我的项目时,该项目托管在服务器上,因此只显示网站的正视图,但是将来当我更换公司时,我没有演示来观看我的现场项目.所以
我希望该PLZ给我一些技巧,可以在管理登录面板(或任何其他位置)中设置以进入管理面板.现在我要用这种方法做这项工作

Hello sir i am working in one software company. sir my main problem is that when i complete my project then that project host on the server so only front view of the website appear but in future when i change company i have no demonstraton to see my live project. so
i want that plz give me some trick which can i set in admin login panel (or any other location) to enter into admin panel. now a days i am do this work by this method

if(textbox1.text="abc" && textbox2.text="123")
{
response.redirect("//admin page");
} 


这是我在登录页面中的硬代码,但这是不安全的,请给我最好的技巧,以便我在编程时可以做.


this is my hard code in login page but this is is not secure give me best trick which can i can i do during programming.

推荐答案

如果您只有一个承认
而不是直接在程序中使用管理员的员工ID.
像:
假设管理员的员工ID为1.
If you have only one admit
than use the employee id of the admin directly in the program.
like:
Let the employee id of the admin is 1.
if(emp_id == 1)
{
Response.Redirect("//Admin Page.");
}
else
{
Response.Redirect("//User Page.");
}



如果您要分配多个管理员而不是创建新列,请在登录详细信息表中(列名IS_ADMIN)将admin设置为1,将普通用户设置为0.
并使用其中一个:



If you want to assign more than one admin than create a new column your login details table .(column name IS_ADMIN) and set as 1 for admin and 0 for general user.
and use that one:

if(IS_ADMIN == 1)
{
Responce.Redirect("//Admin Page");
}
else
{
Response.Redirect("//User Page");
}




使用Microsoft cryptograpy加密和解密页面名称.请参阅下面的示例,了解如何使用Microsoft加密逻辑进行加密和解密.

使用.NET进行加密/解密 [使用.NET加密/解密 [ ^ ]
Hi,

Use microsoft cryptograpy to encrypt and decrypt the page name. see the below example for encrypt and decrypt using microsoft cryptography logic.

Encryption/Decryption with .NET[^]Encryption/Decryption with .NET[^]


这篇关于密码和用户名相关查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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