2010-05-29 87 views
0

我有以下代码:在MapPath奇怪的错误

string path = "~/Others/Muzica/Demo/"+interpret+"_"+album+"/"; 
CMSUtils.CreateFolder(MapPath(path)); 

其中CreateFolder方法是这样的:

public static void CreateFolder(string path) 
{ 
    if (!System.IO.Directory.Exists(path)) 
    { 
     System.IO.Directory.CreateDirectory(path); 
    } 
} 

所以我创建,如果不存在的文件夹,它... 所有本地工作大但我不明白为什么,如果我把它放在它给出的服务器上:

未能映射路径'/ gramma_prod/Others/Muzic a/Demo/Vitamina C_De n-ai fi fost Tu /'。

at CMSUtils.CreateFolder(MapPath(path));

我已签,如果:/ gramma_prod /其他服务器上的过程中存在的和/ Muzica /演示/存在......

是否有人看到这个问题?

回答

0

Well..The问题是, '解释' 值在端

未能映射路径 “/ gramma_prod /其他/ Muzica /演示/维生素A C_De正AI连接有空间fost涂/

正确使用trim()的另一个原因...