仓酷云

标题: ASP网页设计DCOM用的,参考www.microsoft.comtechne... [打印本页]

作者: 谁可相欹    时间: 2015-1-16 23:15
标题: ASP网页设计DCOM用的,参考www.microsoft.comtechne...
缺点:安全性不是太差了,还行,只要你充分利用系统自带的工具;唯一缺点就是执行效率慢,如何进行网站优化以后,效果会比较好。iis|参考Tip9:Out-of-ProcessExecutionTradesoffPerformanceforReliability
BothASPandMTS/COM+haveconfigurationoptionsthatallowyoutotradeoffreliabilityforperformance.Youshouldunderstandthesetrade-offswhenbuildinganddeployingyourapplication.

ASPOptions
ASPApplicationscanbeconfiguredtoruninoneofthreeways.WithIIS5.0,theterminology“isolationlevel?hasbeenintroducedtodescribetheseoptions.ThethreeisolationlevelvaluesareLow,Medium,andHigh:

LowIsolation.ThisissupportedinallversionsofIISandisthefastest.ItrunsASPinInetinfo.exe,whichistheprimaryIISprocess.IftheASPapplicationcrashes,sodoesIIS.(TorestartIISunderIIS4.0,WebmasterswouldmonitorthesiteusingtoolssuchasInetMon,andfireoffbatchfilestorestarttheserverifitfailed.IIS5.0introducesreliablerestart,whichautomaticallyrestartsafailedserver.)
MediumIsolation.IIS5.0introducesthisnewlevel,whichisreferredtoasout-of-process,sinceASPrunsoutsideoftheIISprocess.InMediumisolation,allASPapplicationsconfiguredtorunasMediumshareasingleprocessspace.Thisreducesthenumberofprocessesrequiredtorunmultipleout-of-processASPapplicationsononebox.MediumisthedefaultisolationlevelinIIS5.0.
HighIsolation.SupportedinIIS4.0andIIS5.0,Highisolationisalsoout-of-process.IfASPcrashes,theWebserverdoesn’t.TheASPapplicationisautomaticallyrestartedonthenextASPrequest.WithHighisolation,eachASPapplicationthatisconfiguredtorunasHighrunsinitsownprocessspace.ThisprotectsASPapplicationsfromeachother.ItsdrawbackisthatitrequiresaseparateprocessforeachASPapplication.Thiscanadduptoalotofoverheadwhendozensofapplicationsneedtobehostedononebox.
Whichoptionisthebest?InIIS4.0,therewasafairlysteepperformancepenaltyforrunningout-of-process.InIIS5.0,alotofworkwasdonetominimizethecostofrunningASPapplicationsout-of-process.Infact,inmosttests,ASPout-of-processapplicationsinIIS5.0runfasterthanin-processapplicationsinIIS4.0.Regardless,in-process(Lowisolationlevel)stillproducesthebestperformanceonbothplatforms.However,youwon’tseemuchbenefittotheLowisolationlevelifyouhavearelativelylowhitrateorlowmaximumthroughput.Therefore,youshouldnotfeeltheneedtoreachfortheLowisolationleveluntilyouneedhundredsorthousandsofpagespersecondperWebserver.Asalways,testwithmultipleconfigurationsanddeterminewhichtrade-offsyouarewillingtomake.

Note:WhenyourunASPapplicationsout-of-process(MediumorHighisolation),theyruninMTSonNT4andCOM+onWindows2000.Thatis,onNT4theyruninMtx.exe,andonWindows2000,theyruninDllHost.exe.YoucanseetheseprocessesrunninginTaskManager.YoucanalsoseehowIISconfiguresMTSPackagesorCOM+Applicationsforout-of-processASPapplications.

COMOptions
COMcomponentsalsohavethreeconfigurationoptions,thoughnotcompletelyanalogoustotheASPoptions.COMcomponentscanbe:”unconfigured,?configuredasLibraryApplications,orconfiguredasServerApplications.UnconfiguredmeansthatthecomponentisnotregisteredwithCOM+.Thecomponentwillruninthecaller’sprocessspace,thatis,theyare“in-process.?LibraryApplicationsarealsoin-process,butbenefitfromCOM+’sservices,includingsecurity,transactions,andcontextsupport.ServerApplicationsareconfiguredtorunintheirownprocessspace.

