• 카테고리
    • 전체 글

    • 카테고리1
    • 카테고리2
    • 카테고리3
    • 카테고리4
  • 태그
  • 방명록

'기술자료'에 해당되는 글 351건

  • 2008.10.22 Assembly 등록 중 접근 권한 없다고 하거나 목록 화면이 전혀 안나오는경우
  • 2008.10.17 자바 스크립트 클래스와 인스턴스 만들기 1
  • 2008.10.13 커스터마이징의 기본
  • 2008.10.07 믿지마라. "절대"; "원래" 라는 것은 없다.
  • 2008.10.06 VS.net 에서 참조추가 Assembly 목록에 자신의 DLL을 보이게 하기.
  • 2008.09.18 ASP.NET Performance Tips - IIS 최적화.
  • 2008.09.18 IE 7.0 동시에 많은 수의 파일 다운로드 받기. 속도 증가 효과
  • 2008.07.10 협업 좀 하자 - WSS 3.0 - 팀 사이트 공지사항 쓰기 2

Assembly 등록 중 접근 권한 없다고 하거나 목록 화면이 전혀 안나오는경우

기술자료/.NET 2008. 10. 22. 11:14

쓰다보니 제목이 길어졌다.
간혹 .NET 프로그래밍 하다보면, C:\Windows\Assembly 폴더를 자주 사용한다. 실행 창에서 assembly라고 입력하면 나오는 목록이 있는데, 이 목록을 이용해 .NET Assembly를 등록하거나 제거할 때 유용하게 쓰고, 현재 Assesmbly 목록을 체크해볼 때도 좋다.

그런데, 아주 간혹 이 창의 내용이 안뜨고, Gacutil 을 사용해 등록하려고 하면, 해당 파일에 대한 접근 권한이 없다는 오류가 종종 뜬다. Gacutil 이야 쓰는 사람만 쓰니 안되도 그만이겠지만, Assembly 창이 안뜨면 닷넷 초급, 중급이고 뭐고 상당히 당혹 스럽게 만든다.

간혹 이게 안되면 재부팅을 하거나, 아니면 운영체제를 아예 다시 깔곤 한다.

그럴때... 한번 체크해야 할 부분이 있다.

Start(시작) -> Control Pannel(제어판) ->Administrative Tools(관리도구)
  -> Services(서비스)

에 들어간다. ( 즉, 관리도구의 서비스 항목에 들어간다. )

그리고 아래의 항목이 활성화 되어 있는지 확인한다.

Indexing Service(인덱스 서비스)

만일 활성화 되어 있으면 당장 서비스를 Stop(중지) 시키고 다시는 자동으로 실행되지 못하게 Disable(비활성화)로 만들어 버린다.
원인이야 다양하고 많겠지만, 최소한 나같은 경우에는 저 Index 서비스가 동작하면서 내 Assembly들을 찝적 거리는 것 같다. 그래서 안되는 지도.....

일단, 지금 그 서비스 당장 저세상으로 보냈더니 정상적으로 동작한다.

728x90
블로그 이미지

하인도1

[하인드/하인도/인도짱 의 홈페이지] 저만의 공간입니다. 다양한 소재들을 나열하는 아주 단순 무식한 홈페이지 입니다. 다양한 문서 자료도 있겠지만, 저의 푸념들도 있답니다.

자바 스크립트 클래스와 인스턴스 만들기

기술자료/Web 2008. 10. 17. 17:47

예전 포스팅 중 [ Javascript, 객체화 하기 ] 라는 제목으로 올린 것이 있다.
그 때 쓴 포스팅 방법에 의거해서 예제 소스를 하나 구성하면 아래와 같다.

var objTest = {
      valDisplay : "",
      displayValue : function () {
            alert(this.valDisplay);
      }
     
      setValue : function(val) {
            this.valDisplay = val;
      } 
};

위의 예제를 실행해 보려면, 적절한 위치에서 아래와 같은 코드를 실행해 보면 된다.

objTest.setValue("Go Go Objected Javascript World");
objTest.displayValue();

그런데, 위와 같은 코드를 하게 되면 문제가 하나 있다. 예를 들어 objTest와 같은 로직을 부르는 곳이 많을 때다. 여기서 부르는 곳이 많다는 의미를 단순히 호출 자체의 횟수가 아니고, valDisplay를 독립적으로 운영해야 되는 경우를 말하는 것이다.
예를 들어 아래와 같은 코드를 보도록 하자.

objTest0.setValue("Go Go Objected Javascript World");
objTest0.displayValue();
objTest1.setValue("No, I Want to new display valueGo Go Objected Javascript World");
objTest1.displayValue();

위와 같은 코드를 실행하려면 아래 처럼, 처음 코드를 두개 넣어야 한다.

var objTest0 = {
      valDisplay : "",
      displayValue : function () {
            alert(this.valDisplay);
      }
     
      setValue : function(val) {
            this.valDisplay = val;
      } 
};
var objTest1 = {
      valDisplay : "",
      displayValue : function () {
            alert(this.valDisplay);
      }
     
      setValue : function(val) {
            this.valDisplay = val;
      } 
};

처음에는 단순하게 생각했었다. objTest0 = objTest; objTest1 = objTest; 이렇게 하면 되지 않을까 하고....그런데, 그렇게 쉽게 되지는 않았다. 두개의 변수는 하나의 objTest를 바라보고 있어, 결국 값은 valDisplay를 공유한 꼴이 되버린 것이다.

이에 구글링과 테스트를 반복하여 그 방법을 드디어 찾아냈다.
즉 첫번째 소스를 이렇게 변경하면 된다.

