有人发帖问“aspnet_client必须放在web根目录吗?怎样改变这个路径?”
我一开始猜想这个路径可能是硬编码的。为了证实一下,就打开了Reflector,试图寻找到类似"/aspnet_client/system_web/1_1_4322/"的字符串,却发现这个目录的位置是可以自定义的,但是MSDN中没有公开。相关代码在System.Web.UI.Util.GetScriptLocation(HttpContext)中,
1
internal static string GetScriptLocation(HttpContext context)
2
...{
3
string text1 = null;
4
IDictionary dictionary1 = (IDictionary) context.GetConfig("system.web/webControls");
5
if (dictionary1 != null)
6