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.
Il y a 14 ans
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.
Il y a 14 ans
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.
Il y a 14 ans
Mike, sch09, anyone ? please help me
Il y a 14 ans
Please help me with this issue ?
Il y a 14 ans
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
Il y a 14 ans
Hello sch09

I just sent you a Private Message

Please check your inbox
Il y a 14 ans
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)
Il y a 14 ans
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.