objTest = function() {
     this.valDisplay = "";
     this.displayValue = function () {
            alert(this.valDisplay);
      }     
      this.setValue = function(val) {
            this.valDisplay = val;
      } 
};

실제 실행하는 코드는 아래 처럼 짜면 된다.

var objTest0 = new objTest();
objTest0.setValue("Test0 objTest!!!!");
var objTest1 = new objTest();
objTest1.setValue("Test1 objTest!!!!");

new 라는 것을 사용해서 만들기 때문에, 새로운 인스턴스가 생성되며 별개의 메모리 상에서 동작하게 되는 것이다. 이렇게 될 수 있는 건 자바스크립트의 미묘한 마법때문이다. 예전에 이런 문제 발생한적이 있지 않은가?

var realVar = "Init Data";
reelVar = "Update value!!!";
alert(realVar);

결과는 의도한 "Update value!!!"는 안찍히고 "Init Data"가 찍힌다. 그 이유는? reelVar 라는 변수 명이 잘못된 것이다. 그러나 씹고 그냥 진행되고 도리어 reelVar라는 변수가 하나 더 생기고 그 안에 값이 들어가 버린다. 맨 아랫줄에 alert(reelVar) 찍어보면 그제서야 "Update value!!!" 가 찍힌다. 자바 스크립트에서는 새로운 형태의 변수가 발견되면 일단 변수를 멋대로 만든다.

이런 기묘한 자바스크립트의 성질을 이용해 구성하는 것이다.
코드를 하나씩 뜯어 보도록 하자.

objTest = function() {      
};
일단 함수를 만드는 것이다. 함수 객체 자체를 objTest에 담는 것이다. 즉 objTest는 변수이긴 하지만 실제로 들어 있는 것은 함수인 것이다.
     this.valDisplay = "";
여기서 부터가 진짜 마법이다. this를 처음 접하신 분들은 순간 당황하실 것이고, 객체 지향을 하시던 분이라면 저 this가 어딜 가르키는 this인지 도무지 판단이 안서실 것이다. 저 this란 바로 function() 즉 objTest를 가르키는 것이다. 즉 objTest 라는 이름의 함수 내에 valDisplay 라는 변수를 정의하는 것이다. 이처럼 정의하는 이유는 아래의 또다른 함수의 형태 때문이다. 
     this.displayValue = function () {
            alert(this.valDisplay);
      }

이번에는 displayValue 라는 형안에 또다른 함수를 때려 박는다. 이 함수는 objTest.displayValue로 호출 된다. 그런데 만일 아까 this.valDisplay = ""; 가 아닌 var valDisplay = "" 라고 쓴다면 저 함수 안에서는 밖에서 정의한 변수를 쓸 수 없다. (물론 무한한 자바스크립트 세계에서 "완전 불가"/"절대" 란 없으니 "완전 불가"/"절대" 라는 말을 뺐다.) 즉 내부에서 사용하기 위한 변수로 쓰기 위해서 this. 라는 것을 붙여서 처리한 것이다.

여튼, 지금 필자는 MOSS 2007에 WebPart라는 개념이 있는데, AJAX 스럽게 만들려다 보니, 같은 스크립트를 여러 다른 웹파트들이 쓰게 되었는데, 일단 저렇게 간신히 해결하는데 성공했다. 미묘한 감동 찌리리링 상태다.

728x90
블로그 이미지

하인도1

[하인드/하인도/인도짱 의 홈페이지] 저만의 공간입니다. 다양한 소재들을 나열하는 아주 단순 무식한 홈페이지 입니다. 다양한 문서 자료도 있겠지만, 저의 푸념들도 있답니다.

커스터마이징의 기본

기술자료/.NET 2008. 10. 13. 22:33

지금 MOSS 2007을 기반으로 다양한 인트라넷을 개발해왔다.

SK 에너지 부터 SKT 마케팅 부문, SKT 전체 인트라넷 시스템, FS 2.0 이라는 솔루션에 지금은 현대 중공업 인트라넷 시스템이다.
물론 초반에는 나도 별로 아는 것 없어 그냥 하라는대로 따라하는 경향이 좀 강했다. 모르니 할 수 없었다. 그런데, 계속 이런 저런 삽질과 헤딩을 해본 결과, 이런 결론을 얻었다.

패키지가 제공하는 기본기능은 그냥 둬라.
커스터마이징이 필요하면 복사 한뒤, 다른 이름으로 동작시켜라!

아마도 어디를 고쳐야되는지 모를 때, 해당 페이지 부분을 따라가보니, 이런 이런 마스터 파일을 기본으로 제공하는데 이걸 수정하니깐, 다 바뀌더라 .. 라는 생각으로 MOSS 2007 패키지에서 제공되는 기본 파일을 낼름 수정해 버리는 경우가 많다.
(지금 여기서는 application.master 파일을 막 수정하곤 한다.)

그런데 만일, 진짜 만일이다. MS의 WSS 또는 MOSS 2007 개발팀에서 application.master에 심각한 오류를 발견했다. 그래서 Service Pack 또는 Patch에서 이 application.master를 업데이트 했다면? 패치하고 나니 화면이 이상하게 변하거나, 안뜬다고 한다면.....
아무 생각없이 고치던 사람인 경우, 다분 이런 상황에 빠지면 즉시 서버 Rollback 들어간다. MS에서 고민고민해서 설정한 보안 문제나 버그는 딴 세상 이야기가 된다.

