|
Hi,
I newbie in .Net. I have developed a Windows service with the help of C#.It is working fine once it has been started successfully.
But I am getting an error when try to RUN that service from service manager. Though it has been set the start type to "Automatic". Service manager was failed to start that.
So, I have tried to start it manually and got this ERROR:
"The [service name] on Local Computer started and then stopped. Some srevices stop automatically if they have no work to do, for example, the Performance Logs and Alerts service."
I should mention here, sometimes this problem has been overcomed by restarting the System. But most of the time the problem was there even after restarting the system.
Please Help me to fix the problem asap.
|
|
|
|
|
Erhm, the problem (ofcourse) can have loads of causes. First of all, under which user do you start the process? Does that user account have enough rights?? What if you develop a windows application and you call the functions within your service. Do you have the same problem there??
Do you try to use a GUI, this is not allowed in Windows Services. Once again, I know too many causes.
I experienced the best way to develop a service is to create a Class Library project which contains all required functionality. Create a win application which calls all your functions in order to test them. Then once all code is tested and all errors are caught, you create a windows service which calls all functions.
While testing, use the same user account as your service does, and DON'T use a GUI within your Class Library.
- - - --[ i love it when a plan comes together ]-- - - -
|
|
|
|
|
If you would like an example of code that implements a service which does work, download the source code for my FileBackup program from Sourceforge: filebackup.sourceforge.net.
It runs a service called AutoBackupMonitor as user "LocalSystem".
Incidentally, you may find more info on what the problem is with the Service app you have written by running: sc query <servicename>
Also check the Event logs under Application.
|
|
|
|
|
Please help: Being new to C# i dont know how to add/update data to database using XML Transform.........i tried to do so but eventually failed.........if someone is having sample code that will be a great help
|
|
|
|
|
How to use C# to create a Access file (A.mdb) with one table (B) of only one field (C) , then delete it? thanks !
|
|
|
|
|
This is VB.NET, but the translation is minimal.
http://www.codeguru.com/vb/gen/vb_database/microsoftaccess/article.php/c5149/
|
|
|
|
|
hi friends.........
can anybody help me
how to create custom controls
soori
|
|
|
|
|
by adding user control to ur project
and then u can design that user control according to ur need
and can use it on other forms in ur project.
rahul
|
|
|
|
|
m asking, wht is the procedure
i will be happy if u give some tutorials
thanks in advance
soori
|
|
|
|
|
right click on the project under the solution explorer of visual studio
u get pop up menu form that select add option then
under add option there is add new item option click that option
u will get a add new item dialog box in which u can find
template list box under that list there is user control item
select user control item and click open button of add new item dialog box
the user control will be added in ur project then from solution explorer of VStudio select that user control and design it as u design the windows form
after designing u can see that user control on the toolbox under my user control heading select that user control and drag it on the windows form on which u want to use it.
rahul
|
|
|
|
|
There is a distinct difference between Custom Controls and User Controls.
|
|
|
|
|
i think u can cutomize existing controls by designing ur self and adding the cutomized functionality to it through user control in same project with out adding additional componet to tool bar.
rahul
|
|
|
|
|
You should do a search on Google. There are plenty of links and tutorials for Custom controls.
|
|
|
|
|
Is it possible to put a System.Drawing.Bitmap object in the body of an email? I don't want to save the Bitmap as a file to send as an attachment.
For example, if I create a new bitmap:
Bitmap bmp = new Bitmap(320, 240);<br />
Is it possible to send this Bitmap in an email message without saving this Bitmap first?
Thanks,
Ashish
|
|
|
|
|
You don't have to save it to a file to get the data. Create a MemoryStream to save it to, then you can get the data from the MemoryStream as a byte array.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks Guffa! I never thought of that.
|
|
|
|
|
customization of save dialog box how to do it.
|
|
|
|
|
Could you be more obtuse with your question?
What have you done so far?
|
|
|
|
|
Wht actually do u want to do?
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
Hi all,
I want to learn how to create dynamic crystal reports in C#.NET. that is, when I pass parameter values through the application interface, they should be the criteria for the crystal report. How do you do this. Can anyone give me any online tutorials I can refer to.
thanks for any reply...
|
|
|
|
|
|
By dynamic, do you mean a report that varies in parameters, or run a report based on parameters?
|
|
|
|
|
Hiya!
It's quite easy to expose an interface of a .NET class to the COM world and to use it (via the COM callable wrapper (CCW), tlbexp.exe etc..). All examples for the unmanaged client, I found so far, using the ::CoCreateInstance or similar, which creates always a new .NET object.
It there a way to register my active .NET class as running object in the ROT and using ::GetActiveObject from my unmanaged code ?
The problem is the .NET implementation has no true access to the CCW..
COM has the concept of "Get-Existing-COM-object" object or "singleton COM".. where's this gone in the .NET interop ??
Thanks!
|
|
|
|
|
Hi y'all .. I hope this is an interesting one ...
Within an executing method, I can call MethodBase.GetCurrentMethod() and
retrieve info about the method that's currently running, including parameter
names & data types.
Is there a way to get the parameter v a l u e s as well ??? ( I know ...
this is indeed weird, but ... )
Thanks,
Mihai
|
|
|
|
|
aren't you in the method-call anyway ? you've got the value of the parameters already..
|
|
|
|