Posts

Showing posts from August, 2018

IIS Block IP Setting

Image
We have two Web Server one for internal another for external. Now we consider let two into one. The main site will be opened a limited specific IP range, but some of the other sites will be opened to the public. How to 1.Add Features- IP and Domain Restriction After installed, It will show the icon in the root or subsites. 2.Setting IIS Root access from Allow to Deny. 3.IIS Root against specific IP range to open.e.g.The mask of the example as 255.255.255.0 it means from192.168.2.0~255 can be accessed. 4.Opening to the public by specific sites. Due to IIS Root has setting the deny. All of the sites will inherit this setting. After subsite modify its settings then it will base on a subsite. Therefore, it can be satisfied our request the deny is default but some allow. All of the settings are stored in the IIS config file. %windir%\System32\inetsrv\config\applicationHost.config Above-mentioned, ...

Jenkins- PowerShell include global config

Image
We have a PowerShell-script that will be referenced in many jobs at Jenkins.e.g. Retrieving a DataTable from the database. It will hard to maintain if this script in individual jobs. For this issue, I found a plugin can solve it How to setup 1.Install plugin-Managed Scripts 2.Jenkins Management,Enter the link of Managed files. 3.Add a new Config Name:For identification。 Content:Execute Script Way to use 1.Including the config which we just add it before.,Target:Output folder 2.Executing Power Shell Import-Module the config file in the output folder and call its function to get the count of records by SQL Reference Managed Script Plugin https://wiki.jenkins.io/display/JENKINS/Managed+Script+Plugin Power Shell Sql Query http://mattslay.com/sql-server-queries-using-powershell-lesson-1/