Pankaj Dubey
Pankaj Dubey

Reputation: 824

IIS isn't able to access the work (companydomain.com) files. It works when I change the ownership of file to make it personal

We created a couple of websites in IIS (latest), one for API and one for web application. enter image description here enter image description here

Now when I am trying to access the site, I am facing this weird problem from last couple of months. Everything used to work well before that. enter image description here

When I check the web.config file, I see that file ownership is of work account- enter image description here

Now, changing the file ownership to Personal works but 95%+ config/json/js/css files in my website is having the same problem.

What I tried is-

  1. Tried taking ownership of all files with bash command, but it didn't work-

takeown /f "C:\Workspace\mainwebapp" /r /d Y

  1. Tried taking ownership of all files with PowerShell, but it didn't work-

Get-ChildItem -Path "C:\Workspace\mainwebapp" -Recurse | ForEach-Object { Takeown /f $_.FullName }

  1. Tried connecting as specific user- enter image description here

The last approach solves the problem (somewhat) but it's having its own issues, and I think it is not a proper solution.

As I mentioned earlier, everything used to work properly as it is, and it only stopped working from a last couple of months. Can someone please point me in right direction? I wanted to understand what happened here and what might be causing this problem all of the sudden.

Upvotes: 0

Views: 35

Answers (0)

Related Questions