SharePoint读取禁止上传文件类型代码:
SPWebApplication currentWebApplication = SPWebApplication.Lookup(new Uri(@"http://sp2010:82/"));
Collection<string> blockedFileExtensions = currentWebApplication.BlockedFileExtensions;
StringBuilder stringBuilder = new StringBuilder();
foreach (string str in blockedFileExtensions)
{
stringBuilder.Append(str);
stringBuilder.Append("<br/>");
}
Literal1.Text += stringBuilder.ToString();