开发者

read id3 tag of mp3 file in asp.net with c#

开发者 https://www.devze.com 2023-01-16 01:18 出处:网络
i want to read ID3 tag of mp3 file(author,track name etc)in asp.net 2.0 with c#. when i am running on local pc then it work properly when upload on server then show error cant load modul WMVCore.dll o

i want to read ID3 tag of mp3 file(author,track name etc)in asp.net 2.0 with c#. when i am running on local pc then it work properly when upload on server then show error cant load modul WMVCore.dll open link

http://iphoneapplicationsonline.com/

my hosting on windows server 2008, plz solve my problem it very urgent code... i am using using 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);
        }
    }

}


This suggests that the dll that you are using WMVCore.dll is installed locally but not on teh server. therefore you need to take a copy of this to your application and then reference from there and your application should work on the server.

look at the properties of the dlls involved and find their location and make a copy of them

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号