Error 500 when setting up a new smartphone on ActiveSync

We've been running an Exchange 2010 R2 server for the past 6 months and had no issues activating a new Android or iPhone user. Suddenly we are no longer able to create new ActiveSync accounts on any device, but those that have already been activated are synchronizing just fine. I've looked up some of the suggestions, but found that the inheritance issue is not the problem and it is not related to admincount issue either. It happens to all accounts we want to activate, whether old or new. This is what ExRCA shows at the last step that fails.

Testing HTTP Authentication Methods for URL https://xxxxxxxxx*.com/Microsoft-Server-ActiveSync.
       The HTTP authentication test failed.
      Additional Details
       An HTTP 500 response was returned from Unknown.

*(domain x-ed to protect privacy)

The server was restarted several times, but to no avail. These are some of the observations and facts:

All users are allowed to utilize ActiveSync, it's enabled on all mailbox accounts. The server creates a sub-container in AD for each account that tries to activate a phone, as it should.
The server also nicely cleans it up if we remove the ActiveSync partnership.

We are using self-issued SSL certificate, but that's not the problem because the phones ask if it's okay to continue or cancel during the setup process.

The part where each phone fails is when it tries to create the account and folders at the finishing phase stating "Failed to create the account. Please try again later.".

This is the only Exchange server in our organisation and it is also our domain controller.

We migrated from Exchange 2003 Standard Edition and the old server is no longer an Exchange server, but remain in the AD as a domain controller.

Our WatchGuard firewall doesn't seem to be the culprit either because if I connect my phone directly to the LAN via WiFi, effectively bypassing the firewall, and I use the FQDN of the server instead of our publicly known domain name, I get the same exact error on the phone.
Any help would be appreciated.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shreedhar EtteCommented:
- Please browse the url  https://xxxxxxxxx*.com/Microsoft-Server-ActiveSync and post the output you get.
TSKC-IncAuthor Commented:
This is what I get if trying to reach that URL from an outside computer or any computer on the domain.

IE 9 screenshot from a computer outside of our organisation
This is what I get if I go to the https://localhost/Microsoft-Server-ActiveSync from the server's own IE browser.

The error I get if trying to go to the URL from the server itself.
Shreedhar EtteCommented:
- Does any webconfig file exists in C:\inetpub\wwwroot? If yes, then rename it and tey to browse the url again.
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

TSKC-IncAuthor Commented:
It does not, I already checked that too. The one that's in the virtual directory for ActiveSync looks fine to me, but if I use an older copy of it dated the same day as the rest of the files in the same folder my ActiveSync stops working and I get the following error.

ActiveSync stops working if I use the original web.config file.
Shreedhar EtteCommented:
- Does any redirection is configured on the OWA virtual direcoty? If yes, then disabled it and restart the IIS Admin Service.
TSKC-IncAuthor Commented:
Not to my knowledge, but how do I check for sure? I did not redirect any pages, so everything should still be as it was the day we deployed it. I can still get to OWA by typing https;// without a problem.
Shreedhar EtteCommented:
To Check Redirection enabled on owa:
- Open Internet Infomation Service Manager (IIS)
- Select OWA virtual direcorty > Double Click on HTTP Redirect
- Here check whether Redirect requests to this destination enabled. If yes, then uncheck this option and restat IIS Admin Service.
- After that try to browse https://localhost/Microsoft-Server-ActiveSync
TSKC-IncAuthor Commented:
It is not redirected, but the is redirected to /owa.
Shreedhar EtteCommented:
- Please refer this article

and recreate Microsoft-Server-ActiveSync virtual directoy.
TSKC-IncAuthor Commented:
I did as you asked, but at the end when i tried to do "iisreset /noforce", as suggested by the tool, I've got the following error.

Attempting stop...
Restart attempt failed.
The service did not respond to the start or control request in a timely fashion.
 (2147943453, 8007041d)

I tried it twice and twice it failed with the same error. After that I just tried iisreset by itself and it finally did it. However, I still get the same error on my phone and the same Error 500.19 in the server's browser.
TSKC-IncAuthor Commented:
Almost after every iisreset (I've done many) it shows WAS error, an Event ID 5153 like this one:

Log Name:      System
Source:        Microsoft-Windows-WAS
Date:          4/3/2012 10:32:48 AM
Event ID:      5153
Task Category: None
Level:         Warning
Keywords:      Classic
User:          N/A
Computer:      xxxxx.xxxx.local
The Windows Process Activation Service (WAS) encountered an error attempting to look up the built in IIS_IUSRS group.  There may be problems in viewing and setting security permissions with the IIS_IUSRS group.  This happens if the machine has been joined and promoted to be a Domain Controller in a legacy domain.  Please see the online help for more information and solutions to this problem.  The data field contains the error number.
TSKC-IncAuthor Commented:
I've tried resetting the virtual directory one more time, but this time I've used:

iisreset /noforce /timeout:600

It did it after a minute or so without an error. However, that caused ActiveSync to completely stop working causing RPC to fail as well (Outlook's RPC over https). Then I did iisreset again, just by itself and it brought the ActiveSync/RPC back to life. Alas, my phone is still not happy.
Shreedhar EtteCommented:
- Are you able to browse https://localhost/Microsoft-Server-ActiveSync successfully?

- What the error you getting now on the mobile device?

- Also perfom test exhcnage connectovty test for activesync and post the details.
TSKC-IncAuthor Commented:
Thank you. I called MS Tech Support and in the middle of our conversation I found the cause myself and fixed it. Hopefully they'll refund the charges.

The fix:

In the Microsoft-Server-ActiveSync virtual directory there is a file called web.config. If the file contains these lines they should be deleted:

             <remove statusCode="501" subStatusCode="-1" />
             <error statusCode="501" prefixLanguageFilePath="C:\inetpub\custerr\de-DE" path="501.htm" responseMode="File" />

Open in new window

I've got clued in when I red the 500.19 error from one of the screen shots I posted here earlier. Once those lines were removed and iisreset was performed (twice) everything worked fine. Now I get a healthy response from the https://localhost/Microsoft-Server-ActiveSync asking me for the username and password. I had to do iisreset twice because after the first try the RPC over HTTPS failed to load properly and remote Outlooks were disconnected.

Thank you for trying to help and have a great day!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TSKC-IncAuthor Commented:
The solution permanently fixed the error in question and was validated by a Microsoft Tech Support specialist while I was with him on the phone. This is the paid-for incident level support by Microsoft, but i solved it myself at the end by simply paying attention to the error.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.