简体   繁体   中英

Allow read, write and execute files from asp.net web page using IIS7

I am going to host external site (not in domain). I have used IIS7 and given access to anonymous access to all users. I have login screen and only users who successfully login will get access to another page (Page2.aspx). All these users are in database.

In Page2.aspx, I am creating one xml file which will be saved in server drive. After writing success, I am reading one API exe (curl.exe) file which will send the xml file info to another site. If anything wrong, it writes to log.txt file which is also in same folder of website.

Everything works if I run locally.

It looks like, it has no permission to read/write and execute the file. I have given permission to Network Service, Anonymous access to read/write and execute file but no luck.

Could you please help me.

You'll need to give permissions to the IIS_IUSRS group or the IIS_IUSR user on the server. IIS 7's default set up is to run the application pool using the ApplicationPoolIdentity which typically means either of the previous roles / users. Only if the administrator has changed the default to the Network Service will that account ever be touched.

转到您希望用户具有访问权限的文件夹,然后添加具有所需权限的用户IUSR

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM