473,804 Members | 3,019 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

isInRole Problem

Hi All,
I am developing a A webpage to be seen in a page viewer
webpart(Sharepo int 2003).
The page is supposed to check for the current user name and then check
the user membership in some local group membership.But here I am
failing .The isinRole call on the Principal object is returning true
for buitin groups and some local groups but not ALL.
I read in one of the previous threads that this was a bug in Framework
1 in which all groups are not retrieved.SP3 takes care of it.
However I have Framework 1.1 ...So the patches are not working...
Can anyone tell me if this bug is fixed in v1.1?
The code I am using is hereis something like this
HttpContext.Cur rent.User.IsInR ole("<machinena me>\<group name>")
Please do point out if something is amiss?
If This thing does not work can anyone give any pointers to a similar
code that achieves this in Visual Basic 6.0
Thanks in Advance,
Arjun
Nov 18 '05 #1
5 2286
HI arjun,,
I don't know if there was a BUG i use IsinRole with the Active
Directory and it works!what i'm thinking you are dong wrong is that i think
its CASE SENSITIVE!
Your code should be good since you said it works for some users..
Try checking for case senstitve and post back if you have more questions.
Patrick

"arjun" wrote:
Hi All,
I am developing a A webpage to be seen in a page viewer
webpart(Sharepo int 2003).
The page is supposed to check for the current user name and then check
the user membership in some local group membership.But here I am
failing .The isinRole call on the Principal object is returning true
for buitin groups and some local groups but not ALL.
I read in one of the previous threads that this was a bug in Framework
1 in which all groups are not retrieved.SP3 takes care of it.
However I have Framework 1.1 ...So the patches are not working...
Can anyone tell me if this bug is fixed in v1.1?
The code I am using is hereis something like this
HttpContext.Cur rent.User.IsInR ole("<machinena me>\<group name>")
Please do point out if something is amiss?
If This thing does not work can anyone give any pointers to a similar
code that achieves this in Visual Basic 6.0
Thanks in Advance,
Arjun

Nov 18 '05 #2
Hi Patrik,

The bug I was referring to is the following:
http://support.microsoft.com/default...;en-us;q321562

I have tried nearly all combo of the local group names every time for
some select groups isInRole is false.Even if a purticular syntax works
for others it fails in question of these groups.I think my prob is
this bug.

My box is in an active directory domain.The configuration of my box is
:
Windows Server 2003,.net Framework v1.1,Windows SharePoint Services
2.0,SharePoint Portal Server 2003

Can you do a chk with your config. so that if this problem is due to
some software config then we can resolve it?

If you have any other ideas to make this thing work do mention
those...I need this issue resolved on a very critical basis...

Thanks in Advance,
Arjun

"Patrick.O. Ige" <Pa*********@di scussions.micro soft.com> wrote in message news:<14******* *************** ************@mi crosoft.com>...
HI arjun,,
I don't know if there was a BUG i use IsinRole with the Active
Directory and it works!what i'm thinking you are dong wrong is that i think
its CASE SENSITIVE!
Your code should be good since you said it works for some users..
Try checking for case senstitve and post back if you have more questions.
Patrick

"arjun" wrote:
Hi All,
I am developing a A webpage to be seen in a page viewer
webpart(Sharepo int 2003).
The page is supposed to check for the current user name and then check
the user membership in some local group membership.But here I am
failing .The isinRole call on the Principal object is returning true
for buitin groups and some local groups but not ALL.
I read in one of the previous threads that this was a bug in Framework
1 in which all groups are not retrieved.SP3 takes care of it.
However I have Framework 1.1 ...So the patches are not working...
Can anyone tell me if this bug is fixed in v1.1?
The code I am using is hereis something like this
HttpContext.Cur rent.User.IsInR ole("<machinena me>\<group name>")
Please do point out if something is amiss?
If This thing does not work can anyone give any pointers to a similar
code that achieves this in Visual Basic 6.0
Thanks in Advance,
Arjun

