仓酷云

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 723|回复: 10
打印 上一主题 下一主题

[学习教程] ASP网页设计DCOM用的,参考www.microsoft.comtechne...

[复制链接]
谁可相欹 该用户已被删除
跳转到指定楼层
楼主
发表于 2015-1-16 23:15:43 | 只看该作者 回帖奖励 |正序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?立即注册

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

本版积分规则

QQ|Archiver|手机版|仓酷云 鄂ICP备14007578号-2

GMT+8, 2024-9-24 13:26

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表