.net - How to set correct file permissions for ASP.NET on IIS -


http error 500.19 - internal server error requested page cannot accessed because related configuration data page invalid.

error code : 0x80070005
config error : cannot read configuration file due insufficient permissions

when add new web application in iis 7.5 , run it, page shown me, how solve problem win7 ultimate visual studio 2010

enter image description here

the message clear.

cannot read configuration file due insufficient permissions

how solve it.

every asp.net application run under one pool assigned it, , each pool run under a specific account.

open iis, locate pool under app try run, see user assigned pool, , give read permissions user on full site directory tree.

especial web.config

the web.config, configuration file message says, must have (and) write permissions.

so locate web.config on root of site, right click on it, go permissions , give on pool-user, write capability. pool user, user under witch pool run, explain below.

more details

to been able run public asp.net site iis, each file on directory must have permissions 2 accounts.

one account permitted public access, , account assigned application pool have.

to find/assing first account go iis site | authentication | edit, , see or change see on screen shot.

now note name , going find user under pool run.
go iis site , click on basic settings find pool name, go iis | application pools , see identity column, , note name of user under witch site run.

now have 2 users names go root of site , set minimum of permissions read as

some notes

  • if iis_public_access_user not give read permission site run, ask password
  • on directories need , write permissions, if let example users upload images, or keep on app_data, database files. directories give , write permissions iis_pool_user.
  • some directories, app_data , app_code have direct protection asp.net , not allow client side run or view whats in there.
  • on public directory allow write access user add 1 web.config , totally disable running of asp.net files.

more read directories give write permissions i've been hacked. evil aspx file uploaded called aspxspy. they're still trying. me trap them‼


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -