service stopped after reboot

I developed C# application using Mono Develop and deployed as mono-service on Linux Ubuntu 14.04. There are few problems which I don't understand: I noticed that mono-service application stop running after system is rebooted and lock file not exists. Also I noticed when I disconnect power of computer mono-service application stop running. Beside that, sometimes lock file exists even if

服务在重启后停止

我使用Mono Develop开发了C#应用程序,并在Linux Ubuntu 14.04上作为单一服务部署。 有几个我不明白的问题: 我注意到系统重启后单声道服务应用程序停止运行,并且锁定文件不存在。 另外我注意到,当我断开计算机单服务应用程序停止运行的权力。 除此之外,即使单一服务应用程序停止,锁定文件也会存在。 当我从文件中读取PID并尝试执行命令“KILL pid”时,它说:“pid不是这样的服务”! 如果单服务应用程序停止,我注意

Cannot run mono

I've written a service in C#. It runs fine on Windows as a service. And I can also get it to run once on Raspberry pi using the command: mono-service MyService.exe However, I would like to control the service - ie run it as a daemon. Currently the only way I know how to stop the service is to use the 'ps' command to get the mono process id number and then it using 'kill -9

无法运行单声道

我用C#编写了一个服务。 它作为一项服务在Windows上运行良好。 我也可以使用以下命令在Raspberry pi上运行一次: mono-service MyService.exe 但是,我想控制服务 - 即将其作为守护进程运行。 目前,我知道如何停止服务的唯一方法是使用'ps'命令获取单声道进程ID号,然后使用'kill -9'来终止进程。 但是这样做有不幸的后果,我不能再次启动服务? 而且,到目前为止,我设法让它重新开始的唯一方法是

How to kill Mono program properly

I'm currently working on a cross-platform app written in C#. I have a huge problem with testing and debugging it under Linux/Mono. When my application hangs due to an error, I have to kill the process (either using stop button in MonoDevelop debugger or using kill(all) command). The problem is, that after killing I cannot start the application again. When restarted from console, it waits

如何正确杀死Mono程序

我目前正在开发用C#编写的跨平台应用程序。 在Linux / Mono下测试和调试时遇到了很大的问题。 当我的应用程序由于错误而挂起时,我必须终止进程(使用MonoDevelop调试器中的停止按钮或使用kill(all)命令)。 问题是,杀死后我无法再次启动应用程序。 当从控制台重新启动时,它会等待一两秒钟并退出,不显示任何输出。 当从MonoDevelop开始时,调试器加载一些程序集,然后该进程退出而没有错误。 流程表中似乎没有与Mono

Windows like services development in LINUX using MONO?

I just moved from .net development to LINUX MONO development... and i don have much experience with linux dev earlier.. I have a requirement to create a background service (like windows services) in mono c#.. is it possible.. And is it possible to access the LINUX native APIs from mono c#. (like winAPI calls from win c#).. Mono ships with a Windows Service compatible system called mono-ser

Windows使用MONO的LINUX服务开发?

我刚刚从.net开发移植到LINUX MONO开发中...并且我以前没有太多关于linux dev的经验.. 我有一个需要创建一个后台服务(如Windows服务)在单声道C#..是否有可能.. 是否有可能从mono c#访问LINUX本地API。 (比如来自win c#的winAPI调用)。 Mono附带称为单声道服务的Windows服务兼容系统。 用于服务的Unix字是守护进程。 普通守护进程可以在/etc/init.d/中找到,并且通过从/etc/rc.*目录进行符号链接安装到它们应该

C# service as a daemon in debian with mono

I can't seem to find a way to get a C# service run as a "service" in debian. What Am I doing wrong? I followed this post from msdn to create a sample windows service : http://msdn.microsoft.com/en-us/library/zt39148a(v=vs.80).aspx I can run the service at my windows machine, Start and stop the service and see that it writes to MyNewLog. Then I copy it (.exe file) to my debian

C#服务作为Debian中使用mono的守护进程

我似乎无法找到一种方式让C#服务在debian中作为“服务”运行。 我究竟做错了什么? 我从msdn跟随这篇文章创建了一个示例窗口服务:http://msdn.microsoft.com/en-us/library/zt39148a(v=vs.80).aspx 我可以在我的Windows机器上运行该服务,启动并停止服务并查看它写入MyNewLog。 然后我将它(.exe文件)复制到我的debian机器上,并尝试使用(以root身份)单声道服务MyNewService.exe 系统日志告诉我,服务已经开始!

