I encountered a very strange problem. I want to create a local directory in WebService. At the beginning, I wrote:
[Webmethod]
Public void createfolder (){
System. Io. Directory. createdirectory ("C: \ fqq \ fqq2 \ fqq3 ");
}
OK, aboveCodeNo problem, but when I write this in the product:
[Webmethod]
Public void createfolder (){
System. Io. Directory. createdirectory ("C: \ Program Files \ fqq2 \ fqq3 ");
}
Error: The preceding directory is not verified.
Assume that it is a long path name problem, so it is changed to: C: \ progra ~ 1 \ fqq2 \ fqq3, the same error.
As a result, I started to think that. Net considers % Program Files % directory as a sensitive directory? But faint, I can read it. Why cannot I create it ??? This directory does not display subfolders from Explorer (default behavior), But I modify this folder. It is hard to say that M $ is considered unsafe ???