![]() If a service gets into this state, the service control manager is unable to remove the service as " InstallUtil.exe /u" was unable to uninstall the ‘broken’ service. As the service remained in a disabled state, I had to rename all tftpUtilSvc service names to be able to test one more time without having to reboot my PC. As I did not like to change too much of the original tftpUtil class, there may be strange looking constructs and possible duplicate internal values.ĭuring my debugging tests, the service did not start/stop correctly sometimes, due to errors in code. Inside the class, ServerSettings.cs, the values are saved/restored to the registry. I implemented a ServerSettings class and changed all direct references to the registry to this class. ![]() Here is my ugly " tftpUtilSvcSettings" application:Īlthough the tftpUtil code from sourceforge already contained code to write/read tftp settings to/from registry, it was not very clear and straight. Did not find any reference, why the service cannot access other root registry trees. ![]() Although the registry location does not look nice (I mean service parameters have to reside below HKLM, but who cares), I tried the HKEY_USER.Default location and the service was able to load the values from the registry. The service was unable to access Software\tftpUtilSvc. I started with using the registry, but that did not work first. Resend, iTimeout, LoggingMethodInfo, BlockedIPs, ServerIPAddr) ĪddLog( " CreateTFTPFromReg everything seems to be OK") ĪddLog( " CreateTFTPFromReg EXCEPTION:" + ex.Message) Īs I would like to control the service later and change settings, I needed a way to ‘communicate’ with the server. Resend, iTimeout, LoggingMethodInfo, BlockedIPs) Tftp = new TFTPServer(ServerUDPPort, Path, LoggingLevel,ĭisplayLevel, FileAccess, AllowOptions, RRQWRQStateCheck, LoggingMethodInfo = svcSettings.LoggingOptions ĪddLog( " CreateTFTPFromReg reading BlockedIPs") ĪddLog( " CreateTFTPFromReg starting new TFTPServer(.)") LoggingMethodInfo = svcSettings.LoggingMethod Resend = Convert.ToInt32(svcSettings.Resend) ĪddLog( " CreateTFTPFromReg reading LoggingMethodInfo") ![]() ITimeout = Convert.ToInt32(svcSettings.Timeout) ServerUDPPort = Convert.ToInt32(svcSettings.ServerUDPPort) (IPstring, out ServerIPAddr) ĪddLog( " CreateTFTPFromReg reading ServerUDPPort") String IPstring = svcSettings.ServerIPAddr RRQWRQStateCheck = svcSettings.RRQWRQStateCheck ĪddLog( " CreateTFTPFromReg reading IPstring") Looks like there's no no-thrill, single-user, GUI-based FTP server for Windows, so FTPdmin/sfk are the only options for a really simple FTP server.AddLog( " CreateTFTPFromReg reading path") ĭisplayLevel = svcSettings.SendEventLevel Small HTTP and Quick ‘n Easy FTP Server Lite have too many features (including having to create user accounts), and CrushFTP is Java-based.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |