santoo 0 Newbie Poster

HI,

Here is what the requirement is like.There are few cctv's placed at a construction site,I want to view whats happening out there by sitting at some other place..i.e watch the action live on my website.How can this be done....can this be done using asp.net.
Please some one help me in this regard.

Thanks.
santosh

santoo 0 Newbie Poster

Hi,
I want to trace the SOAP messages using WSE3.0 by enabling trace.I am not able to see the trace output files.
Here is what I am doing...I have developed a webservice Helloservice.asmx and configured it using WSEsettings for tracing.
Also I developed a client application to test the service and did the same by configuring using WSEsettings and enabled tracing.But when I run the client application,I am not able to see the trace o/p though the webservice is being executed properly.....please some one guide me..

Thanks.

santoo 0 Newbie Poster

hi,

Can someone help me in getting the userinformation from the windows Active Directory.
My PC is installed with windowsXP.How to set the LDAP Path ?

thanks.
santosh.

santoo 0 Newbie Poster

Hi,
Can anyone let me know how to list all the users from a windows active directory using C#.

thanks.
santosh.

santoo 0 Newbie Poster

Hi,
I am working from home for my client.Actually I have written a webservice in C#.net which is working fine.I also have a webapplication which uses this webservice..and the application works fine when executed.The problem is now I have to send the files to my client..so that he deploys them in the production server.
Now what are the changes should he or I should make in webservice to execute the webservice on his machine..he said that no visualstudio is installed in his system.
plzz help me.

thanks.

santoo 0 Newbie Poster

Hi,

I have written a webservice and is working fine when tested usng a client application.Now I want to deploy my webservice on a server other than the development server.How can this be done.what are steps to be followed.

thanks.

santoo 0 Newbie Poster

hi,

how can i display the range of record being shown in the page..
i.e like "Showing 15-25 of 100 records".

thanks.

santoo 0 Newbie Poster

Hi,

this is my xml fragment

<?xml version="1.0" encoding="ISO-8859-1"?>

<Table xmlns="urn:UMS-application" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance/UMS_APP.xsd">
<Row>
<APP_ID>skumar</APP_ID>
<APP_NAME>1</APP_NAME>
<APP_DESC>Sample test application 2</APP_DESC>
<ACTIVE>true</ACTIVE>
</Row>
<Row>
<APP_ID>10</APP_ID>
<APP_NAME>Test3</APP_NAME>
<APP_DESC>sample test</APP_DESC>
<ACTIVE>true</ACTIVE>
</Row>
<Row>
<APP_ID>11</APP_ID>
<APP_NAME>Test4</APP_NAME>
<ACTIVE>true</ACTIVE>
</Row>
</Table>

this is the xsd schema file for validating the above xml

<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="UMS_APPS"
targetNamespace="urn:UMS-application"
xmlns="urn:UMS-application" elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Table">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="Row">
<xs:complexType>
<xs:sequence>
<xs:element name="APP_ID" type="xs:positiveinteger"/>
<xs:element name="APP_NAME" type="xs:string" />
<xs:element minOccurs="0" name="APP_DESC" type="xs:string" default="" />
<xs:element name="ACTIVE" type="xs:boolean" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

when I validate the xml using the xsd it is saying validation success.

when I chenge the appid in xml to a string ,or appname to a integer value..still it running with out any errors.wher appid is of type integer and appname is of type string.plzz tell me whether there is any mistake in xsd file.

thanks.

santoo 0 Newbie Poster

Hi,

How to connect to sql server...on a remote system using the IP address of the machine.
I actually want to start the MSSQLSERVER on a remote machine using the sql service manager.
how can this be done.

thanks.

santoo 0 Newbie Poster

Hi...this is the complete code.I had set the timer for 1min.When I start the service it is working fine for about 3 or 4 min..and it stopps working.what is the reason.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.ServiceProcess;
using System.Text;
using System.Threading;
using System.Configuration;


namespace LDMSN
{
public partial class LDMSN : ServiceBase
{
private string IP;
public LDMSN()
{
InitializeComponent();
IP = ConfigurationManager.AppSettings.Get("IP");//IP="machine name"
}


public void EventAction(object sender)
{
string PcName = IP;
ServiceController[] services = ServiceController.GetServices();
for (int i = 0; i < services.Length; i++)
{


if (services.DisplayName == "MSSQLSERVER")
{
ServiceController sc = new ServiceController(services.DisplayName, PcName);
if (sc.Status == ServiceControllerStatus.Running)
{
sc.Stop();
}
if (sc.Status == ServiceControllerStatus.Stopped)
{
sc.Start();
}


}
}
System.IO.File.AppendAllText("C:\\AuthorLog.txt","AuthorLogService fires EventAction at " + System.DateTime.Now.ToString());
}


protected override void OnStart(string[] args)
{
// TODO: Add code here to start your service.
const int timervalue = 60000;
System.Threading.Timer Timer = null;


System.IO.File.AppendAllText("C:\\AuthorLog.txt","AuthorLogService has been started at " + System.DateTime.Now.ToString());


System.Threading.TimerCallback tDelegate = new System.Threading.TimerCallback(EventAction);
Timer = new System.Threading.Timer(tDelegate, this, 0, timervalue);
}


protected override void OnStop()
{
// TODO: Add code here to perform any tear-down necessary to stop your service.
}
}
}
santoo 0 Newbie Poster
public partial class LDMSN : ServiceBase
    {
        private Timer _timer;
        private bool _IsStarted;
        private int TimerValue=60000;
        public LDMSN()
        {
            InitializeComponent();
        }

        private void ProcessMessage(object sender, System.Timers.ElapsedEventArgs e)
        {
            if (_IsStarted)
            {
                _timer.Stop();
              System.ServiceProcess.ServiceController controller = new ServiceController();
                controller.MachineName = "."
                controller.ServiceName = "MSSQLSERVER";
                string status = controller.Status.ToString();
                if (status == "started")
                {
                    controller.Stop();
                    EventLog.WriteEntry("MSSQLSERVER stopped");
                }
                if (status == "stopped")
                {
                    controller.Start();
                    EventLog.WriteEntry("MSSQLSERVER started");
                }
                _timer.Start();
            }
        }

        protected override void OnStart(string[] args)
        {
            EventLog.WriteEntry("LDMSN started");
            _timer = new Timer();
            _timer.Interval = TimerValue; //every 1 min
            _IsStarted = true;
            _timer.Elapsed += new ElapsedEventHandler(this.ProcessMessage);
        }

        protected override void OnStop()
        {
            _IsStarted = false;
            EventLog.WriteEntry("LDMSN stopped");
        }
    }

