0

I have a running windows container where I have hosted a website on IIS and publsihed through port 80. I need to set Application pool identity in my IIS application pool. Since the website is hosted in my container machine, I need to set identity of an admin user who have access.

$apppool = get-Item IIS:\AppPools\MyAppPool
$apppool.ProcessModel.IdentityType = "SpecificUser"
$apppool.ProcessModel.userName = "Administrator"
$apppool.ProcessModel.password = "Password"
$apppool | Set-Item

I have changed the password of user "Administrator" in my container machine as

net user Administrator Password

I get below error "HTTP Error 503. The service is unavailable"

Since it is a container machine I am not sure how to provide user access. Please assist.

UPDATE: I tried creating a new user and assigning him to local admin group. With this user now I am able to browse the site.

Issue is now, when I hit my rest-api service it doesnt work as required. Is it anything to do with inetrnet access in container machine ? If yes, how do we enable internet access in container machine ?

Thirtha
  • 111
  • 1
  • 2
  • 10
  • Which docker image do you use? Have you imported the webadministration properly? Generally, this error occurs if the application pool that is associated with the web application doesn't start, check this link for more details. https://stackoverflow.com/questions/40360909/http-error-503-the-service-is-unavailable-in-iis – Abraham Qian Jun 09 '20 at 07:51
  • https://support.microsoft.com/en-us/help/2619402/error-503-service-unavailable-when-you-browse-windows-sbs-websites#:~:text=This%20error%20may%20be%20caused,DETAIL%20%2D%20Access%20is%20denied.&text=Description%3A%20Browsing%20any%20website%2C%20such,may%20appear%20to%20just%20hang. – Abraham Qian Jun 09 '20 at 07:51
  • Hi @AbrahamQian, I have checked my appool. It is in started. Same site opens when given "NetworkService" but it is not having enough permission hence I need to change it to specific user with Administrator as user. – Thirtha Jun 09 '20 at 15:15
  • Your idea of changing to another account is good. Please carefully check if the application pool will automatically close when we access the website. Besides, have you tried localSystem account since this built-in account owns a system-level permission either to access certain resources. I doubt if the account you provided works. – Abraham Qian Jun 10 '20 at 03:17
  • Hi @AbrahamQian, I have tried with localSystem . When tried to acces the site it asks me to enter user credentials. So tried with specific user. The user I added have also been added to localadmin group. Since the site in hosted in container machine and i am tryingt to access it from my docker host. – Thirtha Jun 11 '20 at 05:04

0 Answers0