Creating Folder at Server through client.
-
Hi, In my application i require to create a folder by customername, when any new customer is added. But the folder should be created on the Server not on workstation. if is use following code, where the folder will be created, C Drive of Local Machine or C drive of Web Server. Dim diCust As DirectoryInfo = Directory.CreateDirectory("C:/TestCustomer") I want to create on Server. Please Speak. Thanks
Binod K. (Miles to go before I sleep)
-
Hi, In my application i require to create a folder by customername, when any new customer is added. But the folder should be created on the Server not on workstation. if is use following code, where the folder will be created, C Drive of Local Machine or C drive of Web Server. Dim diCust As DirectoryInfo = Directory.CreateDirectory("C:/TestCustomer") I want to create on Server. Please Speak. Thanks
Binod K. (Miles to go before I sleep)
Binod K. wrote:
if is use following code, where the folder will be created, C Drive of Local Machine or C drive of Web Server. Dim diCust As DirectoryInfo = Directory.CreateDirectory("C:/TestCustomer")
If your application is placed on web server and you are running from there then folder will be created there other than if you run your application from local machine then it will be created on local machine drive.:rose:
please don't forget to vote on the post that helped you.
-
Binod K. wrote:
if is use following code, where the folder will be created, C Drive of Local Machine or C drive of Web Server. Dim diCust As DirectoryInfo = Directory.CreateDirectory("C:/TestCustomer")
If your application is placed on web server and you are running from there then folder will be created there other than if you run your application from local machine then it will be created on local machine drive.:rose:
please don't forget to vote on the post that helped you.
thanks for your thought Imran. As its web application, One will run the application through URL from local machine. There is no general point to use application from server. So where the folder will be created ? Does i require to map Server Path. Thanks
Binod K. (Miles to go before I sleep)
-
thanks for your thought Imran. As its web application, One will run the application through URL from local machine. There is no general point to use application from server. So where the folder will be created ? Does i require to map Server Path. Thanks
Binod K. (Miles to go before I sleep)
In Asp.Net applications folders and files always created at server. If you know the path directly you can write it as c:\..... but if the path will be depended to the directory of application is running you should use Server.MapPath. Using Server mappath is good for any changes of application directory or web server. EX if application is running at c:\inetpub\wwwroot\exapplication Server.MapPath() gives you the result c:\inetpub\wwwroot\exapplication Server.MapPath("Example") gives you the result c:\inetpub\wwwroot\exapplication\Example
-
In Asp.Net applications folders and files always created at server. If you know the path directly you can write it as c:\..... but if the path will be depended to the directory of application is running you should use Server.MapPath. Using Server mappath is good for any changes of application directory or web server. EX if application is running at c:\inetpub\wwwroot\exapplication Server.MapPath() gives you the result c:\inetpub\wwwroot\exapplication Server.MapPath("Example") gives you the result c:\inetpub\wwwroot\exapplication\Example