Monthly Archives: April 2014

ASP.NET Parts of Absolute Path

// Gets the base url in the following format: 
// "http(s)://domain(:port)/AppPath"
HttpContext.Current.Request.Url.Scheme+"://"
+HttpContext.Current.Request.Url.Authority
+HttpContext.Current.Request.ApplicationPath;

Source

Ubuntu Change Boot Order for a Service

Use the update-rc.d command.

First remove the link fron the /etc/init.d directory to the rc.d directories

sudo update-rc.d -f my_old_script remove

Then change the boot order. The following updates the scripts boot order to 98.

sudo update-rc.d my_script defaults 98

This command can also be used to remove or add a service during boot.
Source