Click here to Skip to main content
13,250,883 members (49,285 online)

Web Development

 
GeneralRe: use of SECTION in Html 5 Pin
AmbientCoding29-Jan-13 13:38
memberAmbientCoding29-Jan-13 13:38 
AnswerRe: use of SECTION in Html 5 Pin
erikroyall4-Feb-13 7:51
membererikroyall4-Feb-13 7:51 
Questionsubir archivos en php Pin
Member 978298924-Jan-13 4:41
memberMember 978298924-Jan-13 4:41 
Questionasp.net security in 3 tier.. Pin
shafeeq_dba21-Jan-13 3:21
membershafeeq_dba21-Jan-13 3:21 
AnswerRe: asp.net security in 3 tier.. Pin
Sandeep Mewara21-Jan-13 6:23
mvpSandeep Mewara21-Jan-13 6:23 
AnswerRe: asp.net security in 3 tier.. Pin
Rahul Rajat Singh22-Jan-13 20:43
mvpRahul Rajat Singh22-Jan-13 20:43 
QuestionPasting screen shot in text field in web application Pin
Pramod K Singh20-Jan-13 23:17
memberPramod K Singh20-Jan-13 23:17 
AnswerRe: Pasting screen shot in text field in web application Pin
Sandeep Mewara20-Jan-13 23:46
mvpSandeep Mewara20-Jan-13 23:46 
QuestionCreating Mobile Apps with HTML5 Pin
Sunitha2716-Jan-13 6:11
memberSunitha2716-Jan-13 6:11 
AnswerRe: Creating Mobile Apps with HTML5 Pin
Sandeep Mewara16-Jan-13 7:12
mvpSandeep Mewara16-Jan-13 7:12 
AnswerRe: Creating Mobile Apps with HTML5 Pin
Richard MacCutchan16-Jan-13 7:13
mvpRichard MacCutchan16-Jan-13 7:13 
QuestionHTML5 Audio Stream Pin
Adam Jasper16-Jan-13 3:14
memberAdam Jasper16-Jan-13 3:14 
QuestionAbout mobile web debugger Pin
tidelgl13-Jan-13 20:23
membertidelgl13-Jan-13 20:23 
QuestionUnable to start service using WMI Pin
only1rb11-Jan-13 7:22
memberonly1rb11-Jan-13 7:22 
This is a 2 part question. I have a service that has a name "Ads 1", "Ads 2". They take a parameter of "1" and "2".

1. When I invoke the method to start the service "Ads 1" the " 1" is truncated, so I get "Ads" being passed. How can I stop this and force it to be "Ads 1"? All my other services start, stop, pause, everything else just fine, but they don't have a space then number either. What am I missing?

2. I am trying to pass the parameter with the startservice. I am using a hardcoded parameter value(1) for now to get it to work in testing. Due to the fact that I am unable to get the service to start I am not sure the parameter is being passed. How can I check to see if the paramter is being passed and/or Am I doing this right way?

Any help is appreciated. Thank you.

<pre lang="c#">  
        int iPos; 
        int iCount = 0; 
        string sService; 
 
        try 
        { 
            ConnectionOptions conOpts = new ConnectionOptions(); 
            conOpts.Username = ddlServers.SelectedItem.Text.ToString() + "\\" + System.Configuration.ConfigurationManager.AppSettings["AdminUser"].ToString(); 
            conOpts.Password = System.Configuration.ConfigurationManager.AppSettings["AdminPassword"].ToString(); 
            System.Management.ManagementScope oMs = new System.Management.ManagementScope("\\\\" + 
                                                                                          ddlServers.SelectedItem.Text + 
                                                                                          "\\root\\cimv2", conOpts); 
 
            while (iCount < lboxServices.Items.Count) 
            { 
                if (lboxServices.Items[iCount].Selected) 
                { 
                    iPos = lboxServices.Items[iCount].Text.IndexOf("-"); 
                    sService = lboxServices.Items[iCount].Text.Substring(0, iPos).Trim(); 
 
                    System.Management.ObjectQuery oQuery = new System.Management.ObjectQuery("select * from Win32_Service Where Name='" + 
                                                                                             sService + 
                                                                                             "'"); 
                    ManagementObjectSearcher oSearcher = new ManagementObjectSearcher(oMs, oQuery); 
                    ManagementObjectCollection oReturnCollection = oSearcher.Get(); 
 
                    if (oReturnCollection.Count > 0) 
                    { 
                        foreach (ManagementObject oReturn in oReturnCollection) 
                        { 
                            if (oReturn.GetPropertyValue("State").ToString().ToLower().Equals("stopped") || 
                                oReturn.GetPropertyValue("State").ToString().ToLower().Equals("paused")) 
                            { 
                                String[] sArgs = new string[] { "1" }; 
                                oReturn.InvokeMethod("StartService", sArgs); 
                            } 
                        } 
                    } 
 
                    lboxServices.Items[iCount].Text = sService + " - " + CheckService(ddlServers.SelectedItem.Text, sService); 
                } 
                iCount++; 
            } 
        } 
        catch (Exception err) 
        { 
            lboxServices.Items.Add("Error: " + err.Message.ToString()); 
        }

