After Microsoft has rolled out a stable version of Windows 8.1 I wanted to have it installed on all my computers. The update went smoothly on my home desktop and a tablet but I had problems on a PC at work – the Store application could not connect to the Internet and I kept getting an error message: We weren’t able to connect to the Store. This might have happened because of a server problem or the network connection timed out. Please wait a few minutes and try again.. I was not able to find a solution on Google so I started my own investigation.
There were some error messages in Application Event Log, but they didn’t say much about what’s wrong. So I checked the Windows Store application log (C:\Users\admin\AppData\Local\Packages\WinStore_cw5n1h2txyewy\AC\Temp\winstore.log) and found few interesting lines:
2013-10-18 07:18:33.046, _Info_ WS [00002384:00009404] CSQRProvider::GetData: Entering for selector DiscoveryService. 2013-10-18 07:18:33.046, _Info_ WS [00002384:00009404] CHttpRequest::_CreateConnectionAndSendRequest: Server: go.microsoft.com, URL /fwlink/?LinkID=195324&clcid=0x409 2013-10-18 07:18:33.066, _Error_ WS [00002384:00009404] CHttpConnectionCache::_CreateSession: WinHttpOpen failed: 5 2013-10-18 07:18:33.066, _Error_ WS [00002384:00009404] CHttpRequest::FetchResource: _CreateConnectionAndSendRequest failed: 0x80070005
0x80070005 code identifies an Access Denied error. Still, I didn’t know why
WinHttpOpen was returning it. My next step was to run Process Monitor and look for Access Denied result codes. This is what I noticed:
Now everything started to make sense: WinHttpOpen couldn’t succeed because it wasn’t able to read the Internet settings (such as proxy configuration etc.). I compared permissions set on the HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings registry key between my home desktop and the work PC and found one difference. My work PC was missing read rights for ALL APPLICATION PACKAGES group (SID: S-1-15-2-1, more information here). This SID is used by applications that are running using web context (hosted by WWAHost.exe) when they access system resources. After adding read permissions for this group Windows Store started running correctly and I was able to update to 8.1 🙂 You may ask why my registry was badly configured. The answer could be found in a report generated by gpresult:
gpresult /h c:\temp\gpreport.html. The policies applied by my company Domain Controllers altered the default registry permissions on the Internet Settings key. Administrators apparently forgot about Windows 8 systems that are part of their domain and propagated settings for older versions of Windows.
To summarize, if you ever run into connectivity issues in Windows Store apps, make sure that you have valid permissions set for ALL APPLICATION PACKAGES group on system folders and registry keys (all valid permissions can be found here).