代码之家  ›  专栏  ›  技术社区  ›  Gurumohan Singh

用c语言读取asp.net中mp3文件的id3标签#

  •  0
  • Gurumohan Singh  · 技术社区  · 14 年前

    我想用c#读取asp.net 2.0中mp3文件(作者、曲目名称等)的ID3标签。当我在本地pc上运行时,它在服务器上上载时正常工作,然后显示错误cant load modul WMVCore.dll open link

    http://iphoneapplicationsonline.com/

    我在windows server 2008上的主机,plz解决我的问题非常紧急 代码。。。 我正在使用Microsoft.Samples.MediaCatalog;dll

    using System;
    using System.Configuration;
    using System.Data;
    using System.Linq;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Xml.Linq;
    using System.IO;
    using Microsoft.Samples.MediaCatalog;
    public partial class _Default : System.Web.UI.Page
    {
        static Table tt = new Table();
        protected void Page_Load(object sender, EventArgs e)
        {               
            try
            {
                String ss = FileUpload1.PostedFile.FileName;
                MetadataEditor md = new MetadataEditor(this.Server.MapPath(@"1bopu1.mp3"));
    
                TableRow row = new TableRow();
                foreach (Microsoft.Samples.MediaCatalog.Attribute attr in md)
                {
                    row = new TableRow();
                    TableCell cell = new TableCell();
                    Label lbl = new Label();
                    lbl.Text = attr.Name;
                    cell.Controls.Add(lbl);
                    row.Controls.Add(cell);
                    cell = new TableCell();
    
                    Label txt = new Label();
    
                    txt.Text = attr.Value.ToString();
                    cell.Controls.Add(txt);
                    row.Controls.Add(cell);
                    Table1.Controls.Add(row);
    
    
                }
    
                md.Dispose();
            }
            catch(Exception ex)
            {
                Response.Write( ex.Message);
            }
        }
    
    }
    
    1 回复  |  直到 14 年前
        1
  •  0
  •   stack72    14 年前

    这表明您正在使用的dll WMVCore.dll是本地安装的,但不在服务器上。因此,您需要将此副本复制到应用程序中,然后从中引用,应用程序应该在服务器上工作。

    查看相关dll的属性,找到它们的位置并复制它们