제발이지... 커스터마이징을 시작했다면, 기존 패키지 기본 제공 코드나 페이지, 이미지들은 그대로 두었으면 한다. 단지 그 하위에 새로운 폴더를 만들거나 다른 이름의 파일을 만들어 마음껏 커스터마이징을 하고, web.config 나 SPSite의 설정을 변경하여 그 변경된 사항이 기본이 되도록 하도록 했으면 한다.

오늘도.... 코드 작성 중 필요한 기능이 있어서 12 폴더 내용을 모두 복사하다가 반파 된 내 MOSS 2007 사이트 꼬라지에 어이가 없어 한마디 적는다.

728x90
블로그 이미지

하인도1

[하인드/하인도/인도짱 의 홈페이지] 저만의 공간입니다. 다양한 소재들을 나열하는 아주 단순 무식한 홈페이지 입니다. 다양한 문서 자료도 있겠지만, 저의 푸념들도 있답니다.

믿지마라. "절대"; "원래" 라는 것은 없다.

기술자료/.NET 2008. 10. 7. 13:23

그런데 최소한 내가 지금까지 같이 프로젝트를 뛴 프로그래머들 중 대부분은 자신의 코드를 혹은 저명한 누군가의 코드를 절대 신뢰하고, 그것을 기준 삼아 이야기를 펼친다. 그래서 분명 잘못되었음을 지적해도 절대 그렇지 않다고 한다. 때로는 원래 그렇다고 한다.이래서는 아무것도 개선할 수도 오류를 수정할 수 없게 만든다.

자신의 자식 새끼 같은 코드이고, 믿음직한 코드들일 수는 있겠지만, 최소한 컴퓨터에서 돌릴 때, 수많은 다양한 상황에 처하면 완전 배반의 모습을 여과없이 보여준다. - 프로그래머의 실수나 잘못된 로직을 스스로 고치면 이미 그건 프로그램이 아니고 생명체일 것이다. -
컴퓨터에서는 자신에게 장착된 H/W와 그 안에 구성된 프로그램대로 동작할 뿐이다. 신뢰하는 누군가가 만든 코드든, 제 잘난 맛에 사는 자기 자신이 짠 코드든, 분명 헛점이 있고, 오류가 있을 수 있다. 그래서 컴퓨터에서 오류가 발생하면 눈에 보이든 보이지 않던 의도하지 않은 오류가 분명 어딘가에 있다. 물론 내가 지적한 부분에서도 오류가 있을 수 있다. 혹은 무언가를 간과하고 짚은 부분도 있을 것이다.

그러나 그러기 앞서 같이 논의할 자세는 취해주어야 하지 않을까? 특히 다른 이의 코드를 멋대로 수정하기 앞서 자신의 코드 부분부터 확인해주는 센스도 같이 있으면 정말이지 좋겠다.

최소한 프로그래밍으로 밥벌이한다고 한다면, 조금은 완고한 자신의 생각을 접고 스스로를 의심하는 것이 좋지 않을까? 아니 같이 고민하는 열린 자세 정도는 필요하지 않을까....내 멋대로 생각해본다.

728x90
블로그 이미지

하인도1

[하인드/하인도/인도짱 의 홈페이지] 저만의 공간입니다. 다양한 소재들을 나열하는 아주 단순 무식한 홈페이지 입니다. 다양한 문서 자료도 있겠지만, 저의 푸념들도 있답니다.

VS.net 에서 참조추가 Assembly 목록에 자신의 DLL을 보이게 하기.

기술자료/OS 2008. 10. 6. 11:35

VS 2005나 VS 2008에서 참조를 추가 할 때, .NET 탭에 보면 각종 Assembly DLL 목록을 볼 수 있습니다. 여기에 보면 각종 MS 제품들에 딸린 Assembly들을 보는 대신, 우리가 만든 Assembly들은 보이지 않습니다. 물론 실제 Runtime시에는 GAC에서 직접 읽어오기 때문에, VS 2005나 VS 2008에서 보이지 않는다고 동작하지 않는 것은 아닙니다.

단지 개발하는데 있어 왠지 소외된 느낌? 왠지 개발 중 DLL 등록하는데 조금 뭔가 부족한 느낌? 그런 것 때문에 그런 것일 뿐입니다.
뭐 그래도 개발자에게 찜찜한 느낌은 개발 속도 향상에 나쁜(?) 영향을 주므로 이런 부분을 해결하는 방법을 알려드리도록 하겠습니다.

(원문 : http://support.microsoft.com/default.aspx?scid=kb;en-us;306149&Product=vsnet )

"참조 추가" 대화상자에서 어셈블리들을 표시하는 방법.

VS 2005, 2008 등에서 참조 추가 대화 상자가 떴을 때, .NET 탭을 열어보면 각종 Assembly들의 목록을 볼 수 있는데, 이 안에 직접 만든 DLL들의 목록도 뜨도록 하는 것입니다.

이 내용안에 추가하려면, 아래의 레지스트리 위치로 이동합니다.

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders]

그리고 새로운 키(폴더)를 만든 뒤, 그 안의 default 안에 등록할 Assembly들이 있는 경로를 넣어주십니다.

레지스트리 경로표현하면 아래와 같이 정리될 수 있습니다.

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\MyAssemblies]@="C:\\MyAssemblies"

등록 후 VS 를 다시 시작하시면 됩니다.

참고 : 위의 경로에서는 HKEY_CURRENT_USER 로 되어 있는데, 위의 경로로 하면 현재 로그인된 사용자만 적용됩니다. 모든 사용자 단위로 적용하시려면 HEKY_CURRENT_USER 부분을 HEKY_LOCAL_MACHINE 으로 변경하시면 됩니다.

