How to make pages private ? Just for the users ?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 лет назад
mike , why don't you create a HttpModule specifically for this task. you can add it to the application without recompiling it. it's configurable through web.config.
14 лет назад
sch09 wrote:
mike , why don't you create a HttpModule specifically for this task. you can add it to the application without recompiling it. it's configurable through web.config.


It will be great if you could explain me how to accomplish it.
14 лет назад
Mike, sch09, anyone ? please help me
14 лет назад
Please help me with this issue ?
14 лет назад
Hi Mike.

it's very easy to implement. the best way is to examine the HttpMembership Module in the libraries forlder.

you'see how it checks the user and redirects to either login or access denied.

you then have to add verification if user belongs to a certain role to decide where to redirect him
14 лет назад
Hello sch09

I just sent you a Private Message

Please check your inbox
14 лет назад
if we forget about roles, Is it possible to create a page which can only be accessed only by 2 users defined by me ?

It will be great if you could give me an example with code (I am confused with the httpmembershipmodule code)
14 лет назад
OK i figured out the solution myself, just wanna share if anyone else is in same situation

i modified my webconfig and this is the code:
<?xml version="1.0"?>
<configuration>
    <appSettings/>
    <connectionStrings/>
    <system.web>
      <authorization>
        <allow users="[email protected]"/>
        <allow users="[email protected]"/>
        <deny users="*"/>
      </authorization>
    </system.web>
</configuration>

This gives access to only those users who's e-mail address is mentioned in the webconfig.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.