When I tried to publish my website using IIS, I encountered the error message
Cannot read configuration file due to insufficient permissions
. After attempting to add permissions for IIS_USRS and realizing that this user does not exist on my computer running Windows 7, I looked for a solution. Even after following the steps of right-clicking on the folder, going to the security tab, clicking Edit, then Advanced, the user was still not present.
Next, I decided to edit the basic settings of the application in IIS and connect as a specific user. This approach seemed to work, as the error message disappeared. However, I noticed that the page was displaying without any style - the CSS, images, and JavaScript files were not loading properly. Attempting to browse directly to the image paths confirmed that they do exist, but still failed to load along with the rest of the page.
In an effort to resolve this issue, I accessed Control Panel, navigated to Programs and Features, turned on/off Windows features, selected Internet Information Services, World Wide Web Services, Common HTTP Features, and checked static content. Unfortunately, this did not solve the problem.
Why is this happening and how can I fix it?