如何在C#中使用节? [英] How to use sections in c#?

查看:59
本文介绍了如何在C#中使用节?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用C#中的部分在Web应用程序中记录论坛?为了使我的问题更清楚,我只需要输入用户名和密码即可添加到我需要跳至个人资料项目的信息,因此在这种情况下,将拒绝使用普通人的URL进行输入,您可以使服务器更加安全.

尽我所能提高英语水平.

How can I use sections in C# for logging forum in web applications? To make my question clearer I just add this info that I need to jump to profiles item by entering a username and password, so in this case entering with the URL for ordinary people will be denied and you can make your server much safer.

Improved English as best as I could.

推荐答案

如果我对您的理解正确,那么您想保护网站的某些区域不受特定登录名和角色的影响,或者可能只是一个安全的管理员区域.

对于您的问题,没有唯一的简单答案,因为有许多因素决定着在每种特定情况下如何完成安全性.例如,您可以按照建议将身份验证(登录)限制为Web表单,但是如果用户的Windows身份登录到内部域,则最好使用Windows身份.

对于授权,您可以限制哪些用户或角色可以从Web配置访问网站中的特定子目录.您可以在页面或控件中进行细粒度的限制.

此处 [
If I understand you correctly you want to secure some areas of a websites to particular logins and roles, or possibly just one secure area for admin.

There isn''t a single simple answer to your problem as there are many factors deciding how security needs to be done in each particular case. For example you can restrict authentication (login) to a web form as you suggest, but you might be better off using the user''s windows identity if they are logged on to an internal domain.

For authorization you can restrict which users or roles can access a particular sub-directory in the website from web config. You can make fine-grained restrictions within a page or control.

There are a really good set of tutorials here[^] that will get you on your way to an informed decision and provide instructions for most of the points I have made.

Hope this helps.


我有一种感觉,您可能是说 [ ^ ].您需要仔细阅读本文,但如果我正确理解了您的问题(一点儿不清楚),它应该可以帮助您入门.
I have a feeling you may mean this[^]. You''ll need to carefully read the article but it should get you started if I have properly understood your question (which is not at all clear).


这篇关于如何在C#中使用节?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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