RE: VB.NET Win Service throws SecurityException on ServiceController.C
- From: jetan@xxxxxxxxxxxxxxxxxxxx ("Jeffrey Tan[MSFT]")
- Date: Fri, 09 May 2008 06:38:38 GMT
Hi,
Can you tell me where you run your ServiceController.Close() code?
SecurityException is normally thrown because of the .Net Code Access
Permission. Based on my research, there is a ServiceControllerPermission, I
suspect the code group you run may be lack of the
ServiceControllerPermission which caused the SecurityException. To verify
this, you may check SecurityException.PermissionType property. To help us
further understand this problem, can you post the stack trace of this
SecurityException? It may reveal the call path of this failure and find the
culprit.
Since you mentioned the user account is not Administrator, have you tried
to run your code under the Administrator account? Does the problem go away
under the Administrator account? If so, this SecurityException may be
caused by the native Windows service ACL settings permission issue.
Anyway, if we can get the call stack for this SecurityException and other
detailed information to analysis, we will can help you better. Thanks.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- Follow-Ups:
- References:
- Prev by Date: Re: 3DES encryption with a byte array for the key
- Next by Date: Re: Windows Firewall blocking LSASS, causing DCOM launch error
- Previous by thread: VB.NET Win Service throws SecurityException on ServiceController.C
- Next by thread: RE: VB.NET Win Service throws SecurityException on ServiceControll
- Index(es):
Relevant Pages
|