Posts

Managing Windows Services - Delete/Add

 First things first, lets delete cause that's super easy and before I delete anything I make sure to create backups. What I'm looking to do is expand a system like topshelf where it can just manage it remotely for me but using devops can be tricky. //delete command sc.exe delete <service name> or Ps way Remove-Service -Name "TestService" Note: curious about the registry but its better to use sc.exe. Now for adding sc create asperacentral binPath= "C:\Program Files\Aspera\Enterprise Server\bin\Debug\asperacentral.exe" DisplayName= "Aspera Central" start= auto When it comes to publishing a service, it is a bit more difficult what I would like to have is something similar to "Oneclick publish" but that would require a visual studio plugin to add the feature and than service installed to capture the files to install. Well for now its a pipe dream...

Ubuntu Server: Cmd line Network Shared folder for Windows

Image
 Got tired of using filezila to do everything so this morning I set things up with Samba to allow me to share. Just a few notes along with this video that I think might be helpful for other devs. commands sudo apt-get install -y samba sudo ufw allow 139 sudo ufw allow 445 sudo service smbd status sudo vi /etc/samba/smb.conf sudo chmod 777 shared_folder/ [guest] # This share allows anonymous (guest) access # without authentication! path = /shared_folder read only = no guest ok = yes guest only = yes I used the folder path at the root and probably will later add a user for security but for now I have what I need to get running. Doesnt seem as fast as filezilla but thats not a big deal. 

Techstream & added Keyfob

Seems just trying to add a keyfob to a car isnt as easy as it should be. The driver seems to be limited to windows 7 and currently I am testing to see what I can do to just get it to work but warning for any and all links.  https://www.youtube.com/watch?v=kVOn1S0poaI Dont Follow these links for safety reasons blog.obdii365.com/2021/05/12/free-download-toyota-techstream-v16-00-020-v16-00-017/ blog.obdii365.com/2019/08/06/install-and-activate-mini-vci-toyota-techstream-v14-20-019/ drive.google.com/drive/folders/1R9QPJoamgii2p4pgJFsltwgYC9ZUhpd7 mp3download.to/9en/WWCcINGIZJk.html toyota-4runner.org/general-discussions/216392-down-anyone-have-techstream-mvci-driver-toyota-cable-2-0-1-a.html ft86club.com/forums/showthread.php

SQL Backup Database with Network folder

The time has come where I've been forced to work with SQL like a dba, and for once the pieces are falling in place.  https://stackoverflow.com/questions/3942207/how-can-i-backup-a-remote-sql-server-database-to-a-local-drive https://stackoverflow.com/questions/16491/restore-database-backup-over-the-network#:~:text=On%20the%20Server%20that%20you,bak%22 https://stackoverflow.com/questions/10204480/sql-server-the-backup-set-holds-a-backup-of-a-database-other-than-the-existing https://dba.stackexchange.com/questions/28082/restore-backup-fails-file-db-cannot-be-restored-to-mdf-use-with-mov Generating a script took too long and wasnt helpful for what I needed since I'd still need to move it onto the server. We're talking about 200gb and plus... and to make matters worse time is important. Since the backups are created nightly on the server and I just need to restore the backup on another server it seems kinda of a waste to not be able to use it. https://stackoverflow.com/questions

Mono GTK on Windows

 I'd like to use visual studio but visual code with mono.exe on the side is what I'm currently doing. I'm able to get WinForms to work however I'm running into difficult trying to run GTK on windows.  Unhelp Q/A - https://stackoverflow.com/questions/51132090/mono-compliling-gtk-on-windows its unhelp because I already have the complier working and referencing the package properly. Its just windows doesnt pick up GTK inorder to run it. https://stackoverflow.com/questions/51132090/mono-compliling-gtk-on-windows Possible Solution https://stackoverflow.com/questions/16417342/mono-gtk-hello-world-deploy-to-windows GTK Notes https://www.mono-project.com/docs/gui/gtksharp/beginners-guide/ mcs -r:"C:\Program Files\Mono\lib\gtk-sharp-2.0\gtk-sharp.dll" -r:"C:\Program Files\Mono\lib\gtk-sharp-2.0\glib-sharp.dll" -r:"C:\Program Files\Mono\lib\gtk-sharp-2.0\atk-sharp.dll" hello.cs mono hello.exe Unhandled Exception: System.IO.FileNotFoundException: Coul

What about throw ex? With Api Response

In my case I have a httpresponse that doesn't fail to make a response but fails to get the results which in turn doesnt map out to the model. This mapping is a soft rule, where something might map and if they don't the api says why. In that case its a 200 response code and I don't get an exception either.  https://stackoverflow.com/questions/2999298/difference-between-throw-and-throw-new-exception  public bool SubmitOrder(Order objOrder, ref int iID, ref OrderResponse objOrderResponse, ref string sRtnMsg) {             try {                 var contJson = JsonConvert.SerializeObject(objOrder);                 var jsFormatted = JToken.Parse(contJson).ToString(Formatting.Indented);                 Log.Trace("Submitting Order: With {0}", jsFormatted);                 var flagError = false;                 var error = "";                 var accessToken = GetToken();                 Client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(&

Windows & Service Development

 As a consultant I've been able to start developing application and services at the lower levels of the operating system. Which is pretty interesting compared to what I use to do. I find myself doing the same thing with my web development. WPF -  https://en.wikipedia.org/wiki/Windows_Presentation_Foundation#:~:text=Windows%20Presentation%20Foundation%20(WPF)%20is,NET%20Framework%203.0%20in%202006. Understanding the .NET family https://en.wikipedia.org/wiki/.NET_Framework https://docs.microsoft.com/en-us/windows/apps/desktop/choose-your-platform https://en.wikipedia.org/wiki/Universal_Windows_Platform_apps

Popular posts from this blog

Installing Windows on Acer chromebook 15 cb3-532

Entity Framework: ToListAynsc & WhereAsync

CSharp Cheatsheet