본문 바로가기

Server Story..../c#

c# 소켓통신 예제. / Server Socket // NameSpace 선언 using System; using System.Net; using System.Net.Sockets; using System.Text; namespace ServerSideSocket { class ServerClass { public static Socket Server , Client; public static byte[] getByte = new byte[1024]; public static byte[] setByte = new byte[1024]; public const int sPort = 5000; [STAThread] static void Main(string[] args) { string stringbyte = null; IPAdd.. 더보기
windows command iis ftp 명령어, 서버 컨트롤 작업중 ftp 의 로그파일 설정을 바꿔야 할일이 생겼다, 음, 물론 c#으로 짜지만 dos 의 명령어를 콜해서 사용하기로 했고 해서 아래와 같은 명령어를 찾았다, 이건 로그파일 의 저장 경로 변경, %windir%\system32\inetsrv\appcmd set config -section:system.applicationHost/sites -siteDefaults.ftpServer.logFile.directory:"%MOVETO%inetpub\logs\logfiles" 이건 로그파일 을 저장하는 방식 변경, %Windir%\System32\inetsrv\appcmd.exe set config -section:system.applicationHost/sites -siteDefaults.ft.. 더보기
c# windows Service 등록 방법 일단 아래 블로그 참조.. 자세하게 나와 있진 않으나, 그나마 참고할만하.ㅁ http://angeleyes.tistory.com/141 더보기
c# app.config 파일에 저장 및 읽기 App.config 읽고 쓰기 configuration file에 키로 값을 설정해 놓고 필요할 때마다 불러서 쓰면 *.exe.config 설정값만 변경함으로써 프로그램을 좀 더 쉽게 관리할 수 있다. 예전에 COM port 통신 프로그램을 만들면서 포트와 관련된 설정값들을 Configuration 파일을 통해 관리함으로써 따로 디버그 필요없이 *.exe.config 파일만 변경해 사용했다. app.config 파일을 추가하고 아래의 코드와 같이 요소에 요소를 집어넣은 후 메인 소스 코드에서 간단하게 불러오거나 (AppSettingsReader) 읽어오고 쓰는 방법(Configuration)을 알아보자 *.exe.config 파일 *.cs 파일 using System; using System.Config.. 더보기