Need Responsive Audio Player for all Mobile (Android, iPhone)

I am developing one responsive mobile website, in that We have the functionality to run the audio file. My need it, I want the source/name of the music player that will run on all the browsers in Android, browser of iPad and mobile browsers like Firefox, Chrome, Safari, Opera. I have used html5media: <audio preload="auto" controls autoplay crossorigin="anonymous"> <source src='AB

需要所有移动设备(Android,iPhone)响应式音频播放器

我正在开发一个响应式移动网站,我们有运行音频文件的功能。 我需要它,我希望音乐播放器的source/name可以在Android中的所有浏览器,iPad的浏览器以及Firefox,Chrome,Safari,Opera等移动浏览器上运行。 我已经使用html5media: <audio preload="auto" controls autoplay crossorigin="anonymous"> <source src='ABC/<%# DataBinder.Eval(Container.DataItem, "abc") %>'> </audio> 但它不

NASM Guessing Number Game Gone Wrong

I have decided to create a simple guessing number game that uses Linux system calls, and some C functions to provide a more simpler interface. I seem to get a segmentation fault when I convert the int to string and print the correct answeron the screen. Here is the output: Enter A Number One Through Ten:" : 3 Response did not match! The Answer Is:Segmentation fault Here is the C code: // p

NASM猜测数字游戏错了

我决定创建一个使用Linux系统调用的简单猜数字游戏,以及一些C函数来提供更简单的接口。 当我将int转换为字符串并在屏幕上打印正确答案时,我似乎遇到了分段错误。 这是输出: Enter A Number One Through Ten:" : 3 Response did not match! The Answer Is:Segmentation fault 这里是C代码: // print.c #include "/usr/include/stdio.h" #include "/usr/include/string.h" #include "/usr/include/stdlib.h" #include "

Moq and SqlConnection?

I'm writing unit tests for one of our products and have been used Moq to successfully mock connections to Entity Framework. However, I've come across the following method: public static productValue findValues(string productName, string dbConnectionString) { try { SqlConnection conn = new SqlConnection(dbConnectionString); conn.Open(); //Do stuff } }

Moq和SqlConnection?

我正在为我们的一个产品编写单元测试,并且已经使用Moq成功地模拟了到Entity Framework的连接。 但是,我遇到了以下方法: public static productValue findValues(string productName, string dbConnectionString) { try { SqlConnection conn = new SqlConnection(dbConnectionString); conn.Open(); //Do stuff } } 它使用传递的连接字符串在该方法内访问我们的数据库。 是否可以使

Error when trying to connect a web service with a database

I get this error(s): error CS1502: The best overloaded method match for 'System.Data.SqlClient.SqlConnection.SqlConnection(string, System.Data.SqlClient.SqlCredential)' has some invalid arguments error CS1503: Argument 2 : cannot convert from 'System.Data.SqlClient.SqlConnection' to 'System.Web.WebPages.HelperResult' This is my code: public string NumeroFactura(stri

尝试将Web服务连接到数据库时出错

我收到这个错误(s): 错误CS1502:'System.Data.SqlClient.SqlConnection.SqlConnection(string,System.Data.SqlClient.SqlCredential)'的最佳重载方法匹配'有一些无效参数 错误CS1503:参数2:无法从'System.Data.SqlClient.SqlConnection'转换为'System.Web.WebPages.HelperResult' 这是我的代码: public string NumeroFactura(string NoDeFactura) { string DtsConnection =

The best overloaded method match for … has some invalid arguments C#

public static void masodmegold(double a,double b,double c) { double x0, x1, x2; double gyokalatt = b * b - 4 * a * c; if (gyokalatt > 0) { x1 = ( -b + Math.Sqrt(gyokalatt)) / (2 * a); x2 = ( -b - Math.Sqrt(gyokalatt)) / (2 * a); Console.WriteLine("két gyök: ", x1, x2); } else if (gyokalatt == 0) { x0 = ( -b / (2 * a));

最好的重载方法匹配...有一些无效参数C#

public static void masodmegold(double a,double b,double c) { double x0, x1, x2; double gyokalatt = b * b - 4 * a * c; if (gyokalatt > 0) { x1 = ( -b + Math.Sqrt(gyokalatt)) / (2 * a); x2 = ( -b - Math.Sqrt(gyokalatt)) / (2 * a); Console.WriteLine("két gyök: ", x1, x2); } else if (gyokalatt == 0) { x0 = ( -b / (2 * a));