读书人

asp.net 操作 iis 建虚拟目录 报“未知

发布时间: 2012-03-04 11:13:33 作者: rapoo

asp.net 操作 iis 建虚拟目录 报“未知名称”错误。
try
{

dirroot = new DirectoryEntry( "IIS://localhost/W3SVC/1/ROOT ");
DirectoryEntry newVirDir = dirroot.Children.Add( "Webtest ", "IIsWebVirtualDir ");
newVirDir.Invoke( "AppCreate ",true);
newVirDir.CommitChanges();
dirroot.CommitChanges();
}
catch(Exception abc)
{
this.Response.Write(abc);
}


abc 报“未知名称错误” 请问这是什么原因?

[解决办法]
权限问题?

读书人网 >asp.net

热点推荐