angularjs - ASP.NET Create directory with current user permissions -
i want create directory on network path wcf web service. web service hosted under site uses windows authentication. however, when try create folder "directory.create", access denied. when check "httpcontext.current.user.identity.name", can see own user account, guess not 1 used create folder, as, when "system.environment.username", see value.
i tried put "<identity impersonate="true" />
" in main web.config of web site then, nothing works anymore.
so question is, possible create directory using permissions of logged user ?
as precision, i'm calling webservice through angularjs , configured "$httpprovider" pass credentials ("$hp.defaults.withcredentials = true;
").
edit:
i added "<identity impersonate="true" />
" web.config placed in folder contains web service , now, "system.environment.username" contains correct credential still, guess access denied. tried same command console application , works. don't it...
edit 2
if changed "identity" element "<identity impersonate="true" username="username" password="password" />
", works, don't want fill these fields...
thanks
i'm assuming network folder on server, you're either going have impersonate credentials has access or whoever apppool running need permissions write folder.
we typically have app-pool running domain account in iis. can tailor permissions see fit (assuming both servers on same domain and, don't have store passwords way, whoever manages iis handle that). if site needs write (but not read) give write permissions not read.
Comments
Post a Comment