728x90
블로그 이미지

하인도1

[하인드/하인도/인도짱 의 홈페이지] 저만의 공간입니다. 다양한 소재들을 나열하는 아주 단순 무식한 홈페이지 입니다. 다양한 문서 자료도 있겠지만, 저의 푸념들도 있답니다.

ASP.NET Performance Tips - IIS 최적화.

기술자료/Web 2008. 9. 18. 17:46

원본글 : http://weblogs.asp.net/haroonwaheed/archive/2008/06/30/ASP.NET-Performance-Tips.aspx

최고의 자료인듯.

ASP.NET Performance Tips

At times even after applying the best coding policies & practices you don’t get the desired level of performance you are hoping from your ASP.NET application. This is because there are number other very important factors that directly affect ASP.NET applications. To get the best out of any system requires detail architectural, design, coding and deployment considerations. The post lists few of some of the many performance tweaks that you can implement to boost up ASP.NET performance.

Remove Unused HTTP Modules

There are various HTTP modules in ASP.NET that intercept each request sent to the server. Session State is a very commonly used HTTP module used to load session data in context object. It’s referred with SessionStateModule name. HTTP modules kick in at each request and process them, therefore if you are not using the functionality provided by the module there is no use referring it as they would use additional CPU cycles. There is a list of HTTP Modules that your application automatically uses when it inherits config setting from web.config placed in $WindowsFolder\Microsoft.NET\Framework\$versiosn\CONFIG folder.
Below is a list of such entries:

<httpModules>
  <add name="OutputCache" type="System.Web.Caching.OutputCacheModule"/>
  <add name="Session" type="System.Web.SessionState.SessionStateModule"/>
  <add name="WindowsAuthentication" type="System.Web.Security.WindowsAuthenticationModule"/>
  <add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule"/>
  <add name="PassportAuthentication" type="System.Web.Security.PassportAuthenticationModule"/>
  <add name="RoleManager" type="System.Web.Security.RoleManagerModule"/>
  <add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule"/>
  <add name="FileAuthorization" type="System.Web.Security.FileAuthorizationModule"/>
  <add name="AnonymousIdentification" type="System.Web.Security.AnonymousIdentificationModule"/>
  <add name="Profile" type="System.Web.Profile.ProfileModule"/>
  <add name="ErrorHandlerModule" type="System.Web.Mobile.ErrorHandlerModule, System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
  <add name="ServiceModel" type="System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</httpModules>

There are bunch of HTTP modules listed here and I am quite positive not all of them are being used by your application. Removing unused HTTP module can definitely give slight performance boost as there would be less work to be performed. Suppose one doesn’t needs Windows authentication in application. To remove the inherited setting, under httpModules section in your web.config application add a remove element and specify name of the module that isn’t required.

Example:
      <httpModules>
            <remove name="WindowsAuthentication" />
      </httpModules>

<compilation debug=”true”/> Killer
As a developer I have seen numerous incidents were the application is deployed to production with <compilation debug=”true”/>. This is really a performance killer because:
  • Compilation of ASP.NET pages take longer.
  • Code execute slower as debug paths are enabled.
  • More memory is used by the application.
  • Scripts and images from WebResource.axd handler are not cached.

Always make sure that debug flag is set to false on production instances. You can override this by specifying following entry in machine.config for production instances:

      <configuration>
            <system.web>
                    <deployment retail=”true”/>
            </system.web>
      </configuration>

This will disable the <compilation debug=”true”/> for all applications deployed on the server.

Turn off Tracing

Do remember to turn off tracing before deploying application to production. Tracing adds additional overload to your application which is not required in production environment. To disable tracing use the following entries:

      <configuration>
            <system.web>
                    <trace enabled="false" />
            </system.web>
      </configuration>

Process Model Optimization
ASP.NET allows you to define many process level properties. You can get the detail of all these properties from http://msdn.microsoft.com/en-us/library/7w2sway1.aspx.  By default these are set to auto config. This means that ASP.NET automatically configures maxWorkerThreads, maxIoThreads, minFreeThreads, minLocalRequestFreeThreads and maxConnection to achieve optimal performance. You can tailor these by specifying your own value to achieve better performance. Some of the major settings are:
  • maxWorkerThreads. The default value is 20 per process and it determines the maximum number for request that ASP.NET can process in a given second. For application that are not CPU intensive and most of time wait on database request or any external processing this can increased to get better performance.
  • maxIOThreads. The default value is 20 per process and it determines the maximum number for I/O request that ASP.NET can process in a given second. If you have enough I/O resources you can increase this value for better results.
  • memoryLimit: The default is 60%. This is the max memory ASP.NET can use until worker process is refreshed. If you have a dedicated web server with no other services running you can increase this value for better results. 
  • connectionManagement: This is a property of System.Net configuration and specifies the maximum parallel connections that can be established to a server. If your web application extensively connects to other server you can increase this value.
Enable Buffering

Make sure that buffering is enabled unless you have a specific need to turn it off. By default its enabled. ASP.Net sends response to IIS in a 31 KB buffer which then passes that to the client. When buffering is disabled ASP.NET only sends few characters to IIS thus not utilizing this buffer and increasing the trips between IIS and the worker process. To enable it you can change the web.config or enable it on each page through @page directive

      <pages buffer="true">

      <%@ Page Buffer="true"%>

