473,500 Members | 1,943 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IsInRole problem

Hi

I have a strange problem with my asp.net application. I am using the
following code to see if a user is in a windows group:

if(!System.Threading.Thread.CurrentPrincipal.IsInR ole(System.Configuration.ConfigurationSettings.App Settings.Ge(@"WindowsGroupForVaspUsers")))

I also have this row in my config file:

<add key="WindowsGroupForVaspUsers" value="adcsth1800\VASP"/>

The strange thing is that this works fine in one application but in another
application (I run locally on the same computer) I need to use slash instead
on back slash for the code to work. I need to change the config file to this:

<add key="WindowsGroupForVaspUsers" value="adcsth1800/VASP"/>

Why???

Thanks
Julia

Dec 4 '06 #1
1 1110
Julia that looks strange..
Is adcsth1800 your Domain name?
Patrick

"Julia" <Ju***@discussions.microsoft.comwrote in message
news:AD**********************************@microsof t.com...
Hi

I have a strange problem with my asp.net application. I am using the
following code to see if a user is in a windows group:

if(!System.Threading.Thread.CurrentPrincipal.IsInR ole(System.Configuration.ConfigurationSettings.App Settings.Ge(@"WindowsGroupForVaspUsers")))

I also have this row in my config file:

<add key="WindowsGroupForVaspUsers" value="adcsth1800\VASP"/>

The strange thing is that this works fine in one application but in
another
application (I run locally on the same computer) I need to use slash
instead
on back slash for the code to work. I need to change the config file to
this:

<add key="WindowsGroupForVaspUsers" value="adcsth1800/VASP"/>

Why???

Thanks
Julia

Dec 5 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1344
by: Kevin | last post by:
Hello all, I'm unable to get the IsInRole method to work with my AD domain. There is a global group that I am a member of, when I query that group using the IsInRole method, it returns false. ...
0
1099
by: Alek Davis | last post by:
Hello, I noticed an interesting problem. When calling WindowsPrincipal.IsInRole over dial-up (VPN), this function takes 1-2 minute(s) to return. On the intranet or when disconnected from the...
6
4316
by: JIM.H. | last post by:
Hello, username=user.identity.name trueFalse=User.IsInRole("myDomain\Administrators")? First line return user name as administrator but second line returns false? What might be the reason? Or how...
5
2271
by: arjun | last post by:
Hi All, I am developing a A webpage to be seen in a page viewer webpart(Sharepoint 2003). The page is supposed to check for the current user name and then check the user membership in some local...
0
995
by: Peter | last post by:
Hello! I have a strange problem with .IsInRole method. When I use this method on my development machine everything works fine. However when I deploy my application on a production server this...
2
3224
by: Dave | last post by:
Hi, I'm testing the IsInRole method on my app. I'm using Integrated security so I'm not sure if that has something to do with it. I have a groups table which I want to secure certain portions...
8
13127
by: Oliver Rainer | last post by:
Hi, I have the following problem... Pre-requisites: Installation of an Asp.net webservice on a IIS5 server (win2k). Anonymous access is not allowed, only using windows authentication (intranet...
4
4409
by: Bob | last post by:
I created a usergroup on my W2K AD domain server and called it MyCustomRole I added my user to it named User Name fully qualified is Mydomain\Bob I can see that My.user.name Is OK its...
10
6997
by: Bob | last post by:
This a bit of a second post on same subject, my apologies. IsinRole function only works with built-in roles. If I create a new group on my domain controller then add an existing user to that...
1
5539
by: Andy | last post by:
Hi, I currently have my application setup and built using Windows Authentication (WindowsPrincipal). For security checks, I simply do an IsInRole call on the Principal. The role permissions...
0
7136
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7397
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4923
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4611
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3110
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3106
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1430
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
672
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
316
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.