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!
Add a comment
|
1 Answer
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.
4 Comments
H. Senkaya
Thank you for the fast Response... I ll have a look on this!
H. Senkaya
I get something like D:\folder1\folder2 .... is it possible to access another disk? like C:\... or Y:\...?
Aristos
@H.Senkaya If you give permissions you can. Just make your path as you like
H. Senkaya
@Thanks, you solved my problem :)