C# 部署时WindowsAPICodePack属性为null
在本地调试时,我能够从.mp4视频中读取标题 但是,将此应用程序部署到IIS后,Title属性为null 知道为什么会这样吗C# 部署时WindowsAPICodePack属性为null,c#,asp.net-mvc,windows-api-code-pack,C#,Asp.net Mvc,Windows Api Code Pack,在本地调试时,我能够从.mp4视频中读取标题 但是,将此应用程序部署到IIS后,Title属性为null 知道为什么会这样吗 foreach (var f in new DirectoryInfo(videosLocation).GetFiles() .Where(x => x.FullName.EndsWith(".mp4", StringComparison.CurrentCultureIgnoreCase))
foreach (var f in new DirectoryInfo(videosLocation).GetFiles()
.Where(x => x.FullName.EndsWith(".mp4", StringComparison.CurrentCultureIgnoreCase))
.ToList())
{
using (var so = ShellObject.FromParsingName(f.FullName))
{
var titleProp = so.Properties.GetProperty(SystemProperties.System.Title).ValueAsObject;
var title = titleProp == null ? "no title" : titleProp.ToString();
// title is null when deployed
}
}
请显示相关代码。谢谢@CodeCaster我已经添加了相关代码