2010-09-15 88 views
0

我想用c#在asp.net 2.0中讀取mp3文件(作者,曲目名稱等)的ID3標籤。當我在本地PC上運行,則它正常工作時,上傳在服務器上,然後提示錯誤斜面負荷MODUL提示wmvcore.dll打開鏈接在asp.net中用c#讀取mp3文件的id3標籤#

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); 
     } 
    } 

} 

回答

0

這表明你正在使用WMVCore.dll的DLL是安裝在本地,但不是在服務器上。因此您需要將此副本提供給您的應用程序,然後從那裏引用,並且您的應用程序應在服務器上運行。

看看所涉及的dll的屬性,並找到它們的位置並製作它們的副本