Caching
Caching in ASP.NET dramatically help in boosting application performance by reducing the load on the underlying server and serving cached content that doesn’t need to be recreated on each request. ASP.NET provides two types of caching:
  • Output Cache which stores dynamic pages and user controls. One each request code is not executed if a cached version of page or control is available 
  • Data Cache which allows application to save application objects, DataSet etc in server memory so they are not recreated on each request.

Use caching whenever possible to reduce the load on your web server and to increase response time.

Caching is a huge topic can not be discussed in detail in one post. For more details visit http://msdn.microsoft.com/en-us/library/xsbfdd8c.aspx.

Kernel Cache
Use Kernel Cache if you are using IIS 6 or above. When Output cache is used in ASP.NET the request still goes to ASP.NET that itself returns the cached content. However if Kernel Cache is enabled and the request is output cached by ASP.NET, IIS receives the cached content. If a request comes for that data again IIS will serve the cached content and end the response. This can save valuable CPU cycles as it minimizes work performed by ASP.NET.

Avoid using Response.Redirect
Instead of using Response.Redirect, use Server.Transfer where ever you can. Response.Redirect sends response to the client which then sends a new request to the server. Server.Transfer however performs the redirect on the server. Only use Response.Redirect when you want authentication and authorization to be performed on redirects or you want URL on client browser to be changed because Server.Transfer will not do this as it is a server side transfer.

Avoid using Server-Side Validation
Where ever you can use client-side validation instead of Server-Side validation. This will save you from additional reposts in cases in invalid input. If you don’t trust the browsers that they will be able to perform complex validations still use client-side validation and on repost check Page.IsValid to check if the input passed the given set of rules.

Avoid DataBinder.Eval Calls
Avoid calling DataBinder.Eval multiple times for example in case of grids, repeaters etc. Instead use Continer.DataBind. DataBinder.Eval uses reflection to evaluate the arguments and therefore can decrease performance if called numerous times.

Avoid Using Page.DataBind
Never call Page.DataBind until your really need to do so. Instead if you want to bind a specific control only bind that. Calling Page.DataBind will call DataBind for all the controls that support binding.

ViewState Optimization
Avoid using ViewState for storing huge objects or disable it when you don’t need it. ViewState is also used by server controls so that they can retain their state after postback. You can also save your objects that are marked Serializable in the ViewState. ASP.NET serializes all objects and controls in the ViewState and transmits them in a hidden field to the browser. If not managed properly ViewState can increase page size and therefore increase network traffic. Also precious CPU cycles are used for Serialization and De-Serialization of ViewState objects. Disable ViewState if:
  • Your pages don’t do postback.
  • You controls are not bound to a data source or they don’t handle server events like OnClick, OnSelectedIndexChanged etc or their properties are set on each postback
  • You recreate controls on every postback.

You can disable ViewState in both web.config or @Page directive

      <pages enableViewState="false">
      or
      <%@ Page EnableViewState="false"%>

Save or Compress ViewState
In case where ViewState in mandatory and the ViewState contains enough data that can cause Network congestion or increase download response time for the user try saving or compressing the ViewState. The Page class provide two very useful methods LoadPageStateFromPersistenceMedium() and SavePageStateToPersistenceMedium(object ViewState). You can override these methods to either compress the ViewState or even prevent it from going to the client by saving it in some persistent medium on the server.

Use HTTP Compression
If your page size is large enough to cause noticeable lag between subsequent request and response you can use HTTP compression. HTTP compression is a feature of IIS and what it means is that you can compress data sent to the client using compression techniques like GZIP and Deflate. On the other side the browser decompresses the data and shows the response to the client. Most of the modern browser are capable of handling compressed data. You will certainly get a huge performance boost if your page size is large.

For more details on HTTP compression visit http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/d52ff289-94d3-4085-bc4e-24eb4f312e0e.mspx?mfr=true

Data Paging / Sorting
When ever using data grid to show data with paging enabled one thing needs to understood that if your query returned let say 5000 record and you are only showing 100 records per page the rest of the 4900 record will be discarding and the same will apply when ever you will change the page or apply sorting. The additional 4900 rows will definitely take up memory and if your database is located on a different server which is most commonly the case you will also be transferring unnecessary data over the network. Make sure you are only returning the required results to the ASP.NET application by filtering out the data in your database query and apply custom paging. SQL Server 2005 and onwards provide valuable function for ranking data that can be used to accomplish this.

Connection Pooling
Creating a connection to a database is a resource intensive process and takes time. Connection pooling allows you to reuse these connections saving time and resources. When a new connection is requested the connection pool managers first searches in the connection pool and if doesn’t finds one, it creates a new one. There are various things that need to be done to use connection pooling effectively:
  • Avoid Connection Leakage. This means that you opened a connection but didn’t close it. If you don’t close the connection the connection pool manager will never put it in the pool for later reuse until the GC is called.
  • Use the same connection string. Connection pool manager searches for similar connection in the pool by the connection string.
  • Use SQL Servers and .NET CLR Data performance counters to monitor pooling.
  • Open connections as late as possible and close them as early as possible
  • Don’t share same connection between multiple function calls. Instead open a new connection and close it in each function.
  • Close transactions prior to closing the connection.
  • Keep at least one connection open to maintain the connection pool.

Avoid Multiple Database Access
Avoid accessing database multiple times for the same request. Analyze your code and see if you can reduce the number of trips to database because these trips reduce the number of request per second your application can serve. You can do this by returning multiple records in the same stored proc, combining multiple DB operations in same stored proc etc.

Use DataReader Instead of DataSet
Use DataReader objects instead of DataSet when ever you need to display data. DataReader is the most efficient means of data retrieval as they are read and forward only. DataSet are disconnected and in-memory therefore uses valuable server resources. Only use them when you need the same data more then once or want to do some processing on the data.