I have set the _IsStarted=true .....also it is not working.

I have done a small windows application as below

 public Form1()
        {
            InitializeComponent();
            controler.MachineName=".";
            controler.ServiceName="MSSQLSERVER";
            status  = controler.Status.ToString();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            controler.Start();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            controler.Stop();
        }

which is working fine....please tell me how to use timers in windows service.

thanks.

santoo 0 Newbie Poster

Hi,

I am sorry if I am posting ...at wrong place.I donno where to post this.

I have developed a windows service which uses a timer...to run the SQL Server for exactly 30min.If sqlserer service is stopped it starts the service and stops it after 30min and vice versa.

I have written the following code:

public partial class LDMSN : ServiceBase
    {
        private Timer _timer;
        private bool _IsStarted;
        private int TimerValue=60000;
        public LDMSN()
        {
            InitializeComponent();
        }

        private void ProcessMessage(object sender, System.Timers.ElapsedEventArgs e)
        {
            if (_IsStarted)
            {
                _timer.Stop();
              System.ServiceProcess.ServiceController controller = new ServiceController();
                controller.MachineName = "."
                controller.ServiceName = "MSSQLSERVER";
                string status = controller.Status.ToString();
                if (status == "started")
                {
                    controller.Stop();
                    EventLog.WriteEntry("MSSQLSERVER stopped");
                }
                if (status == "stopped")
                {
                    controller.Start();
                    EventLog.WriteEntry("MSSQLSERVER started");
                }
                _timer.Start();
            }
        }

        protected override void OnStart(string[] args)
        {
            EventLog.WriteEntry("LDMSN started");
            _timer = new Timer();
            _timer.Interval = TimerValue; //every 1 min
            _timer.Elapsed += new ElapsedEventHandler(this.ProcessMessage);
        }

        protected override void OnStop()
        {
            _IsStarted = false;
            EventLog.WriteEntry("LDMSN stopped");
        }
    }

But the service is not working..it is just writing into log entry.But not doing what it is supposed to do.please help me regarding this..

thanks.

santoo 0 Newbie Poster

Hi,

I am using 3 radiobuttons which are disabled by default.I want to enable them when i check an other radiobutton on my form.what is the solution for this.

plzz reply.

thanks.

santoo 0 Newbie Poster

SET1 <asp:RadioButton ID="rdintrvl" runat="server" Text="Interval" GroupName="set1" /> SET2

<asp:RadioButton ID="rddays" Text="Days" GroupName="set2" runat="server" Enabled="False"/>
<asp:RadioButton GroupName="set2"  ID="rdweeks" Text="Weeks" runat="server" Enabled="False"/>
<asp:RadioButton GroupName="set2"  ID="rdmonths" Text="Months" runat="server" Enabled="False"/>

in the page load rdintrvl.Attributes.Add("onclick", "enable();"); javascript function is

function enable()
{
   
     document.getElementById('<%=rddays.ClientID%>').disabled = false;
      document.getElementById('<%=rdweeks.ClientID%>').disabled = false;
       document.getElementById('<%=rdmonths.ClientID%>').disabled = false;
}
santoo 0 Newbie Poster

Hi,
I have some radiobuttons which I grouped them as set1..and another set of radiobuttons which I grouped as set2 which are disabled by default.When I click a radiobutton in set1 all the radiobuttons in set2 should be enabled and when I uncheck, all the radiobuttons should again become disabled.
How can this be done..plzz reply.

santoo 0 Newbie Poster

HI,

I want to define short keys (access key) for button and radiobutton list,checkbutton list in my page.It is working fine for simple radio button and checkbox but it is not working for radiobuttonlist and checkbox list.
How to add access keys for Checkbox list and radiobutton list.

thanks.

santoo 0 Newbie Poster

HI all,

I have developed a master page with menu on left hand side.when I click the menu it collapses,
and expands.I am not able to fix the size of the <td> element which has the menu. whenever I click the menu the height is decreasing...the height of the menu should be the height of the screen and it should be the same in all the screen resolutions,how can this be done..

Its very urgent plzz reply..

thanks,

santosh.