Today, I found one of my Exchange 2013 servers start generating Event ID 2001
It turns out that Exchange has corrupted the applicationHost.config file. If you try to open the file, you will see corrupted garbage characters all over the place.
Luckily I have got another Exchange 2013 server running on DAG, so I just copy the file applicationHost.config from C:\Windows\System32\inetsrv\config folder and replace the corrupted one then do IIS Reset
Showing posts with label IIS. Show all posts
Showing posts with label IIS. Show all posts
Saturday, September 28, 2013
Friday, February 27, 2009
IIS Anonymous User Account Reset Password
If you get this:
HTTP 401.1: DENIED BY INVALID USER CREDENTIALS:
This error code will have you focus on the credentials of the IUSR account. If you are receiving a 401.1, from a IIS perspective it means we have to go and look at IIS to make sure the IUSR username and password is correct for Anonymous access on all the IIS vDir's.
Occasionally the IIS guest account (IUSR_ account) has it's password out of sync between the IIS Metabase, Active Directory OR SAM (depending if the IUSR account is a local or domain account) and the credentials entered as the Anonymous user and password for the WSUS Virtual Directories in IIS. We need to make sure that the correct user account and credentials are used at 2 places:
In Active Directory or Local Account.
In the IIS Metabase.
Ensure that the IUSR account is not locked. Sometimes a 401.1 error could be caused by a locked IUSR account.
Then query the IIS Metabase to establish what the existing IUSR password is:
Edit c:\Inetpub\AdminScripts\ADSutil.vbs
Search for the line that reads "IsSecureProperty = True" and change it to "IsSecureProperty = False". Save and close the file.
From command line run:
Cscript adsutil.vbs get w3svc\anonymoususerpass
This will return an output like this:
anonymoususerpass : (STRING) "ThisIsTheIUSRaccountPassword"
Take note of the password, INSIDE of the quotes. The quotes are not part of the password. For safety, copy it into notepad.
Go to either Active Directory (if a domain account is used for the IUSR account) or find the LOCAL ACCOUNT for IUSR. In most cases IUSR will be a local account. Reset the password for your IUSR account with the password we just pulled from the IIS Metabase.
HTTP 401.1: DENIED BY INVALID USER CREDENTIALS:
This error code will have you focus on the credentials of the IUSR account. If you are receiving a 401.1, from a IIS perspective it means we have to go and look at IIS to make sure the IUSR username and password is correct for Anonymous access on all the IIS vDir's.
Occasionally the IIS guest account (IUSR_ account) has it's password out of sync between the IIS Metabase, Active Directory OR SAM (depending if the IUSR account is a local or domain account) and the credentials entered as the Anonymous user and password for the WSUS Virtual Directories in IIS. We need to make sure that the correct user account and credentials are used at 2 places:
In Active Directory or Local Account.
In the IIS Metabase.
Ensure that the IUSR account is not locked. Sometimes a 401.1 error could be caused by a locked IUSR account.
Then query the IIS Metabase to establish what the existing IUSR password is:
Edit c:\Inetpub\AdminScripts\ADSutil.vbs
Search for the line that reads "IsSecureProperty = True" and change it to "IsSecureProperty = False". Save and close the file.
From command line run:
Cscript adsutil.vbs get w3svc\anonymoususerpass
This will return an output like this:
anonymoususerpass : (STRING) "ThisIsTheIUSRaccountPassword"
Take note of the password, INSIDE of the quotes. The quotes are not part of the password. For safety, copy it into notepad.
Go to either Active Directory (if a domain account is used for the IUSR account) or find the LOCAL ACCOUNT for IUSR. In most cases IUSR will be a local account. Reset the password for your IUSR account with the password we just pulled from the IIS Metabase.
Wednesday, February 13, 2008
Reverse Proxy with IIS
Have you ever needed to do reverse proxy using IIS? if yes, read on.
You need to have ISAPI REWRITE product from here
Install on your IIS server and put the following code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^my.external-domain.com$
RewriteProxy ^(.*) http://my.internal-domain.com:9999/$1 [H,A,L]
This allows you to access my.external-domain.com from the Internet over HTTP (Port 80) and then proxied by IIS with the help of ISAPI to your my.internal-domain.com port 9999 which is located on the other internal 'inaccessible-from-the-Internet' server.
You need to have ISAPI REWRITE product from here
Install on your IIS server and put the following code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^my.external-domain.com$
RewriteProxy ^(.*) http://my.internal-domain.com:9999/$1 [H,A,L]
This allows you to access my.external-domain.com from the Internet over HTTP (Port 80) and then proxied by IIS with the help of ISAPI to your my.internal-domain.com port 9999 which is located on the other internal 'inaccessible-from-the-Internet' server.