Last but certainly not the least follow the best coding, design and deployment patterns and practices. Here are few more usefull links that can be very helpful in performance optimization of you ASP.NET application
  • http://msdn.microsoft.com/en-us/library/ms973838.aspx
  • http://msdn.microsoft.com/en-us/library/ms998569.aspx
  • http://msdn.microsoft.com/en-us/magazine/cc500561.aspx
  • http://msdn.microsoft.com/en-us/library/ms998549.aspx
  • http://msdn.microsoft.com/en-us/library/ms973839.aspx
728x90
블로그 이미지

하인도1

[하인드/하인도/인도짱 의 홈페이지] 저만의 공간입니다. 다양한 소재들을 나열하는 아주 단순 무식한 홈페이지 입니다. 다양한 문서 자료도 있겠지만, 저의 푸념들도 있답니다.

IE 7.0 동시에 많은 수의 파일 다운로드 받기. 속도 증가 효과

기술자료/OS 2008. 9. 18. 15:52

참조글 : http://www.vistarewired.com/2007/04/16/increase-the-number-of-simultaneous-downloads-in-internet-explorer-7

FireFox 나 구글 크롬이 나오면서 확실히 입지가 서서히 줄어드는 IE이지만,
운영체제에 껴서 같이 나오는 웹브라우저라 여전한 강세를 유지하고 있는 것도 사실이다.
게다가, 우리나라는 X 같은 ActiveX를 줄창나게 쓰는 곳인지라, IE 빼고는 대안이 없는 것이 사실이기도 하다.

그런데, IE, 특히 버전 7.0 에서 조금이나마 속도를 증가 시킬 수 있는 방법이 있다.
그것은 바로 파일 다운로드 동시 갯수를 늘리는 것이다.
물론 W3C의 표준은 동시에 2개의 연결만 가능하도록 하는 것이긴 하지만,
이미지 파일 서버, 미디어 파일 서버와 같이 갈갈이 서버가 갈라진 서버의 경우에는
동시에 파일을 받는 갯수를 늘리면 효과를 볼 수 있다.

단 이 방법은 레지스트리를 수정하는 것이므로 레지스트리 수정 방법에 대해서 잘 모르는 사람은 시도하지 않았으면 한다. ( 혹여 수정 실패로 인해 컴퓨터 맛탱 가는 것은 절대 필자의 책임이 아님을 다시 밝힌다. )

1. 시작 -> 실행을 하여 실행 창을 띄운다.
2. 실행 창에서 regedit.exe 를 입력하여 레지스트리 수정도구를 실행한다.
3. 왼편 트리 창에 있는 트리 항목을 아래의 순서대로 따라 간다.
    HKEY_CURRENT_USER -> Software -> Microsoft -> Windows
        -> CurrentVersion -> Internet Settings
4. Internet Settings 항목이 선택된 상태에서 메뉴 상의 편집(E) -> 새로 만들기 -> DWORD 값을 선택한다.
5. 오른쪽의 새 값#1의 항목에서 살짝 클릭하면 이름을 변경할 수 있는데, 이름을 MaxConnectionsPer1_0Server 로 변경한다.
6. MaxConnectionsPer1_0Server 항목을 더블 클릭한 뒤, 10진수로 500을 넣는다.
7. 다시 4번 처럼 한다.
8. 5번 처럼 이름을 변경하는데 변경될 이름은 MaxConnectionsPerServer 이다.
9. MaxConnectionsPerServer 항목에서 더블 클릭해서 10진수로 500을 넣는다.

10진수로 넣는 값은 3~500까지 가능한데, 어차피 웹서버에서 주는 대로 받기 때문에, 500까지 다 쓸일은 없지만, 귀찮아서 그냥 500으로 넣는다. (실제로 대부분의 웹사이트는 2개만 준다. )

설정이 완료되면 레지스트리 편집기를 닫고 IE를 다시 시작하면 조금이나마 빠른 느낌을 받을 수 있다. ( 물론 인터넷이 원체 느리거나 웹서버가 삐리하면 변화가 그다지 없다. )

728x90
블로그 이미지

하인도1

[하인드/하인도/인도짱 의 홈페이지] 저만의 공간입니다. 다양한 소재들을 나열하는 아주 단순 무식한 홈페이지 입니다. 다양한 문서 자료도 있겠지만, 저의 푸념들도 있답니다.

협업 좀 하자 - WSS 3.0 - 팀 사이트 공지사항 쓰기

기술자료/.NET 2008. 7. 10. 10:43

기나 긴 설치, 기나긴 구성은 이제 슬슬 정리하고,  이제 본격적으로 팀 사이트를 한번 써 보자.

맨 처음 팀 사이트를 접속하게 되면 NTLM창이 뜨고 그 안에 아이디와 암호를 넣게 되어 있다. (물론 앞의 포스팅 맨 하단에 위치한 내용 처럼 "신뢰된 사이트"로 등록되어 있고 아이디와 암호를 저장한 상태이면 자동으로 로그인 할 것이다. ) 그러면 대망의 첫 화면이 뜬다.
WSS에 "팀 사이트"를 만들도록 요청하면 아래의 화면 정도의 정보를 표시해 준다.

맨 처음 할 일은 우리의 공지 사항을 쓰는일 부터 하도록 하겠다.

자 써보자 공지사항!

