|
-
Oct 17th, 2002, 10:05 AM
#1
Thread Starter
New Member
how do i produce a web application that can...
how do i produce a web application that can be configured to limit access to specified users, limiting access to a Windows Group, membership of which can be maintained by the system administrator??
bernie
-
Oct 17th, 2002, 10:14 AM
#2
You can use System.Security.Principal.IsInRole to find out if a user is in a certain Windows Group. You have to use WindowsAuthentication mode for it to work.
-
Oct 17th, 2002, 10:23 AM
#3
Thread Starter
New Member
i a very new to all things vb, i have a database table called tblLogin and am using web.config and global.asax files that an example told me to use.
global.asax:
<%@ Import Namespace="System.Net" %>
<script runat="server">
Sub Session_OnStart()
Session("conClasf") = _
"Data Source=localhost;Integrated Security=SSPI;" & _
"Initial Catalog=DB"
Try
Session("hostname") = _
Dns.GetHostByAddress(Request.UserHostAddress).HostName
Catch ex As Exception
Session("hostname") = Request.UserHostAddress
End Try
End Sub
</script>
web.config:
<configuration>
<system.web>
<customErrors mode="Off"/>
<authentication mode="Forms">
<forms loginUrl="login.aspx" name=".AUTHCOOKIE" protection="All" timeout="300"/>
</authentication>
<authorization>
<allow users="*,?"/>
</authorization>
<compilation>
<assemblies>
<add assembly="CrystalDecisions.CrystalReports.Engine, Version=9.1.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="CrystalDecisions.ReportSource, Version=9.1.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="CrystalDecisions.Shared, Version=9.1.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="CrystalDecisions.Web, Version=9.1.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
</assemblies>
</compilation>
</system.web>
<location path="reg">
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</location>
</configuration>
what will i need to change,
do you know of any walk throughs???
-
Oct 17th, 2002, 10:28 AM
#4
-
Oct 17th, 2002, 10:41 AM
#5
Thread Starter
New Member
thanks, will look at those and get back to you if i have any problems tomorrow, but as i am in the UK, it might be a little early for you
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|