How To Troubleshoot ASP in IIS 5.0

问题描述

HowToTroubleshootASPinIIS5.0NOTE:Beforeyoubegin,ensurethat.htmlor.htmfilesopenontheWebserverinquestion.Ifthesefilesdonotopen,thisisnotanASPissue.1.IfaGlobal.asafileexistsintherootofyourWebsite,renameitasGlobal.old,stopandrestarttheWebservices,andthencreateatestASPpageinNotepadwiththefollowingcode:<%Response.Write"ThisisatestASPpage."%>SavethisfileasTest.aspintherootofyourWebsite,andtrytoopenthefileontheWebserver.IfASPpagesloadinyourWebbrowserafteryouhaveperformedthisstep,theproblemiswiththeGlobal.asafile.IfASPpagesstilldonotload,proceedtostep2.2.SettheapplicationprotectionfortheWebsitetoLowandstopandrestarttheIISAdminservice.IfASPpagesloadinyourWebbrowserafteryouhaveperformedthisstep,theissueiswiththeIWAMaccount,andyoucanproceedtostep3.IfASPpagesstilldonotload,checkComponentServicesinAdministrativeToolstoensurethatyoucanviewtheIISpackages.ThisensuresthatComponentServicesisnotfailing.MakesurethefollowingusersexistinthelocalUsersgroup:•NTAUTHORITYAuthenticatedUsers•NTAUTHORITYINTERACTIVE3.IfASPpagesloadinyourWebbrowserafteryouhaveperformedstep2,setthesitebacktoMediumorHighapplicationprotection,andaddtheIWAMaccounttothelocalAdministratorsgroup.IfASPpagesloadinyourWebbrowserafteryouhaveperformedthisstep,apermissionsissueinvolvingtheIWAMaccountexists,andyoucanproceedtostep4.IfASPpagesstilldonotload,runtheSynciwam.vbsutilityfromacommandline.Todothis,openacommandpromptandtypeC:Inetpubadminscripts>cscriptsynciwam.vbs.4.ToresolvepermissionsissueswiththeIWAMaccount,usetheRegmonandFilemonthird-partyproductsforWindows2000.Todownloadthesetheseutilities,seethefollowingWebsite:http://technet.microsoft.com/en-us/sysinternals/default.aspxRuntheseutilitieswhileyoumakearequestforanASPpage,thensearchfor"ACCDENIED"inRegmonand"FAILURE"inFilemonfortheDllhost.exeprocess.NOTE:Donotbealarmedifyousee"accessdenied"fortheIexplore.exe(MicrosoftInternetExplorer)process.Thisiscommonbehavior.Afteryouhaveidentified"accessdenied"errormessagesfortheDllhost.exeprocess,useRegedt32tomakeanynecessarymodificationstoNTFSpermissionsintheregistry.5.Inthesystemeventlog,lookforthefollowingevents:Source:DCOMEventID:10010User:NTAUTHORITYSYSTEMDescription:Theserver{3D14228D-FBE1-11D0-995D-00C04FD919C1}didnotregisterwithDCOMwithintherequiredtimeout.Thiserrormessageisfollowedintheeventlogbyawarningmessagelikethefollowing:Source:W3SVCEventID:36User:N/ADescription:Theserverfailedtoloadapplication'AppPath'.Theerrorwas'Serverexecutionfailed'.Youmayalsoseeentrieslikethefollowinginyour%SystemRoot%Iis5.logfile:OC_ABOUT_TO_COMMIT_QUEUE:Unregiis_core:FindModules:FindProcessByNameWfailed!Ifyoureceivetheseerrormessages,theNTAUTHORITYAuthenticatedUsersorNTAUTHORITYINTERACTIVEentryhasbeenremovedfromtheUsersgroup.Toresolvetheproblem,makesurethatAuthenticatedUsersandINTERACTIVEaremembersoftheUsersGroupforthatcomputer.6.Asalastresort,youcanre-createtheIISpackages.Todothis,followthesesteps:a.BrowsetoComponentServicesanddeletethefollowingpackages:NOTE:Todeletethepackages,youmustfirstopenthepropertiesofthepackage,clicktheAdvancedtab,andthenclicktocleartheDisableDeletioncheckbox.•IISIn-ProcessApplications•IISOut-of-ProcessPooledApplications•IISUtilitiesb.Openacommandprompt,andthenusethefollowingcommandtoswitchdirectories:cd%windir%system32inetsrvc.Runthefollowingcommands:rundll32wamreg.dll,CreateIISPackageNOTE:"CreateIISPackage"mustbetypedexactly;itiscase-sensitive.regsvr32asptxn.dlld.CloseandreopenComponentServices.YoushouldseeallthreeIISCOM+applicationsthathavebeenrecreated.e.RunIISRESETfromacommandlineandtestanyASPpagethatpreviouslydidnotloadcorrectly.