Nov 18 '05 #3
Hi Arjun,
I went through the Page and it says it fails if the user belong to
many GROUPS does that happen in your case?This problem occurs if the combined
length of these group names is greater than 2,048 bytes.
What i noticed in my case was that i tried using forms auth and anytime i
try getting GROUP names it fails and doesn't Authenticate and after removing
my GETGROUP function it authenticates.B ut i haven't came across such problem
when using Windows Auth...
Try seeing if it returns falls if a particular user belong to too many
GROUPS!!
There should be a workaround for this !!
Keep me posted
Patrick

"arjun" wrote:
Hi Patrik,

The bug I was referring to is the following:
http://support.microsoft.com/default...;en-us;q321562

I have tried nearly all combo of the local group names every time for
some select groups isInRole is false.Even if a purticular syntax works
for others it fails in question of these groups.I think my prob is
this bug.

My box is in an active directory domain.The configuration of my box is
:
Windows Server 2003,.net Framework v1.1,Windows SharePoint Services
2.0,SharePoint Portal Server 2003

Can you do a chk with your config. so that if this problem is due to
some software config then we can resolve it?

If you have any other ideas to make this thing work do mention
those...I need this issue resolved on a very critical basis...

Thanks in Advance,
Arjun

"Patrick.O. Ige" <Pa*********@di scussions.micro soft.com> wrote in message news:<14******* *************** ************@mi crosoft.com>...
HI arjun,,
I don't know if there was a BUG i use IsinRole with the Active
Directory and it works!what i'm thinking you are dong wrong is that i think
its CASE SENSITIVE!
Your code should be good since you said it works for some users..
Try checking for case senstitve and post back if you have more questions.
Patrick

"arjun" wrote:
Hi All,
I am developing a A webpage to be seen in a page viewer
webpart(Sharepo int 2003).
The page is supposed to check for the current user name and then check
the user membership in some local group membership.But here I am
failing .The isinRole call on the Principal object is returning true
for buitin groups and some local groups but not ALL.
I read in one of the previous threads that this was a bug in Framework
1 in which all groups are not retrieved.SP3 takes care of it.
However I have Framework 1.1 ...So the patches are not working...
Can anyone tell me if this bug is fixed in v1.1?
The code I am using is hereis something like this
HttpContext.Cur rent.User.IsInR ole("<machinena me>\<group name>")
Please do point out if something is amiss?
If This thing does not work can anyone give any pointers to a similar
code that achieves this in Visual Basic 6.0
Thanks in Advance,
Arjun

Nov 18 '05 #4
Arjun,
Also try posting your code to :-
the FORUM :- dotnet.framewor k.aspnet.securi ty
Patrick
"arjun" wrote:
Hi Patrik,

The bug I was referring to is the following:
http://support.microsoft.com/default...;en-us;q321562

I have tried nearly all combo of the local group names every time for
some select groups isInRole is false.Even if a purticular syntax works
for others it fails in question of these groups.I think my prob is
this bug.

My box is in an active directory domain.The configuration of my box is
:
Windows Server 2003,.net Framework v1.1,Windows SharePoint Services
2.0,SharePoint Portal Server 2003

Can you do a chk with your config. so that if this problem is due to
some software config then we can resolve it?

If you have any other ideas to make this thing work do mention
those...I need this issue resolved on a very critical basis...

Thanks in Advance,
Arjun

"Patrick.O. Ige" <Pa*********@di scussions.micro soft.com> wrote in message news:<14******* *************** ************@mi crosoft.com>...
HI arjun,,
I don't know if there was a BUG i use IsinRole with the Active
Directory and it works!what i'm thinking you are dong wrong is that i think
its CASE SENSITIVE!
Your code should be good since you said it works for some users..
Try checking for case senstitve and post back if you have more questions.
Patrick

"arjun" wrote:
Hi All,
I am developing a A webpage to be seen in a page viewer
webpart(Sharepo int 2003).
The page is supposed to check for the current user name and then check
the user membership in some local group membership.But here I am
failing .The isinRole call on the Principal object is returning true
for buitin groups and some local groups but not ALL.
I read in one of the previous threads that this was a bug in Framework
1 in which all groups are not retrieved.SP3 takes care of it.
However I have Framework 1.1 ...So the patches are not working...
Can anyone tell me if this bug is fixed in v1.1?
The code I am using is hereis something like this
HttpContext.Cur rent.User.IsInR ole("<machinena me>\<group name>")
Please do point out if something is amiss?
If This thing does not work can anyone give any pointers to a similar
code that achieves this in Visual Basic 6.0
Thanks in Advance,
Arjun

