Is there any way to execute, get or create any local file by the user specific path? My intension is to create a folder in the user specific local path... something like Y:\newFolder
if the user clicks a button in the View ASP.NET MVC. Sorry that I don't have any code sample but I really dont have any idea. Thanks and Greetings!
Asked
Active
Viewed 1,012 times
1

H. Senkaya
- 743
- 5
- 27
1 Answers
3
In a web application there is not actually any user, other than the IIS and the POOL that runs your site.
Now, you application can have users, that you allowed them to logged in, and then where you going to create their files and folders is up to you, and you only.
you can use this
HttpRuntime.AppDomainAppPath
to get your current application path, and from there you can add any folder base on your users.
-
Thank you for the fast Response... I ll have a look on this! – H. Senkaya Apr 13 '16 at 07:39
-
I get something like D:\folder1\folder2 .... is it possible to access another disk? like C:\... or Y:\...? – H. Senkaya Apr 13 '16 at 09:34
-
@H.Senkaya If you give permissions you can. Just make your path as you like – Aristos Apr 13 '16 at 09:35
-
1@Thanks, you solved my problem :) – H. Senkaya Apr 13 '16 at 09:58