Click here to Skip to main content
15,879,348 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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:
XML
<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.
Posted
Updated 8-Apr-14 19:20pm
v4
Comments
OriginalGriff 1-Apr-14 10:42am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Perhaps a sample of the web.config and the code that used it would help?
Use the "Improve question" widget to edit your question and provide better information.

1 solution

Using this line in your web.config (inside system.web):
HTML
<customerrors mode="On" />


Regards.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900