Nov 18 '05 #5
Hi Patrik,
will keep you posted on any thing new on this.
Thanks Again,
Arjun

"Patrick.O. Ige" <Pa*********@di scussions.micro soft.com> wrote in message news:<06******* *************** ************@mi crosoft.com>...
Arjun,
Also try posting your code to :-
the FORUM :- dotnet.framewor k.aspnet.securi ty
Patrick
"arjun" wrote:
Hi Patrik,

The bug I was referring to is the following:
http://support.microsoft.com/default...;en-us;q321562

I have tried nearly all combo of the local group names every time for
some select groups isInRole is false.Even if a purticular syntax works
for others it fails in question of these groups.I think my prob is
this bug.

My box is in an active directory domain.The configuration of my box is
:
Windows Server 2003,.net Framework v1.1,Windows SharePoint Services
2.0,SharePoint Portal Server 2003

Can you do a chk with your config. so that if this problem is due to
some software config then we can resolve it?

If you have any other ideas to make this thing work do mention
those...I need this issue resolved on a very critical basis...

Thanks in Advance,
Arjun

"Patrick.O. Ige" <Pa*********@di scussions.micro soft.com> wrote in message news:<14******* *************** ************@mi crosoft.com>...
HI arjun,,
I don't know if there was a BUG i use IsinRole with the Active
Directory and it works!what i'm thinking you are dong wrong is that i think
its CASE SENSITIVE!
Your code should be good since you said it works for some users..
Try checking for case senstitve and post back if you have more questions.
Patrick

"arjun" wrote:

> Hi All,
> I am developing a A webpage to be seen in a page viewer
> webpart(Sharepo int 2003).
> The page is supposed to check for the current user name and then check
> the user membership in some local group membership.But here I am
> failing .The isinRole call on the Principal object is returning true
> for buitin groups and some local groups but not ALL.
> I read in one of the previous threads that this was a bug in Framework
> 1 in which all groups are not retrieved.SP3 takes care of it.
> However I have Framework 1.1 ...So the patches are not working...
> Can anyone tell me if this bug is fixed in v1.1?
> The code I am using is hereis something like this
> HttpContext.Cur rent.User.IsInR ole("<machinena me>\<group name>")
> Please do point out if something is amiss?
> If This thing does not work can anyone give any pointers to a similar
> code that achieves this in Visual Basic 6.0
> Thanks in Advance,
> Arjun
>

Nov 18 '05 #6

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

Similar topics

0
1366
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. One question that I had, is there anything different that has to be done with AD when using this method? For example, I'm populating a list box with the members of this group, and when I attach using LDAP I had to use...
0
1121
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 network, it is instantaneous. Even more interesting is that IsInRole checks for a local group (e.g. Administrators), not a domain group, so I am not sure why it would make such a difference. Either version of IsInRole (with a string parameter and an...
6
4333
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 does isInRole work? Thanks, Jim.
0
1012
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 method does not work correct. I use the following code: String DefaultAdminRole = @"dom\admgroup"; String UserName="";
2
3240
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 of my application. In the global.asax: protected void Application_AcquireRequestState(Object sender, EventArgs e) {
8
13157
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 app), webmethoda are using the Principalpermssion attribute () for identification. Result --> does not work
4
4427
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 Mydomain\Bob But when I run the line If My.User.IsInRole("MyCustomRole") Then it returns false.
10
7038
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 group, user bob, group TestUsers and then try to determine if My.user.Isinrole("TestUsers") I always get a false, which is incorrect. If I put Bob as part of Administrators or any other built-in group on the DC and look at...
1
5615
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 are hard- coded, something like this: private static string allowedReadRoles = new string { "Sales", "Ordering" };
0
10564
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10320
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10308
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9134
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7609
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6846
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4288
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 we have to send another system
2
3806
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2981
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.