일단, 공지 사항 부터 써보자. 공지 사항은 기본적으로 맨처음 화면에서 나오기 때문에, 팀 원 모두가 제일 먼저 확인할 필요가 있는 사항들을 보여준다. 그래서 팀 내에서 발생되는 각종 공지 내역을 이곳에서 쓸 수 있다. 모두에게 알릴일이 있다면 여기를 이용하자.

공지사항 쓰기.

고작 공지사항 쓰는데, 왠 제목을 나누어 쓸까, 무지하게 어렵나? 라고 생각하시는 분들이 있겠지만, 팀 사이트 설정이 워낙 다양하고 개인별로 변경도 가능해서 어떤 분은 새 공지사항 추가가 안나온다고 투덜대시거나, 공지사항 이라는 항목 자체가 없다고 하신다. - 잘 확인해보시면 무의식 적으로 무언가 조작을 하셨는데, 그게 무엇인지 모르실때 종종 이런 사고가 터진다. - 다양한 케이스들에 대해서는 계속 언급 드리겠다.

일단, 전체 화면 상에서 이상한 것들을 자꾸 눌러대지 않으시면 최소한 아래와 같은 부분을 확인할 수 있다. 그 중 새 공지사항 추가를 클릭하자.

아니면 공지 사항이라는 제목 부분을 클릭한 뒤 나오는 전체 목록 화면에서 새로 만들기 버튼을 클릭해도 된다.

2가지 방법 중 어느 방법이든 아래와 같은 화면이 뜨는데, 제목과 본문을 넣으면된다. 혹시 제한성 공지인 경우 - XX일까지 한정 이벤트 등등 - 만료일자를 선택해서 넣어주면 된다.

다 기록한 뒤 확인 버튼을 클릭하면 최종적으로 공지 사항이 등록된다. 이제 첫화면으로 돌아와 보면 앞서 등록한 공지사항이 잘 보일 것이다.

공지 사항 편집 및 삭제

특정 공지사항을 편집 하거나 삭제하려면, 해당 항목의 문건 안으로 들어가야 한다 만일 첫 화면에서 표시가 된다면 해당 공지 사항의 제목을 클릭한다.

아니면 해당 공지 사항 목록으로 넘어간뒤("공지 사항"이라는 부분을 클릭해서), 편집하려는 목록에서 클릭하면 된다. 가끔 마우스가 흔들려서 이상한 메뉴가 떳으면 당황하지 말고, 항목 편집을 선택해서 들어와도 무방하다.
 
    한뒤~~~~
     

그러면 아래 그림과 같은 항목 전체 내용을 보여주는 화면이 있는데 윗쪽 버튼 중 항목 편집 버튼을 클릭한다.

그러면 최초 공지 사항을 쓰는 것과 같은 화면이 뜨는데, 원하는 항목을 고친 뒤 확인을 클릭하시면 된다.

삭제 방법은 이미 위에서 슬금 슬금 지나쳐왔다.

삭제할 항목 위에서 메뉴가 나오게 한뒤, 항목 삭제를 선택하면 삭제된다. 앞에서는 어쩌다가 메뉴가 나온다고 했지만, 사실 항목 위에서 제목 외의 영역을 클릭하면 된다.(아래 그림의 붉은 박스 영역)

혹은 해당 항목 안에 들어가 항목 삭제를 클릭하면 된다.

사고 치신 분들을 도와드리자.

윗부분 까지는 기본적인 공지사항에 대한 CRUD - Create(생성), Read(읽기), Update(수정/편집), Delete(삭제)를 하는 가장 기본적인 수행 방법들을 나열했다.

그런데 여기서 중요한 점은 위의 모든 항목들의 출발점이 바로 맨 첫화면에 공지사항이 있다는 사실이다. 종종 사고 치시는 분들 중에 이 공지 사항 부분이 없다고 외치시는 분이 계신다. 또, 공지사항 전체 목록을 볼 수 있는 링크가 눈에 팍 안 띈다. 이런 점들을 개선하는 방법에 대해서 설명한다.

첫 화면에 공지사항이 안보여요!!!

가끔 호기심 많은 분들중에서 많이 볼 수 있다.
( WSS 문제로 발생될 수 있는 경우는 극히 드물다. WSS 자체 문제라면, 대부분의 모든 사람들이 동일하게 문제가 발생한다. 이런 경우에는 WSS 설정 문제이므로, 앞의 포스트들을 확인하면서 점검해주도록 한다. ).
무언가를 수정한 뒤 그 사실을 잊어먹거나 손댄 사실에 대해 잡아때시는 중일 것이다. 그렇다고 복구가 불가능한 것은 아니다. 방법을 일러드리도록 하겠다.

일단 문제가 발생하신 분의 화면에 들어가도록 한다.

아래의 화면은 1팀 최고, 호기심 덩어리 마영수 주임(hoto95)의 작품이다. 휑하다 못해 아무것도 없다.

그에게 무슨 짓을 한 거냐고 물어봤더니, 아무짓도 안했다고 한다.
그럴리가 없는데 운을 떼도, 아니란다. 일단 사실 추궁은 나중의 일.
복구는 해줘야 겠다는 생각을 먼저하도록 하자.

일단 해당 사용자로 로그인한 상태에서 이름 부분을 클릭하여 메뉴를 띄우도록 한다.
메뉴 내용 중, 페이지 컨텐츠 원래대로를 선택하도록 한다.

그러면, 알림 메시지가 뜨는데 확인을 클릭하고 넘어가도록 한다.

최종적으로 아래와 같은 화면으로 복귀되었음을 알 수 있다.

