Click here to Skip to main content
15,899,313 members
Home / Discussions / C#
   

C#

 
GeneralRe: Http 502 and 503 errors Pin
led mike18-Jul-08 8:59
led mike18-Jul-08 8:59 
GeneralRe: Http 502 and 503 errors Pin
George_George20-Jul-08 16:09
George_George20-Jul-08 16:09 
GeneralRe: Http 502 and 503 errors Pin
N a v a n e e t h18-Jul-08 17:10
N a v a n e e t h18-Jul-08 17:10 
GeneralRe: Http 502 and 503 errors Pin
George_George20-Jul-08 16:05
George_George20-Jul-08 16:05 
GeneralRe: Http 502 and 503 errors Pin
N a v a n e e t h20-Jul-08 16:24
N a v a n e e t h20-Jul-08 16:24 
GeneralRe: Http 502 and 503 errors Pin
George_George20-Jul-08 16:43
George_George20-Jul-08 16:43 
GeneralRe: Http 502 and 503 errors Pin
N a v a n e e t h20-Jul-08 20:29
N a v a n e e t h20-Jul-08 20:29 
GeneralRe: Http 502 and 503 errors Pin
George_George20-Jul-08 20:43
George_George20-Jul-08 20:43 
GeneralRe: Http 502 and 503 errors Pin
led mike21-Jul-08 5:59
led mike21-Jul-08 5:59 
GeneralRe: Http 502 and 503 errors Pin
George_George21-Jul-08 19:26
George_George21-Jul-08 19:26 
GeneralRe: Http 502 and 503 errors Pin
N a v a n e e t h21-Jul-08 16:48
N a v a n e e t h21-Jul-08 16:48 
GeneralRe: Http 502 and 503 errors Pin
George_George21-Jul-08 19:24
George_George21-Jul-08 19:24 
GeneralRe: Http 502 and 503 errors Pin
N a v a n e e t h22-Jul-08 17:00
N a v a n e e t h22-Jul-08 17:00 
GeneralRe: Http 502 and 503 errors Pin
George_George31-Jul-08 2:30
George_George31-Jul-08 2:30 
QuestionMaximum buffer size while displaying to the grid Pin
tasumisra17-Jul-08 21:36
tasumisra17-Jul-08 21:36 
QuestionExcel data to dataset Pin
Sunil Wise17-Jul-08 20:52
professionalSunil Wise17-Jul-08 20:52 
AnswerRe: Excel data to dataset Pin
Sunil Wise17-Jul-08 21:29
professionalSunil Wise17-Jul-08 21:29 
QuestionWMI “Printer job status “is not working in Windows service Pin
Rajesh_K_Sharma17-Jul-08 19:39
Rajesh_K_Sharma17-Jul-08 19:39 
AnswerRe: WMI “Printer job status “is not working in Windows service Pin
Abhijit Jana17-Jul-08 21:23
professionalAbhijit Jana17-Jul-08 21:23 
Rajesh_K_Sharma wrote:
void GetStatus()
{
ManagementObjectSearcher printJobsSeacher = new ManagementObjectSearcher(@"SELECT * FROM Win32_PrintJob");
ManagementObjectCollection printJobs = printJobsSeacher.Get();
foreach (ManagementObject item in printJobs)
{
// Print JobStatus
}
}
}


if your run this code with out services does this get the print job status?

try this
<br />
using System;<br />
using System.Management;<br />
using System.Windows.Forms;<br />
<br />
namespace WMISample<br />
{<br />
    public class MyWMIQuery<br />
    {<br />
        public static void Main()<br />
        {<br />
            try<br />
            {<br />
                ManagementObjectSearcher searcher = <br />
                    new ManagementObjectSearcher("root\\CIMV2", <br />
                    "SELECT * FROM Win32_PrintJob"); <br />
<br />
                foreach (ManagementObject queryObj in searcher.Get())<br />
                {<br />
                    Console.WriteLine("-----------------------------------");<br />
                    Console.WriteLine("Win32_PrintJob instance");<br />
                    Console.WriteLine("-----------------------------------");<br />
                    Console.WriteLine("JobStatus: {0}", queryObj["JobStatus"]);<br />
                }<br />
            }<br />
            catch (ManagementException e)<br />
            {<br />
                MessageBox.Show("An error occurred while querying for WMI data: " + e.Message);<br />
            }<br />
        }<br />
    }<br />
}<br />


cheers,
Abhijit

GeneralRe: WMI “Printer job status “is not working in Windows service Pin
Rajesh_K_Sharma17-Jul-08 21:50
Rajesh_K_Sharma17-Jul-08 21:50 
QuestionHow to get the List of Database Server Pin
wasimsharp17-Jul-08 18:34
wasimsharp17-Jul-08 18:34 
AnswerRe: How to get the List of Database Server Pin
wasimsharp17-Jul-08 20:09
wasimsharp17-Jul-08 20:09 
GeneralRe: How to get the List of Database Server Pin
Jimmanuel18-Jul-08 2:13
Jimmanuel18-Jul-08 2:13 
GeneralRe: How to get the List of Database Server Pin
wasimsharp19-Jul-08 1:47
wasimsharp19-Jul-08 1:47 
QuestionRegistry Pin
damianrda17-Jul-08 18:30
damianrda17-Jul-08 18:30 

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.