Get C drive files
-
Dear all, I am using asp.net with c# 2005, .NET 2.0. How can i get all the file in directory C in server? I am tring to use DirectoryInfo to get the files, but the problem is what is the valid path for C drive in server?i try to use server.mapPath(@"~"),but only can get the path in wwwroot... Any tips or helps are welcome thanks in advance regards cocoonwls
-
Dear all, I am using asp.net with c# 2005, .NET 2.0. How can i get all the file in directory C in server? I am tring to use DirectoryInfo to get the files, but the problem is what is the valid path for C drive in server?i try to use server.mapPath(@"~"),but only can get the path in wwwroot... Any tips or helps are welcome thanks in advance regards cocoonwls
cocoonwls wrote:
but only can get the path in wwwroot...
Yes. This is how it works. You don't have access to other paths on the server. Why do you want to get the files in C drive?
Navaneeth How to use google | Ask smart questions
-
cocoonwls wrote:
but only can get the path in wwwroot...
Yes. This is how it works. You don't have access to other paths on the server. Why do you want to get the files in C drive?
Navaneeth How to use google | Ask smart questions
Hi Navaneeth, Due to user will upload their files to the c drive share folder.then they can retrieve the related files by using web application.And i don't wish the user can access the wwwroot file. Thus ,this is the reason i have to do the way. thanks in advance regards cocoonwls
-
Hi Navaneeth, Due to user will upload their files to the c drive share folder.then they can retrieve the related files by using web application.And i don't wish the user can access the wwwroot file. Thus ,this is the reason i have to do the way. thanks in advance regards cocoonwls
Well, these are the restrictions when you work with web applications. You will not get access to other places except wwwroot. I suggest to rethink your design.
Navaneeth How to use google | Ask smart questions
-
Well, these are the restrictions when you work with web applications. You will not get access to other places except wwwroot. I suggest to rethink your design.
Navaneeth How to use google | Ask smart questions