이 문제가 발생되는 대부분의 원인은 호기심이다.
( 그러나 말리지는 말자. 이런 분들이 재미있는 기능을 찾아내거나, 해괴한 사용법들로 발생되는 다양한 케이스들을 추적하다 보면 나름대로 경험을 쌓을 수 있는 최고의 교재를 체험식 제공을 해주시는 분들이다. WSS에 대한 다양한 경험과 능력 획득이 목표로 생각하시는 분은,  이런 분 꼭 옆에 두셔야 한다.!!!! )

일단 필자 기준으로 위와 같은 문제를 접하게 되는 주요 원인은, 각 구성요소 오른쪽 끝에 삼각형이 있어 그 부분을 클릭하신 것이다. 신기하게도 메뉴가 뜨고 그 메뉴에서 닫기를 하니 사라져 버린 것이다.

공지 사항 목록을 모두 보는 메뉴를 하나 열자.

이 부분은 공지사항 뿐만 아니라, 유용한 팁이 될 수 있을지도 모르겠다.
지금까지 공지사항 목록은 첫 화면에 위치한 공지사항을 클릭해서 목록을 확인했다. 그러기 보다는 전체 공지사항 목록을 쉽게 따라 갈 수 있는 부분을 넣어주면 편할 수 있다.
첫화면에 위치한 왼쪽 목록에 넣는 것이다.

일단 관리자 계정으로 로그인하자.
그리고 난 뒤 공지사항의 URL 주소를 먼저 파악하도록 한다. 공지 사항 목록이 보이는 부분으로 들어가보면 주소 줄에 나온다(공지 사항 부분의 "공지 사항" 부분을 클릭하면 된다).

주소를 보면 http://사이트URL/Lists/Announcements/AllItems.aspx 라고 적혀 있을 것이다. 예제화면에는 http://wsstestsvr/Lists/Announcements/AllItems.aspx 이다.
여튼 이 주소를 적당한 위치에 복사 해 놓는다. - 메모장 이든, 포스트 잇이든...

그리고, 상단 위쪽에 있는 사이트 작업을 클릭 한 뒤, 메뉴를 띄우자. 메뉴 중 사이트 설정이 있는데 그 항목을 클릭해서 들어간다. (아마 이전 포스트에서 사용자 로그인 처리관계로 들어가 본 경험이 있을 것이다.)

수많은 항목 중, 디자인 묶음에 있는 빠른 실행 부분을 클릭하도록 한다.

그러면 트리스러운 무언가들이 쭉 나열되어 있다.

아마도 치밀한 기억력의 소유자나, 날카로운 관찰력을 가지신 분이시라면, 바로 이 부분이 모든 화면에 나온 왼쪽 메뉴 목록과 동일함을 알 수 있을 것이다. ( 혹시 모르셨어도, 한번 메인 페이지에 갔다가 다시 이곳과 비교해 보면 알 수 있다. ).
결론 부터 말하자면, 아까 복사한 주소 값을 여기에 추가하면 된다.

입력하는 방법은 아래와 같다.

  1. 상단에 위치한 새 제목을 클릭 한다.

  2. 그리고 그 다음에 나오는 부분에 아래와 같이 입력을 해주면 된다.

  3. 그러면 다음과 같이 그 결과물을 볼 수 있다.

  4. 꼼꼼한 당신. 나름 공지 사항인데, 어찌 맨 아래? 라고 할 수 있다. 이런 경우 바로 순서 변경 버튼을 클릭한다. - 새 제목 버튼  오른쪽에 위치 - 그리고 난 뒤 순서 배치 정하는 화면에서 숫자를 1로 바꾸어준다.

일단, 각종 상황에 따라 그 결과를 처리할 수 있도록 이것 저것을 제시해 보았다.
사실 단순히 공지사항만 쓴다면 아마도 포스팅 할 가치조차 없는 내용이지 않을까 싶다.  위의 내용이 마치 당연한 수순 처럼 보일지는 모르겠지만, 알게 모르게 WSS 내에 기능 몇가지를 꺼내서 보여드렸다. - 잘 모르시겠다면, 나중에 또 비슷한 일이 생기면 해보시면 알 수 있을 것이다. - 이후에 포스팅 되는 내용들도 기본 기능 사용 방법을 일러 드린 후 그 뒤에 추가적으로 어떻게 해야 되는지를 다시 천천히 일러드릴 예정이다.

P.S. 벌써 비축분이... 바닥을 -_-;;;;;

728x90
블로그 이미지

하인도1

[하인드/하인도/인도짱 의 홈페이지] 저만의 공간입니다. 다양한 소재들을 나열하는 아주 단순 무식한 홈페이지 입니다. 다양한 문서 자료도 있겠지만, 저의 푸념들도 있답니다.

  • «
  • 1
  • ···
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • ···
  • 44
  • »
250x250

블로그 내에 소스 코드 삽입 이사온 기념 스킨도... RSS 전문 기능 비활성화 관련. 스킨 바꾸어 보았습니다. 서버 파일 정리 좀 했습니다.

«   2025/05   »
일 월 화 수 목 금 토
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

개발환경 매뉴얼 Google Apps Engine twi2me 오류 Azure 친구 Buscuit 지름신 2010 협업 SharePoint WSS e-book windows 비스킷 me2photo Tutorial me2dayzm Visual Studio 좀 불만 인터파크 것 수 MOSS 2007 블로그 me2sms moss java

  • Total :
  • Today :
  • Yesterday :

Copyright © 2015-2025 Socialdev. All Rights Reserved.

Copyright © 2015-2025 Socialdev. All Rights Reserved.

티스토리툴바