How to avoid The filename, directory name, or volume label syntax is incorrect in IIS server . We are using VS 2005( C#2.0, ASP.NET,iis 7.5) We have created some shared folders and paths of them set in web.config from which to read the files and there are windows service set with app.config (Read Files) for the same. But the above error comes.
In web.config ftp settings are as follows:
<add key="ftp_TO_AFS" value="ftp://nestit-267/RonyFTP/ToAFS/" />
<add key="ftp_TO_AFS_USERID" value="" />
<add key="ftp_TO_AFS_PWD" value="" />
Ftp reads the files from To_AFS fs follows:
FTP objFromAfsFtp = new FTP();
objFromAfsFtp.Uri = ConfigurationManager.AppSettings["ftp_FROM_AFS"].ToString().Trim();
objFromAfsFtp.UserName = ConfigurationManager.AppSettings["ftp_FROM_AFS_USERID"].ToString().Trim();
objFromAfsFtp.Password = ConfigurationManager.AppSettings["ftp_FROM_AFS_PWD"].ToString().Trim();
string errorStr = string.Empty;
//Get All files from FROM_AFS Ftp
string[] getFiles = objFromAfsFtp.GetFileList(ref errorStr);
No issue in reading is seen mostly. Some times above error msg is written into the error log on running a service in IIS FTP.