YoumayseeaslightbenefitofunconfiguredcomponentsoverLibraryApplications.You’relikelytoseealargeperformancebenefitofLibraryApplicationsoverServerApplications.ThisisbecauseLibraryApplicationsruninthesameprocessasASP,whereasServerApplicationsrunintheirownprocess.Inter-processcallsaremoreexpensivethanin-processcalls.Also,whenpassingdatasuchasrecordsetsbetweenprocesses,allofthedatamustbecopiedbetweenthetwoprocesses.

Pitfall!WhenusingCOMServerApplications,ifyoupassobjectsbetweenASPandCOM,makesurethattheobjectsimplement“marshal-by-value,?orMBV.ObjectsthatimplementMBVcopythemselvesfromoneprocesstoanother.Thisisbetterthanthealternative,inwhichtheobjectremainsinthecreator’sprocess,andtheotherprocesscallsrepeatedlyintothecreatingprocesstousetheobject.DisconnectedADOrecordsetswillmarshal-by-value;connectedrecordsetswon’t.TheScripting.DictionarydoesnotimplementMBVandshouldnotbepassedbetweenprocesses.Finally,amessagetoVBprogrammersoutthere:MBVisNOTachievedbypassingaparameterByVal.MBVisimplementedbytheoriginalcomponentauthor.

WhattoDo?
Ifwe</p>由于ASP提供的是一对多的服务,所以用户的一些特殊需求很难得到满足。
作者: 精灵巫婆    时间: 2015-1-18 07:55
弱类型造成潜在的出错可能:尽管弱数据类型的编程语言使用起来回方便一些,但相对于它所造成的出错几率是远远得不偿失的。
作者: 透明    时间: 2015-1-21 12:23
ASP的语言不仅仅只是命令格式差不多,而是包含在<%%>之内的命令完全就是VB语法。虽然ASP也是做为单独的一个技术来提出的,但他就是完全继承了VB所有的功能。
作者: 变相怪杰    时间: 2015-1-25 12:10
ASP也是这几种脚本语言中最简单易学的开发语言。但ASP也是这几种语言中唯一的一个不能很好支持跨平台的语言。  因为ASP脚本语言非常简单,因此其代码也简单易懂,结合HTML代码,可快速地完成网站的应用程序。
作者: 飘灵儿    时间: 2015-1-28 11:53
以上是语言本身的弱点,在功能方面ASP同样存在问题,第一是功能太弱,一些底层操作只能通过组件来完成,在这点上是远远比不上PHP/JSP,其次就是缺乏完善的纠错/调试功能,这点上ASP/PHP/JSP差不多。
作者: 金色的骷髅    时间: 2015-2-5 14:37
最近在学asp,不要问我为什么不直接学.net,因为公司网站是asp做的所以有这个需要,卖了本书asp入门到精通,对里面的六大内置对象老是记不住,还有很多属性和方法看的头晕。
作者: 简单生活    时间: 2015-2-12 06:53
跟学别的语言一样,先掌握变量,流程控制语句(就是ifwhileselect)等,函数/过程,数组
作者: 小魔女    时间: 2015-3-2 23:52
Session:这个存储跟客户端会话过程的数据,默认20分钟失效
作者: 再见西城    时间: 2015-3-11 07:38
不是很难但是英文要有一点基础网上的教程很少有系统的详细的去买书吧,另不用专门学习vb关于vbscript脚本在asp教材都有介绍
作者: 小妖女    时间: 2015-3-17 23:10
如何学好ASP,以前也有人问过,把回答给你转过来看看能否对你有帮助:
作者: 海妖    时间: 2015-3-25 06:34
跟学别的语言一样,先掌握变量,流程控制语句(就是ifwhileselect)等,函数/过程,数组




欢迎光临 仓酷云 (http://ckuyun.com/) Powered by Discuz! X3.2