Category Archives: Server

Convert.ToDateTime Regardless of Culture

Did you upgrade to Windows 10 recently and your MVC website now have an issue under the development phase after it? Then maybe you also experience the same issue that affected your code on IIS. That is becuase Convert.ToDateTime utilizes the machine’s Culture(It changes when you use Windows 10 even you are using the same Country set) to parse a Date time. So to use it regardless of the Culture use the code snippet below.

 

string s = “20.09.2015 10.16.12”;
string expextedFormat = “dd.MM.yyyy HH.mm.ss”;
DateTime d;
bool isValid = DateTime.TryParseExact(s, expextedFormat , CultureInfo.InvariantCulture, DateTimeStyles.None, out d);

 

Hope it helped you as it helped me.

GIT vs TFS vs SVN

Just like you I have wonder what are the difference between the three Source Code top kind Repositories that are available online. So I have decided to create this article to enlighten myself and others who are looking into the distinguishing difference of each so let get started.

GIT
Git is recently very popular with, you guess it right, github.com as it is offering an online free public source code repositories that everyone can use absolutely free. One of the best highlight of this kind of repository is that “Your CLONED repository is actually the repository that can cloned by others with the history along it”. Thats why when you are getting the source code you get it using the command GIT CLONE with the clone on the command.

TFS
We all know that its a Mirsoft product so most user of TFS are Micorosft entusiasth with Licenses at hand. One of the primary reason of choosing this repo server is that it is thighlt integrated with Microsoft product on Visual Studio and some Office Apps. It is also good to point that it is best to use if you are looking into a source control that is not easily unbinable from its source control. Unbindable that you may not easily remove the binding of the Source code from TFS, well at least that is from my experience.

SVN
Previously popular with most users as it used on Google’s Code website and has plenty of server choices that you can freely download and deploy on your on server absolutely free. It has the build in ability to Easily unbind your source code (EXPORT). Though the only downside is that the only source of truth is on the server unlike GIT which you may trigger your CLONED repo as a source of truth and might be a primary reason that some user move from SVN to GIT.

Well this are all based from my experience and some reading. But still don’t limit ourself on this items as there are also some reasons that is not indicated on this article that might be the triggering point of developers on choosing this kind of repository.

God Bless!

Thanks,
Thomie

Disable Copy and Paste on RDP

Hi,

I have given a task to research on the web on how to disable RDP’s Copy and Paste of files due to some security issues. The following Steps should be done with Administrator rights.

  1. Open GPEdit.msc on Windows by Pressing Window Key + R
  2. A Window named Local Group Policy Editor will be shown.
  3. Navigate to Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Device and Resource Redirection
    step a
  4. On the Extended Tab double click Do not allow clipboard redirection
  5. A Window named Do not allow clipboard redirection will be shown.
  6. Click Enabled and Click Apply
    step b
  7. Make sure that all users will Log Off and then Login to implement this new settings.
  8. Done

Source
God Bless!

Thanks,
Thomie

Binding SSL Cerificate to a Machine

Prequisites

  • SSL Certificate (For Testing this can be self-signed)
  • Administrator Rights
  • Command Prompt
  • IIS 7 or above

Instructions

  1. Open the Certificate details and find its ThumbPrint in IIS
  2. Identify the port and IP to which the certificate to be binded
  3. Open the Command Prompt with Administrator Rights
  4. Type in the following
    netsh http add sslcert ipport=<IPtoBind>:<PortToBind> appid={12345678-db90-4b66-8b01-88f7af2e36bf} certhash=<CertificateThumbPrint>
  5. Done
  6. To remove that binding just type the following
    netsh http delete sslcert ipport=<IPtoBinded>:<PortToBinded>