creating site must be in "inetpub" directory.
TeddyBearItsMe opened this issue · 1 comments
in startup.cs in line 31 there his hardcoded path:
string inetpubPath = System.Environment.ExpandEnvironmentVariables(@"%SystemDrive%\inetpub");
which stores in a list only this directory and the "claims" for that directory.
but in my organization we are using a different path, and therefore when trying to create a new iis site, it returns 403 because the physical path is in another place and it does not recognize it in this function: FileProvider.IsAccessAllowed.
the above function returns false, even though I do have access to this directory.
add or update the "files" section in appsettings.json. In the following example, you can create new sites under C:\inetpub and C:\Repos\iis-admin.test"
"files": {
"locations": [
{
"alias": "inetpub",
"path": "C:\inetpub",
"claims": [
"read",
"write"
]
},
{
"alias": "tests",
"path": "C:\Repos\iis-admin\.test",
"claims": [
"read",
"write"
]
}
]
}