Thursday, January 31, 2019

NPM config proxy behind corporate wall

NPM config proxy behind corporate wall

Edit C:\Users\Username\.npmrc as below:

strict-ssl = false
ca = null


Reference
https://fak3r.com/2015/07/31/howto-use-npm-behind-a-corporate-proxy/

Wednesday, January 2, 2019

Windows Docker Issue "Deny write access to fixed drive not protected by Bitlocker" con Win10 machine: Solved


Anyone facing this annoying issue in Win10 machine while running Windows Docker in Windows container can be solved by following the below steps:



One needs Admin access though.

Registry Settings
·         [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Policies\Microsoft\FVE]
"FDVDenyWriteAccess"=dword:00000000

Group Edit Policy
·         [Computer Configuration\Administrative Templates\Windows Components\BitLocker Drive Encryption\Fixed Data Drives]
“Deny write access to fixed drives not protected by BitLocker”=Disabled


This perhaps has been fixed in Win 10 17074 Build or higher.

Monday, December 3, 2018

Run WebServices and Windows services on IIS Express using command prompt or batch file

To run web and windows services in IIS Express through command prompt or batch file, we can create a batch file with the following changes:

cd "C:\Program Files (x86)\IIS Express"
start iisexpress /config:"path to your project source code repository\.vs\config\applicationhost.config" /site:WebSiteName
In applicationhost.config make changes as below:

  • Look for something like below for the WebSiteName above

  <sites>
            <site name="WebSite1" id="1" serverAutoStart="true">

  • Update physicalPath to correct path:

physicalPath="VirtualDirectory of WebSite" /> 

  • or copy all the bin(assembly) files as seen below:
    bin=> has all dll's of the web service
    Web.config should detail the hosting details of all services.




Other Windows services can be started as below:

  1. Create a shortcut to the windows service with command line arguments if any.
  2. In batch file add this line:
  3. start "Service title" /b "Path of shortcut to windowsservice.exe shortcut"



Sunday, November 25, 2018

Visuals Studio - update nuget client

Navigate to your project repository in Dev Command Prompt. 
cd "repository path\.nuget" 
Run this command:
nuget update -self 

Wednesday, October 17, 2018

How to make SlowCheetah work with class libraries and services, apart from executables

Add a App.Base.Config which is the base for all configs and the below lines would ensure on build the specific environment gets copied to the App.config.

Just add the below lines to end of .csProj file where you need SlowCheetah support:

<Import Project="$(SlowCheetahTargets)" Condition="Exists('$(SlowCheetahTargets)')" Label="SlowCheetah" />
  <Import Project="..\packages\Microsoft.VisualStudio.SlowCheetah.3.0.61\build\Microsoft.VisualStudio.SlowCheetah.targets" Condition="Exists('..\packages\Microsoft.VisualStudio.SlowCheetah.3.0.61\build\Microsoft.VisualStudio.SlowCheetah.targets')" />
  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\WebApplications\Microsoft.WebApplication.targets" />
  <Target Name="BeforeBuild">
    <TransformXml Source="App.Base.config" Transform="App.$(Configuration).config" Destination="App.config" />
  </Target>

Wednesday, October 10, 2018

Git: Add new files and directories using GitBash

Reference link: 
https://linuxprograms.wordpress.com/2012/01/30/git-add-new-files-directories/
Git: How to add new files and directories?

If you are working with Git and want to add a new file or directory, follow the following steps
Go to the directory where your file is located.
$ cd directory
$ git add filename
Now you must commit these changes (You can give necessary comments)
$ git commit -m "Adding a new file"
If you want to add a directory, Go to the directory where the directory you want to add is located.
$ cd directory
$ git add directoryname
Now you must commit these changes (You can give necessary comments)
$ git commit -m "Adding a new directory"
Note that the above step will also commit the subdirectories and files present in the directory.

Friday, September 14, 2018

All about port usage

 which port is being used by which application, which application uses which port and everything related to this can be found here:
https://dzone.com/articles/how-to-check-which-process-is-using-port-8080-or-a