Assigning change/delete permission to a file in ASP.net applications
-
Hi, I dont know if this is the right forum for asking this,bear with me if its not. I have a asp.net application that has a image file which needs to be replaced with a new image every time a user clicks a link. Right now i am assigning the permissions(write/delete) on the server but the problem is, everytime there is an installation the permissions have to be manually supplied. Could anyone provide an alternative approach may be to set the permissions through code.... thanks in advance...
I was born dumb!! :laugh:Programming made me laugh:laugh:!!! --sid--
-
Hi, I dont know if this is the right forum for asking this,bear with me if its not. I have a asp.net application that has a image file which needs to be replaced with a new image every time a user clicks a link. Right now i am assigning the permissions(write/delete) on the server but the problem is, everytime there is an installation the permissions have to be manually supplied. Could anyone provide an alternative approach may be to set the permissions through code.... thanks in advance...
I was born dumb!! :laugh:Programming made me laugh:laugh:!!! --sid--
sidbaruah wrote:
i am assigning the permissions(write/delete) on the server but the problem is,
Are you assigning manually by taking the file properties ? Consider impersonation. Before writing, impersonate a user account which have read/write access to the file.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions
-
sidbaruah wrote:
i am assigning the permissions(write/delete) on the server but the problem is,
Are you assigning manually by taking the file properties ? Consider impersonation. Before writing, impersonate a user account which have read/write access to the file.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions
N a v a n e e t h wrote:
Are you assigning manually by taking the file properties ?
Yes i am manually adding User account and setting read/write/delete permissions to true.
N a v a n e e t h wrote:
Consider impersonation. Before writing, impersonate a user account which have read/write access to the file.
Is impersonation possible through the code because i wanted it without manually manipulating the permissions. I was born dumb!! :laugh:Programming made me laugh:laugh:!!! --sid--
-
N a v a n e e t h wrote:
Are you assigning manually by taking the file properties ?
Yes i am manually adding User account and setting read/write/delete permissions to true.
N a v a n e e t h wrote:
Consider impersonation. Before writing, impersonate a user account which have read/write access to the file.
Is impersonation possible through the code because i wanted it without manually manipulating the permissions. I was born dumb!! :laugh:Programming made me laugh:laugh:!!! --sid--
Yes. Impersonation can be done through code. Check this[^] and this[^]
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions
-
Yes. Impersonation can be done through code. Check this[^] and this[^]
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions