To programmatically configure NLog

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using NLog; using NLog.Config; using NLog.Targets; namespace NLogger {     class Program     {         static void Main(string[] args)         {             var config = new LoggingConfiguration();             var consoleTarget = new ColoredConsoleTarget("Console");             var fileTarget1 = new FileTarget("File1");             var fileTarget2 = new FileTarget("File2");              config.AddTarget(consoleTarget);             config.AddTarget(fileTarget1);             config.AddTarget(fileTarget2);             consoleTarget.Layout = @"${date:fo...

SQL 서버의 프로세스ID와 OS의 프로세스ID 맵핑

select hostname, hostprocess from master..sysprocesses where  spid = 68 select s.host_name, s.host_process_id, t.os_thread_id, s.session_id from sys.dm_exec_sessions s join sys.dm_exec_requests er on s.session_id = er.session_id join sys.dm_os_workers w on er.task_address = w.task_address join sys.dm_os_threads t on w.thread_address = t.thread_address where s.session_id = 68;

To use IIS as redmine proxy

이미지
You should reboot pc after installing URLRewrite. Origin

Tips about .net XmlSerialization with derived types

If types are scattered over assemblies, impose same namespace with XmlRootAttribute If derived types are, supply XmlSerializer with ExtraTypes information.

From DataTable to POCO via AutoMapper

http://stackoverflow.com/questions/16222313/how-to-use-automapper-to-map-a-datarow-to-an-object-in-a-wcf-service public static Customer GetSingle(DataTable dt) { if (dt.Rows.Count > 0) return null; List<Customer> c = AutoMapper.Mapper.DynamicMap<IDataReader, List<Customer>>(dt.CreateDataReader()); return c[0]; }

Check Oracle's collation

SELECT * from NLS_DATABASE_PARAMETERS WHERE parameter IN ( 'NLS_LANGUAGE', 'NLS_TERRITORY', 'NLS_CHARACTERSET', 'NLS_SORT', 'NLS_LANG');

Setting Account in asp.net and IIS

http://www.iis.net/learn/manage/configuring-security/application-pool-identities