Click to See Complete Forum and Search --> : Roles based authentication
Nate1
11-26-2007, 07:30 AM
I have an admin folder that ive been trying to setup so it can;t be reached by anyone but the administrator, not having much luck, Can I do this without the use of the database, role manager?
My Login form already has the usertype information retrieved from the database when validating a user I just need to use his to get to the admin folder.
please help
Nate1
11-26-2007, 09:06 PM
I Have got the roles based authentication working on the localhost but I just sent the web.config etc up to the test server and this error is generated
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
It is Directly related to these lines of code in the config file
<location path="Admin">
<system.web>
<authorization>
<allow roles="admin"/>
<deny users="*"/>
</authorization>
</system.web>
</location>
<location path="User">
<system.web>
<authorization>
<allow roles="admin,user"/>
<deny users="?"/>
</authorization>
</system.web>
</location>
<roleManager enabled="true">
</roleManager>