|
yes i put all the code of the Onstart event in try catch block. its no use.
i am getting the same error message when i tried to start the service from the service explorer
thanks
Anil Veeraghattapu.
|
|
|
|
|
Message Closed
modified 23-Nov-14 6:19am.
|
|
|
|
|
Thanks
i find the exception in the text file.
you did a great help.
the problem is it was a fromat exception throw by a log control when i tried to log somethin in the on start event
Thanks
Anil Veeraghattapu.
|
|
|
|
|
Anil Veeraghattapu 4 wrote: i put all the code of the Onstart event
There is your problem.
The general layout of a Service is, in OnStart, you are expected to start a seperate thread that handles your main service code loop, such a listeners or some kind of polling loop, ... This releases OnStart and returns control back to the Service Control Manager.
In OnStop, you shutdown this loop as appropriate and let the thread stop gracefully.
Putting all of your code in OnStart gives you exactly the error message your getting because OnStart never returns control back to the SCM within the default 30 seconds the SCM expects OnStart to return.
|
|
|
|
|
Have you run it under the debugger yet?
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
the service a'nt got started my friend.
i am unable to attach it to debugger.
Thanks
Anil Veeraghattapu.
|
|
|
|
|
Wrong. Put a breakpoint at the top of the Start)( method.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
In the event log you can see further information, if there's an exception you will be able to see it there as well.
|
|
|
|
|
Yes
you are right.
it was some format exception
i find it in the event log too.
Thanks for your help
Thanks
Anil veeraghattapu.
|
|
|
|
|
You can debug services using the AndersonImes.ServiceProcess dll which works really well. Had a quick look but can't find it so you may have to contact[^] him directly: well worth having in your toolkit.
me, me, me
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
nils illegitimus carborundum
|
|
|
|
|
I have a user control (composed of 10 text boxes).
on certain user inputs -> multiple rows of above user control are added to a form.
After certain amount of operation, I start getting error - cannot create window handle.
How do I need to clear window handle? Shouldn't it be automatically disposed?
Gurpreet
|
|
|
|
|
Message Closed
modified 23-Nov-14 6:20am.
|
|
|
|
|
I do not want to show them all at once. At a time say 100 are visible but after the user changes the input I need to show other 100. But how do a ensure that the handle is destroyed for previous ones?
Gurpreet
|
|
|
|
|
So you have 100 visible UserControls with 10 TextBoxes each, and a lot of invisible ones?
That is a bad design. If you need that many user inputs, use a listing control, maybe a DataGridView.
|
|
|
|
|
KaurGurpreet wrote: How do I need to clear window handle?
You don't. That's handled by the controls themselves.
If you're running into this problem, it could be that your Showing a form with ShowDialog (not Show!), but never Disposing it when you're done. Just because you can't see the form anymore doesn't mean it's gone. If you don't Dispose the form, you're leaking resources (handles). This issue does not come up if the form is shown with the Show method.
If you're putting up hundreds and hundreds of controls, your design is the problem, not the window handles being released.
|
|
|
|
|
Hi All,
I want to retrieve all the users of a computer which is in network in my C# application.
Any idea?
Regards,
Sunil G.
|
|
|
|
|
Message Closed
modified 23-Nov-14 6:20am.
|
|
|
|
|
There is no any domain in my company.
|
|
|
|
|
Then you will have to use netapi32.dll
look here: article
|
|
|
|
|
Hi all, How to create xmpp client using C#? Can anybody help me I just need that client to talk(chat) with xmpp server like jabber etc.
|
|
|
|
|
choose a single forum to ask your question, and stick to it.
|
|
|
|
|
Hi,
I have the following RSS Feed containing a CDATA Tag. I wish to get the "img src" attribute information, but i am unable to get it. Can anybody help please !!!.
I am using LINQ to XML. Please give LINQ solutions only...
<description><![CDATA[
><img src="http://l.yimg.com/a/i/us/we/52/30.gif"/><br />
<b>Current Conditions:</b><br />
Partly Cloudy, 37 C<BR />
<BR /><b>Forecast:</b><BR />
Fri - Sunny/Wind. High: 39 Low: 25<br />
Sat - Sunny/Wind. High: 42 Low: 26<br />
<br />
<a href="http://us.rd.yahoo.com/dailynews/rss/weather/Islamabad__PK/*http://weather.yahoo.com/forecast/PKXX0006_c.html">Full Forecast at Yahoo! Weather</a><BR/><BR/>
(provided by <a href="http://www.weather.com" >The Weather Channel</a>)<br/>
]]></description>
Thank you in advance...
|
|
|
|
|
Just access the RSS feed(XML content) in your dataset , after getting in your dataset you can do wat ever you want.
|
|
|
|
|
If you guide me a bit further...
1. I have loaded the document as follows.
XDocument rssFeed = XDocument.Load(sForecastUrl);
2. Now i get the descendant nodes as follows
var desc = from e in rssFeed.Descendants("channel").Descendants("item").Descendants("description")
select e;
foreach (var element in desc)
{
element.Value;
}
I am able to get description element value which contains the cdata tag.
Dont know what to do next to get "Img Src" attribute directly rather than from string manipulation.
Some code in the foreach loop should help please.
|
|
|
|
|
No No...
Get the XML and convert the XML to DATASET using dataset.readxml() you will get all tags as columns and its attributes , so you can easily get the attribute value.
|
|
|
|