QuestionHelp! Pin
crood5-Jan-13 21:05
membercrood5-Jan-13 21:05 
AnswerRe: Help! Pin
Sandeep Mewara5-Jan-13 21:27
mvpSandeep Mewara5-Jan-13 21:27 
Questiondrop down menu pushes the content down similar to ibm.com Pin
Mohamed Samir30-Dec-12 0:59
memberMohamed Samir30-Dec-12 0:59 
AnswerRe: drop down menu pushes the content down similar to ibm.com Pin
Sandeep Mewara30-Dec-12 1:13
mvpSandeep Mewara30-Dec-12 1:13 
Questiongoogle map include in contact.aspx page Pin
Member 819678127-Dec-12 21:50
memberMember 819678127-Dec-12 21:50 
AnswerRe: google map include in contact.aspx page Pin
vbmike28-Dec-12 9:59
membervbmike28-Dec-12 9:59 
AnswerRe: google map include in contact.aspx page Pin
Sandeep Mewara5-Jan-13 21:28
mvpSandeep Mewara5-Jan-13 21:28 
AnswerRe: google map include in contact.aspx page Pin
S.M. Zamshed Farhan15-Jan-13 5:12
memberS.M. Zamshed Farhan15-Jan-13 5:12 
QuestionUsing Developer Tools Pin
Phanindra26127-Dec-12 2:59
memberPhanindra26127-Dec-12 2:59 
AnswerRe: Using Developer Tools Pin
S.M. Zamshed Farhan12-Jan-13 6:46
memberS.M. Zamshed Farhan12-Jan-13 6:46 
AnswerRe: Using Developer Tools Pin
S.M. Zamshed Farhan12-Jan-13 6:48
memberS.M. Zamshed Farhan12-Jan-13 6:48 
QuestionSSRS Report Conversion to PDF Pin
Vinay Meka22-Dec-12 1:58
memberVinay Meka22-Dec-12 1:58 
AnswerRe: SSRS Report Conversion to PDF Pin
Sandeep Mewara5-Jan-13 21:34
mvpSandeep Mewara5-Jan-13 21:34 
QuestionCould not load file or assembly Pin
Chona117120-Dec-12 2:57
memberChona117120-Dec-12 2:57 
AnswerRe: Could not load file or assembly Pin
ArpitDubey28-Dec-12 9:50
memberArpitDubey28-Dec-12 9:50 
QuestionHow should I measure scroll position in different browsers Pin
woomla17-Dec-12 22:52
memberwoomla17-Dec-12 22:52 
AnswerRe: How should I measure scroll position in different browsers Pin
Zaf Khan19-Dec-12 6:46
memberZaf Khan19-Dec-12 6:46 
QuestionBest Web Technologies Pin
emadns12-Dec-12 4:40
memberemadns12-Dec-12 4:40 
AnswerRe: Best Web Technologies Pin
David Mujica12-Dec-12 5:22
memberDavid Mujica12-Dec-12 5:22 
AnswerRe: Best Web Technologies Pin
achantayamini17-Dec-12 23:05
memberachantayamini17-Dec-12 23:05 
AnswerRe: Best Web Technologies Pin
jfmorgan33331-Dec-12 11:01
memberjfmorgan33331-Dec-12 11:01 
QuestionJSP and JSTL and so on ... Pin
SheraX11-Dec-12 7:20
memberSheraX11-Dec-12 7:20 
AnswerRe: JSP and JSTL and so on ... Pin
Marcus Kramer11-Dec-12 7:28
memberMarcus Kramer11-Dec-12 7:28 
GeneralRe: JSP and JSTL and so on ... Pin
SheraX11-Dec-12 7:32
memberSheraX11-Dec-12 7:32 
GeneralRe: JSP and JSTL and so on ... Pin
Andrew Stoute11-Dec-12 8:03
memberAndrew Stoute11-Dec-12 8:03 
GeneralRe: JSP and JSTL and so on ... Pin
SheraX11-Dec-12 8:12
memberSheraX11-Dec-12 8:12 
QuestionSMTP Programming Pin
DisIsHoody9-Dec-12 14:49
memberDisIsHoody9-Dec-12 14:49 
AnswerRe: SMTP Programming Pin
vbmike10-Dec-12 9:49
membervbmike10-Dec-12 9:49 
GeneralRe: SMTP Programming Pin
DisIsHoody10-Dec-12 14:30
memberDisIsHoody10-Dec-12 14:30 
GeneralRe: SMTP Programming Pin
Richard MacCutchan10-Dec-12 22:36
mvpRichard MacCutchan10-Dec-12 22:36 
GeneralRe: SMTP Programming Pin
DisIsHoody11-Dec-12 10:40
memberDisIsHoody11-Dec-12 10:40 
GeneralRe: SMTP Programming Pin
Richard MacCutchan11-Dec-12 11:26
mvpRichard MacCutchan11-Dec-12 11:26 
GeneralRe: SMTP Programming Pin
DisIsHoody11-Dec-12 11:44
memberDisIsHoody11-Dec-12 11:44 
GeneralRe: SMTP Programming Pin
Richard MacCutchan11-Dec-12 11:58
mvpRichard MacCutchan11-Dec-12 11:58 
GeneralRe: SMTP Programming Pin
DisIsHoody11-Dec-12 12:20
memberDisIsHoody11-Dec-12 12:20 
QuestionXSLT Transforms - how to get just some of in a for-each Pin
QuickBooksDev8-Dec-12 3:26
memberQuickBooksDev8-Dec-12 3:26 

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.


Advertise | Privacy |
Web01 | 2.8.171114.1 | Last Updated 19 Nov 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid