关于IHttpModule的问题!提前阅读 [英] A question about IHttpModule!! Read ahead

查看:50
本文介绍了关于IHttpModule的问题!提前阅读的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我们假设已经制作了一个自定义身份验证模块,该模块继承了IHttpModule类.现在要注意的是,如何将新的用户名和密码传递给页面上以文本框形式显示的用户名和密码.对于身份验证模块,我从未达到可以从登录页面获取用户输入并在身份验证模块中使用这些变量的阶段.

Lets Suppose that I have made a custom authentication module that inherits IHttpModule class. Now the catch here is that how do I pass to this new module username and password which are in the form of textboxes placed on a page. For authentication module , I have never reaached to the stage where I can take user input from the login page and play with those variables in my authentication module.

总而言之,我的意思是我还没有到达需要用户输入然后在身份验证模块中使用它的页面.我要问的是如何到达登录页面并使用身份验证模块进行身份验证.

To summarize, what I mean is I have not reached to a page which takes user input and then plays with it in authentication module. What I mean to ask is how do I reach to the login page and use the authentication module for authentication.

希望我已经说清楚了.如果没有,我可以进一步解释.

Hope I have made it clear. If not I can explain further.

推荐答案

您的模块正在检查用户是否登录.它不会将凭据应用于当前会话.为此,您应该在事件上捕获该事件,例如,单击登录"按钮时,您可以触发位于模块中的事件,并且您可以执行任何操作.

Your module is checking if user is logged in or not. It doesn't apply credentials to the current session. In order to do that, you should catch it on an event, for instance when login button is clicked you can fire an event which is located in your module and you can do whatever you want to do.

这篇关于关于IHttpModule的问题!提前阅读的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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