Click here to Skip to main content
15,884,298 members
Home / Discussions / C#
   

C#

 
AnswerRe: send SOAP message using web service Pin
Richard Andrew x641-Aug-13 11:14
professionalRichard Andrew x641-Aug-13 11:14 
GeneralRe: send SOAP message using web service Pin
vaibhavData1-Aug-13 19:05
vaibhavData1-Aug-13 19:05 
QuestionMemory management Pin
sureshdob1-Aug-13 0:11
sureshdob1-Aug-13 0:11 
AnswerRe: Memory management Pin
Eddy Vluggen1-Aug-13 1:05
professionalEddy Vluggen1-Aug-13 1:05 
QuestionGradient arc Pin
FaraonKture31-Jul-13 21:30
FaraonKture31-Jul-13 21:30 
AnswerRe: Gradient arc Pin
Pete O'Hanlon31-Jul-13 22:22
mvePete O'Hanlon31-Jul-13 22:22 
AnswerRe: Gradient arc Pin
Abhinav S31-Jul-13 22:35
Abhinav S31-Jul-13 22:35 
QuestionWMI with service application Pin
Andre O Rahming31-Jul-13 12:37
Andre O Rahming31-Jul-13 12:37 
I have some code that checks a remote machines service to ensure it is all good. It installs as a service which I have tested as local system and network service and I get the
System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).
error. if I manually add a user to the application it works fine here is the part of code I am using to try to pass the alternate credentials any help would be appreciated

ConnectionOptions op = new ConnectionOptions();
op.Username = "xxxxxxx";
op.Password = "xxxxxx";
op.Impersonation = ImpersonationLevel.Impersonate;
op.EnablePrivileges = true;
ManagementScope scope = new ManagementScope(@"\\192.168.1.103\root\cimv2", op);
scope.Options = op;
SelectQuery query = new SelectQuery("SELECT * FROM Win32_Service WHERE Name =" + servicename);

using (ManagementObjectSearcher ser = new ManagementObjectSearcher(scope, query))
{
ManagementObjectCollection services = ser.Get();
foreach (ManagementObject service in services)
{
}
}
AnswerRe: WMI with service application Pin
Garth J Lancaster31-Jul-13 14:24
professionalGarth J Lancaster31-Jul-13 14:24 
AnswerRe: WMI with service application Pin
Abhinav S31-Jul-13 19:47
Abhinav S31-Jul-13 19:47 
AnswerRe: WMI with service application Pin
Bernhard Hiller31-Jul-13 21:05
Bernhard Hiller31-Jul-13 21:05 
QuestionHow to get window z order using GetTopMostWindow api Pin
bunge-bunge31-Jul-13 7:49
bunge-bunge31-Jul-13 7:49 
AnswerRe: How to get window z order using GetTopMostWindow api Pin
Eddy Vluggen31-Jul-13 8:49
professionalEddy Vluggen31-Jul-13 8:49 
QuestionWhat do you think this is about? Pin
Jasmine250131-Jul-13 7:22
Jasmine250131-Jul-13 7:22 
AnswerRe: What do you think this is about? Pin
Eddy Vluggen31-Jul-13 8:46
professionalEddy Vluggen31-Jul-13 8:46 
GeneralRe: What do you think this is about? Pin
Jasmine250131-Jul-13 9:06
Jasmine250131-Jul-13 9:06 
GeneralRe: What do you think this is about? Pin
Eddy Vluggen31-Jul-13 10:42
professionalEddy Vluggen31-Jul-13 10:42 
GeneralRe: What do you think this is about? Pin
Jasmine250131-Jul-13 11:13
Jasmine250131-Jul-13 11:13 
AnswerRe: What do you think this is about? Pin
Ravi Bhavnani31-Jul-13 10:46
professionalRavi Bhavnani31-Jul-13 10:46 
GeneralRe: What do you think this is about? Pin
Jasmine250131-Jul-13 11:18
Jasmine250131-Jul-13 11:18 
GeneralRe: What do you think this is about? Pin
Ravi Bhavnani31-Jul-13 12:02
professionalRavi Bhavnani31-Jul-13 12:02 
GeneralRe: What do you think this is about? Pin
Jasmine250131-Jul-13 12:23
Jasmine250131-Jul-13 12:23 
GeneralRe: What do you think this is about? Pin
Ravi Bhavnani31-Jul-13 12:39
professionalRavi Bhavnani31-Jul-13 12:39 
AnswerRe: What do you think this is about? Pin
Bernhard Hiller31-Jul-13 21:16
Bernhard Hiller31-Jul-13 21:16 
AnswerRe: What do you think this is about? Pin
BillWoodruff1-Aug-13 2:09
professionalBillWoodruff1-Aug-13 2:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.