解决方案

解决方案二:
HowToSecureanASP.NETApplicationbyUsingWindowsSecurity1.HowtoDeveloptheWebSiteInthisprocedure,youwillcreateasimpleASP.NETWebapplication,whichwillbesecuredbyusingWindowsauthentication.a.StartVisualStudio.NET,andthencreateanewVisualBasicASP.NETWebapplicationnamed"WindowsSite."b.DragalabelcontrolfromthetoolboxontotheWebForm1.aspxWebform,andthensetitsIDpropertytoauthUserPrincipalLabel.c.DragasecondlabelcontrolfromthetoolboxontotheWebForm1.aspxWebform,andthensetitsIDpropertytoaspPrincipalLabel.d.Double-clickWebForm1.aspxtoviewthecodewindow,andthenaddthefollowingImportsstatementabovetheclassdeclaration:ImportsSystem.SecurityAddthefollowingcodetothePage_Loadeventprocedure:DimauthUserNameAsStringDimaspUserNameAsStringauthUserName=User.Identity.NameaspUserName=Principal.WindowsIdentity.GetCurrent.NameauthUserPrincipalLabel.Text="Youare:"&authUserNameaspPrincipalLabel.Text="Thispagerunsas:"&aspUserNamee.Viewtheproject'sWeb.configfile,andthenlocatetheauthenticationelement.VerifythatthemodeattributehasavalueofWindows.f.Buildandsavetheproject.g.Runtheproject,andthenconfirmthatthepageisdisplayedwiththefollowingmessage:•InWindows2000Youare:Thispagerunsas:DomainOrServerASPNET•InWindowsServer2003Youare:Thispagerunsas:DomainOrServerNETWORKSERVICENoteYourusernameisnotdisplayedbecauseyouhavenotbeenauthenticatedbyIIS;anonymousaccessisstillenabled.h.QuitInternetExplorertostoptheproject.2.HowtoDisableAnonymousAccessInthisprocedure,youwillconfigureIIStorequireWindows-integratedauthenticationfortheWindowsSitesite.a.MinimizeVisualStudio,andthenstartInternetServicesManagerfromtheAdministrativeToolsprogramgroup.b.ExpandyourserveranditsdefaultWebsite,right-clicktheWindowsSitesite,andthenclickProperties.c.OntheDirectorySecuritytabintheWindowsSitePropertiesdialogbox,clicktheEditbuttoninthe"Anonymousaccessandauthenticationcontrol"section.d.ClicktocleartheAnonymousaccesscheckbox,verifythattheIntegratedWindowsauthenticationcheckboxisselected,andthenclickOK.e.ClickOKtoclosetheWindowsSitePropertiesdialogbox.f.SwitchbacktoVisualStudio,andthenruntheproject.Confirmthatthepageisdisplayedwiththefollowingmessage:•InWindows2000Youare:YourWindowsusernameThispagerunsas:DomainOrServerASPNET•InWindowsServer2003Youare:YourWindowsusernameThispagerunsas:DomainOrServerNETWORKSERVICENote:YouhavebeenauthenticatedthroughyourWindowsaccount.IfyouhadnotbeenloggedontoWindows,youwouldhavebeenpromptedforaWindowsusernameandpassword.g.QuitInternetExplorertostoptheproject.3.AuthorizationInASP.NET,itispossibletoallowauthorizationtotheapplicationwhenyoumakeadditionalsettingsavailablewithintheWeb.configfile.Youcanallowcertainusersorcertaingroupsaccesstotheseadditionalsettings.Thefollowingexamplesdescribethiscapability.ToallowaccesstoallusersfoundintheWindowsNTGroupthatiscalled"Managers,"usethefollowingcode:<configuration><system.web><authorization><allowroles="domainnameManagers"/><denyusers="*"/></authorization></system.web></configuration>Toallowaccesstoonlycertainusers,usethefollowingcode:<configuration><system.web><authorization><allowusers="domainnameuser1,domainnameuser2,domainnameuser3"/><denyusers="*"/></authorization></system.web></configuration>NoteYoucanreferencemultiplerolesoruserswhenyouuseacomma-separatedlist.4.HowtoEnableImpersonationInthisprocedure,youwillconfiguretheWindowsSiteapplicationtoimpersonatetheWindowsuserwhoisaccessingit.a.InVisualStudio,viewtheWeb.configfilefortheWindowsSiteproject.b.Addthefollowingelementaftertheauthenticationelement:<identityimpersonate="true"/>c.SaveWeb.config.d.Runtheproject.Confirmthatthepageisdisplayedwiththefollowingmessage(notethattheASP.NETexecutionenginewilluseyourWindowscredentialstoaccessresourcesonyourbehalf):Youare:YourWindowsusernameThispagerunsas:YourWindowsusernamee.QuitInternetExplorertostoptheproject.5.HowtoAssignaCustomPrincipalInthisprocedure,youwillconfiguretheWindowsSiteapplicationtouseacustomsecurityprincipal:a.StarttheComputerManagementfeaturefromtheAdministrativeToolsprogramgroup.CreateanewWindows2000useraccountnamed"WindowsSite,"withapasswordof"password"(notewhetheryourserverisadomaincontroller,andthenusetheActiveDirectoryUsersandComputerstool).b.ClicktocleartheUsermustchangepasswordatnextlogoncheckbox.c.WhentheWindowsSiteaccounthasbeencreated,closetheadministrativetoolthatyouusedtocreateit.d.InVisualStudio,viewtheWeb.configfilefortheWindowsSiteproject.e.Edittheidentityelementtoreadasfollows:identityimpersonate="true"userName="DomainOrServerNameWindowsSite"password="password"/>whereDomainOrServerNameiseitherthenameofyourWindows2000orWindowsServer2003domain(inadomainenvironment)orofyourcomputer(inaworkgroupenvironment).f.SaveWeb.config.g.Runtheproject.Confirmthatthepageisdisplayedwiththefollowingmessage:Youare:YourWindowsusernameThispagerunsas:DomainOrServerNameWindowsSiteNote:Aspnet_wp.exewillusetheWindowscredentialsthatyouspecifiedtoaccessresourcesonyourbehalf.h.QuitInternetExplorertostoptheproject.NoteTheidentityoftheprocessthatimpersonatesaspecificuseronathreadmusthavetheActaspartoftheoperatingsystemprivilege.•OnWindows2000,bydefault,theAspnet_wp.exeprocessrunsunderacomputeraccountthatisnamedASPNET.•OnWindowsServer2003,bydefault,theAspnet_wp.exeprocessrunsunderacomputeraccountthatisnamedNetworkService.However,thisaccountdoesnothavethecorrectprivilegestoimpersonateaspecificuser.Youreceiveanerrormessageifyoutrytoimpersonateaspecificuser.Toworkaroundthisproblem,useoneofthefollowingmethods:•GranttheActaspartoftheoperatingsystemprivilegetotheASPNETaccount(theleastprivilegedaccount).NoteAlthoughyoucanusethismethodtoworkaroundtheproblem,Microsoftdoesnotrecommendthismethod.•ChangetheaccountthattheAspnet_wp.exeprocessrunsundertotheSystemaccountinthe<processModel>configurationsectionoftheMachine.configfile.
解决方案三:
已经OK
解决方案四:
这有两个问题,一个是“怎样在IIS5.0中排除ASP故障”另一个是“如何使用Windows安全保护ASP.NET应用程序”

