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

I just sent you a Private Message

Please check your inbox
Hace 14 años
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)
Hace 14 años
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.