Access denied when calling the cluster-api (clusapi.dll)
-
Hi, I have an application that uses the cluster-api (clusapi.dll) on Windows Server 2003. When I run my application under the Administrator account the call to the method OpenCluster works fine, but the problem is that not all users of my application are in fact administrators and when I call GetLastError after the call fails it says: Access is denied I realize that someone belonging to the Users group are not allowed to make that call, but I can't find in MSDN (or anywhere else) why this is the case and I'd like to check if anyone knows a way around this. This code always returns NULL since hCluster is NULL after the call to OpenCluster:
HCLUSTER hCluster;
hCluster = OpenCluster( NULL );
if( hCluster == NULL )
{
return NULL;
}I'm more used to C# coding, but I have written a dll in C++ containing all the cluster functionality I need (and then using that dll in my C# project via p/Invoke). Any ideas around this would be appreciated. Thanks!
-
Hi, I have an application that uses the cluster-api (clusapi.dll) on Windows Server 2003. When I run my application under the Administrator account the call to the method OpenCluster works fine, but the problem is that not all users of my application are in fact administrators and when I call GetLastError after the call fails it says: Access is denied I realize that someone belonging to the Users group are not allowed to make that call, but I can't find in MSDN (or anywhere else) why this is the case and I'd like to check if anyone knows a way around this. This code always returns NULL since hCluster is NULL after the call to OpenCluster:
HCLUSTER hCluster;
hCluster = OpenCluster( NULL );
if( hCluster == NULL )
{
return NULL;
}I'm more used to C# coding, but I have written a dll in C++ containing all the cluster functionality I need (and then using that dll in my C# project via p/Invoke). Any ideas around this would be appreciated. Thanks!
Calla wrote:
I'd like to check if anyone knows a way around this.
If you did find a way to circumvent security and Microsoft found out, they would likely fix the security hole and then the work around would no longer work anyway. It would be safer to just follow guidelines.
-
Calla wrote:
I'd like to check if anyone knows a way around this.
If you did find a way to circumvent security and Microsoft found out, they would likely fix the security hole and then the work around would no longer work anyway. It would be safer to just follow guidelines.
-
I guess you're right lm - thanks for your reply. So this is obviously done by design from MS. Well, do you know if there is a way to find out if an NT Service is part of a cluster group? That's what I really need to find out.
-
Calla wrote:
do you know if there is a way to find out if an NT Service is part of a cluster group?
No, I have no experience with that scenario. Have you looked at the clustering API documentation[^]?
-
Calla wrote:
Yes I have, but no luck yet
Sure, it sort of makes sense since the point of clustering/balancing is that you should not have to know which specific machine something is running on. If I were in your shoes, I would want to make sure there is an actual need for what you are trying to do. It seems contradictory.
-
Calla wrote:
Yes I have, but no luck yet
Sure, it sort of makes sense since the point of clustering/balancing is that you should not have to know which specific machine something is running on. If I were in your shoes, I would want to make sure there is an actual need for what you are trying to do. It seems contradictory.
Hi Mike, I need your voice here: http://www.codeproject.com/Messages/3121978/How-to-access-a-remote-machine-from-a-local-machine-and-perform-basic-function-like-execute-and-close-the-remote-machines-application.aspx[^] :sigh:
It is a crappy thing, but it's life -^ Carlo Pallini
-
Hi Mike, I need your voice here: http://www.codeproject.com/Messages/3121978/How-to-access-a-remote-machine-from-a-local-machine-and-perform-basic-function-like-execute-and-close-the-remote-machines-application.aspx[^] :sigh:
It is a crappy thing, but it's life -^ Carlo Pallini
Yes I see your thread is a perfect example of why the HOW TO ANSWER A QUESTION message from Maunder is ridiculous. Anyway, because of that, I don't supply my voice in these forums any longer. See my BIO which I updated to that effect. http://www.codeproject.com/script/Membership/View.aspx?mid=2940943[^]
-
Yes I see your thread is a perfect example of why the HOW TO ANSWER A QUESTION message from Maunder is ridiculous. Anyway, because of that, I don't supply my voice in these forums any longer. See my BIO which I updated to that effect. http://www.codeproject.com/script/Membership/View.aspx?mid=2940943[^]
This is sad, but I understand how you are feeling. :(
It is a crappy thing, but it's life -^ Carlo Pallini