时间: 2024-08-20 00:37:20

How To Troubleshoot ASP in IIS 5.0的相关文章

IIS 5.0新功能

Windows 2000的IIS(Internet Information Services) 5.0提供甚麼樣的新功能呢? IIS 5.0新功能如下: l 安全性上:包括摘要式驗證.整合的Windows驗證.SGC (Server-Gated Cryptography ) .Microsoft Certificate Services 2.0.集區處理程序之程式保護等. l 管理上:包括IIS重新啟動.站台CPU使用時間的限制.CPU資源使用記錄.使用終端機服務遠端管理IIS.自訂錯誤訊息等.

如何在IIS 7.0中配置ASP.NET应用程序

如果 ASP.NET Web 应用程序以 IIS 7.0 为宿主,则可以用多种方式为该应用程序进行配置设置.这包括: 使用 IIS 管理器. 直接编辑 Web.config 文件.可以在 Visual Studio 或 Visual Web Developer 中或通过使用文本编辑程序完成此任务. 使用 IIS 7.0 命令行工具 (Appcmd.exe).使用此实用工具,可以指定 IIS 配置设置和 Web 应用程序配置设置. 使用 Windows Management Instrumenta

IIS 7.0: 使用集成的ASP.NET管道增强应用程序

本文以 IIS 7.0 FastCGI 组件的预发布版为基础.文中包含的所有信息均有可能变更. 本文 讨论: ASP.NET 集成模式 添加用户身份验证 启用对搜索引擎友好的 URL 使 用输出缓存提升性能 本文使用了以下技术:IIS 7.0, .NET Framework 大约一年前,我撰写了 一篇 IIS 7.0 概述,发表在<MSDN 杂志>上(请参阅 msdn.microsoft.com/msdnmag/issues/07/03/IIS7 上的"IIS 7.0:探索用于 Wi

IIS 6.0进程模型 --asp.net本质

如果Web服务器操作系统是Windows server 2003,则IIS 6.0进程模型是asp.net的默认选择.其名称明确之处,该模型需要IIS 6.0.然后,在windows 2003 的服务器上,仍然可以让asp.net遵守IIS 5.0进程模型的规则.可以通过修改machine.config文件中的<processModel>节,显示的启用该模型. <processModel enable="true"> 当然,我并不建议且滑倒IIS 5.0进程模型

如何提高IIS 5.0网站伺服器的执行效率呢?

iis|执行 提高IIS 5.0执行效率 如何提高Windows 2000 Server中IIS 5.0网站伺服器的执行效率呢? 提高IIS执行效率的方法如下: 1. 启用HTTP的持续作用可以改善15~20%的执行效率. 2. 不启用记录可以改善5~8%的执行效率. 3. 使用 [独立] 的处理程序会损失20%的执行效率. 4. 增加快取记忆体的保存档案数量,可提高Active Server Pages之效能. 5. 勿使用CGI程式. 6. 增加IIS 5.0电脑CPU数量. 7. 勿启用A

提高IIS 5.0网站服务器的执行效率的八种方法

iis|服务器|执行 以下是提高IIS 5.0网站服务器的执行效率的八种方法: 1. 启用HTTP的持续作用可以改善15~20%的执行效率. 2. 不启用记录可以改善5~8%的执行效率. 3. 使用 [独立] 的处理程序会损失20%的执行效率. 4. 增加快取记忆体的保存文档数量,可提高Active Server Pages之效能. 5. 勿使用CGI程式. 6. 增加IIS 5.0电脑CPU数量. 7. 勿启用ASP侦错功能. 8. 静态网页采用HTTP 压缩,大约可以减少20%的传输量. 简

深入剖析IIS 6.0(4)

iis 如果将IIS 5.0或IIS 4.0服务器升级到Windows 2003,IIS 6.0不会被设置成自动启动.也就是说,如果采用升级的方式安装,IIS 6.0默认是禁用的,除非遇到下列情况之一: ⑴ 以前的IIS服务器上已经安装了IIS Lockdown工具. ⑵ 存在注册子键HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\RetainW3SVCStatus,且它包含一个任意的注册键.例如,你可以创建一个名为Enabl

深入剖析IIS 6.0(13)

iis 通配符应用程序可以做到开发者要做的任何事情,诸如URL定制.验证身份.记录特殊的日志信息.检测攻击企图.创建内容,等等.通配符应用程序结束处理后,它把请求转交给适当的处理引擎(例如处理ASP页面的asp.dll),由处理引擎进一步处理请求.另外,通配符应用程序还可以通过调用为ISAPI应用程序新增的ExecuteURL功能,将请求传递到同一个应用程序池中的任意页面. 新增的ISAPI通配符应用程序为创造性的应用程序设计大开方便之门.例如,IIS 6.0的URL授权功能就是作为一个ISAP

深入剖析IIS 6.0(3)

iis 安装IIS 6.0的最后一种方式是无人值守安装.和以前一样,这仍旧是唯一一种能够将工具和默认Web网站安装到其他驱动器(而不是系统驱动器)的安装方式.Windows 2003无人值守安装方式大体上仍和Win 2K一样,都是用Sysocmgr和一个应答文件实施安装.当然,新的特性需要新的参数.选项,有关这方面的详细说明,可以在Windows 2003 Release Candidate 2 (RC2)找到,地址是:http://www.microsoft.com/technet/treev