需要帮助以在ASP.NET中进行概要分析 [英] need help for profiling in ASP.NET

查看:68
本文介绍了需要帮助以在ASP.NET中进行概要分析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我有一个asp.net源,我试图在每个用户可以拥有自己的个人资料的源中做一个部分.我的方法是每个用户都应该注册,并将用户信息存储在数据库中,并且当用户尝试登录时,我会读取用户名称和密码表单数据库并将其重定向到特定页面(例如,重定向到公共页面或管理页面)
但我不知道如何防止公共用户访问管理员页面.我的意思是如果用户改为访问:

Hi guys
i have an asp.net source and im trying to make a part in my source which every user can have its own profile.my approach is every user should register and i store users information in Database and when user tries to log in i read user name and password form Database and redirect them to a specific page(for example to public page or admin page)
but i dont know how to prevent public user from accessing admins page.i mean if user instead going to:

mysite.com/public/user.aspx



尝试使用此网址:



Tries this url:

mysite.com/admin/user.aspx



用户实际上正在看到我不想要的管理页面!我希望用户无法打开admin文件夹.我该怎么办?我的分析方法是否正确?是否有更好的方法来管理我的用户并设置授权和限制?有人可以通过某些链接帮助我吗?我可以了解更多?
Tanx



user is actually seeing admin page which i don''t want! i want users not to be able to open admin folder.how can i do it?and is my approach for profiling correct?is there a better way i can manage my users and set authorization and restriction?can any one help me with some link which i can learn more?
Tanx

推荐答案

您可以在根目录中为admin创建单独的文件夹,并在admin文件夹中添加admin所需的所有页面.对于管理员登录,您可以在网址中输入地址,例如:-mysite.com/admin/adminlogin.aspx.

对于用户,您可以在索引页面中创建用于用户登录的链接.

U可以为用户和管理员创建单独的登录页面
You can create seprate folder for admin in root directory and add all the required pages for admin in admin folder. For login in admin u can write the address in the url as for example:- mysite.com/admin/adminlogin.aspx.

And for user u can create a link for user login in index pages.

U can create seprate login page for user and admin


这篇关于需要帮助以在ASP.NET中进行概要分析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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