64位windows 2003环境UNC部署权限设置
2010-09-15 12:46
225 查看
系统环境:
[b]
IIS 6.0 设置32位兼容模式
FrameWork 1.1,2.0,3.0,3.5 sp1,建议不安装中文语言包。
域服务器:
Windows 2003 CHS ENT x86 64位操作系统
AD域
NAS存储:
支持AD
安全体系:
用AD域作为用户认证和web、nas之间访问认证。
设置步骤:
域服务器:
1.创建UNCUsers组,将来创建UNC用户都隶属于该组。
2.管理WEB服务器,将UNCUsers组加入WEB服务器中的IIS_WPG组。系统默认会对ASP.NET创建临时文件的目录必须权限赋予IIS_WPG组,所以当IIS进程执行用户为UNC用户时,需要将这类用户加入到IIS_WPG组。
2.1.避免出现"Unable to get the private bytes memory limit for the W3WP process. The ASP.NET cache will be unable to limit its memory use, which may lead to a process restart. Error: 0x80070005"错误。
2.2避免出现"The current identity (user) does not have write access to 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.
Exception Details: System.Web.HttpException: The current identity (DLS\unc01) does not have write access to 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'."
NAS存储:
1.加入AD域。
2.对存放网站文件的目录,至少赋予UNCUsers组读权限。
WEB服务器:
1.安装Framework。
2.设置IIS兼容32位模式
执行:cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1
3.针对网站需要ASP.NET版本以及32、64位模式,在对应的Framework文件夹内执行命令
aspnet_regiis.exe -i 在IIS->WEB扩展服务->ASP.NET v2.0.50727 (32-bit)检查是否存在。
4.允许ASP.NET v2.0.50727 (32-bit)
5.执行安全权限
针对UNC路径,执行ASP.NET代码执行权限设置:同样区分版本和32、64位模式
caspol.exe -m -ag 1 -url "file:////\\computername\sharename\*" FullTrust -exclusive on
避免错误:
"Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. " 代码Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 2010-12-9 14:07:27
Event time (UTC): 2010-12-9 6:07:27
Event ID: 5dc898ec095c4e0d945e4a4c838d12ab
Event sequence: 2
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/263101618/Root/Training-1-129363484449672079
Trust level: Full
Application Virtual Path: /Training
Application Path: \\172.16.119.105\web_unc\OnlineSim\WEB_8011\WebSites\ABC\
Machine name: WEB01-64
Process information:
Process ID: 1484
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: FileLoadException
Exception message: Could not load file or assembly 'System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. 拒绝访问。
Request information:
Request URL: http://localhost:8011/ABC/Default.aspx Request path: /ABC/Default.aspx
User host address: 127.0.0.1
User:
Is authenticated: False
Authentication Type:
Thread account name: DLS\unc01
Thread information:
Thread ID: 1
Thread account name: DLS\unc01
Is impersonating: False
Stack trace: at Training.MvcApplication.RegisterRoutes(RouteCollection routes)
at Training.MvcApplication.Application_Start()
Custom event details:
有关更多信息,请参阅在 http://go.microsoft.com/fwlink/events.asp 的帮助和支持中心。
分析后发现“FileLoadException”发生的原因在于,网站的映射中将.mvc映射给aspnet_isapi.dll(如下图)
由于这个时候该进程的用户账户为
Process information: Process ID: 1484 Process name: w3wp.exe Account name: NT AUTHORITY\NETWORK SERVICE
该本机用户没有访问UNC路径Bin中system.web.mvc.dll的权限,所以转而访问本机全局代码集中的system.web.mvc,但是由于服务器本机未安装mvc,见全局代码集。
所以发生FileLoadException的错误,解决方法,可以将MVC相关代码集复制到全局代码集中,或者安装mvc安装包。
参考文章:
http://support.microsoft.com/kb/894435
http://support.microsoft.com/?scid=kb;en-us;320268&x=17&y=9
[b]
[b][b]WEB服务器:[/b][/b]Windows 2003 CHS ENT x86 64位操作系统[/b]
IIS 6.0 设置32位兼容模式
FrameWork 1.1,2.0,3.0,3.5 sp1,建议不安装中文语言包。
域服务器:
Windows 2003 CHS ENT x86 64位操作系统
AD域
NAS存储:
支持AD
安全体系:
用AD域作为用户认证和web、nas之间访问认证。
设置步骤:
域服务器:
1.创建UNCUsers组,将来创建UNC用户都隶属于该组。
2.管理WEB服务器,将UNCUsers组加入WEB服务器中的IIS_WPG组。系统默认会对ASP.NET创建临时文件的目录必须权限赋予IIS_WPG组,所以当IIS进程执行用户为UNC用户时,需要将这类用户加入到IIS_WPG组。
2.1.避免出现"Unable to get the private bytes memory limit for the W3WP process. The ASP.NET cache will be unable to limit its memory use, which may lead to a process restart. Error: 0x80070005"错误。
2.2避免出现"The current identity (user) does not have write access to 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.
Exception Details: System.Web.HttpException: The current identity (DLS\unc01) does not have write access to 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'."
NAS存储:
1.加入AD域。
2.对存放网站文件的目录,至少赋予UNCUsers组读权限。
WEB服务器:
1.安装Framework。
2.设置IIS兼容32位模式
执行:cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1
3.针对网站需要ASP.NET版本以及32、64位模式,在对应的Framework文件夹内执行命令
aspnet_regiis.exe -i 在IIS->WEB扩展服务->ASP.NET v2.0.50727 (32-bit)检查是否存在。
4.允许ASP.NET v2.0.50727 (32-bit)
5.执行安全权限
针对UNC路径,执行ASP.NET代码执行权限设置:同样区分版本和32、64位模式
caspol.exe -m -ag 1 -url "file:////\\computername\sharename\*" FullTrust -exclusive on
避免错误:
"Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. " 代码Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 2010-12-9 14:07:27
Event time (UTC): 2010-12-9 6:07:27
Event ID: 5dc898ec095c4e0d945e4a4c838d12ab
Event sequence: 2
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/263101618/Root/Training-1-129363484449672079
Trust level: Full
Application Virtual Path: /Training
Application Path: \\172.16.119.105\web_unc\OnlineSim\WEB_8011\WebSites\ABC\
Machine name: WEB01-64
Process information:
Process ID: 1484
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: FileLoadException
Exception message: Could not load file or assembly 'System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. 拒绝访问。
Request information:
Request URL: http://localhost:8011/ABC/Default.aspx Request path: /ABC/Default.aspx
User host address: 127.0.0.1
User:
Is authenticated: False
Authentication Type:
Thread account name: DLS\unc01
Thread information:
Thread ID: 1
Thread account name: DLS\unc01
Is impersonating: False
Stack trace: at Training.MvcApplication.RegisterRoutes(RouteCollection routes)
at Training.MvcApplication.Application_Start()
Custom event details:
有关更多信息,请参阅在 http://go.microsoft.com/fwlink/events.asp 的帮助和支持中心。
分析后发现“FileLoadException”发生的原因在于,网站的映射中将.mvc映射给aspnet_isapi.dll(如下图)
由于这个时候该进程的用户账户为
Process information: Process ID: 1484 Process name: w3wp.exe Account name: NT AUTHORITY\NETWORK SERVICE
该本机用户没有访问UNC路径Bin中system.web.mvc.dll的权限,所以转而访问本机全局代码集中的system.web.mvc,但是由于服务器本机未安装mvc,见全局代码集。
所以发生FileLoadException的错误,解决方法,可以将MVC相关代码集复制到全局代码集中,或者安装mvc安装包。
参考文章:
http://support.microsoft.com/kb/894435
http://support.microsoft.com/?scid=kb;en-us;320268&x=17&y=9
相关文章推荐
- 给Windows 2003系统文件设置权限
- windows 64位环境下php执行环境部署配置
- windows 2003安全设置去权限批处理
- 给Windows 2003文件夹设置权限
- Windows 2003系统最完美的安全权限设置方案
- windows 2003最完善最完美的权限及安全设置解决方案【转】
- windows 2003 server IIS权限设置
- windows 2003 server IIS权限设置
- Windows 2003系统最完美的安全权限设置方案
- WINDOWS 2003 IIS网站防木马权限设置安全配置整理
- Java环境变量设置(适用于Windows 2000、XP、2003)及Windows JSP运行环境配
- 64位Windows 2003下部署应用纪实(winrar, oracle, jdk, tomcat, resin, pl/sql dev)
- windows 2003最完善最完美的权限及安全设置解决方案
- Java环境变量设置(适用于Windows 2000、XP、2003)
- 系统权限与安全配置―Windows 2003安全设置大全
- windows 2003最完善最完美的权限及安全设置解决方案
- Windows 2003 服务器权限设置
- Java环境变量设置(适用于Windows 2000、XP、2003)
- Windows下Apache应用环境塔建安全设置(目录权限设置)
- windows 2003最完善最完美的权限及安全设置解决方案