I was working on deploying applications to the users when I came across an error Cannot connect to the application server. This error was a surprise to me as there were no changes done on Configuration Manager server (as far as i knew). I had no idea why this error came up. When the user launched the software center, and clicked on find additional applications from the Application Catalog, there was an error. “Cannot connect to the application server. The website cannot communicate with the server. This might be a temporary problem. Try again later to see if the problem has been corrected. If this problem continues, contact your help desk”.
Fix Cannot Connect to the Application Server Error
Anyone looking to troubleshoot this issue should start looking at component status first. I checked Monitoring > System Status > Component Status to see if there were any errors on SMS_PORTALWEB_CONTROL_MANAGER and SMS_AWEBSVC_CONTROL_MANAGER. I found that SMS_AWEBSVC_CONTROL_MANAGER had errors. Upon checking status message details, the error description was
Application Web Service Control Manager detected AWEBSVC is not responding to HTTP requests. The http status code and text is 500, Internal Server Error.
Possible cause: Internet Information Services (IIS) isn’t configured to listen on the ports over which AWEBSVC is configured to communicate.
Solution: Verify that the designated Web Site is configured to use the same ports which AWEBSVC is configured to use.
Possible cause: The designated Web Site is disabled in IIS.
Solution: Verify that the designated Web Site is enabled, and functioning properly. For more information, refer to Microsoft Knowledge Base.
Next, I checked the log file SMSAWEBSVCSetup.log and found no errors. In most of the cases status code 500 for the Application Catalog web service role is seen when there are problems with IIS or .NET configuration.
When I opened the Application Catalog I found the error cannot connect to the application server.
In most of the forums, it is suggested to remove the Application Catalog website point and Application Catalog web service point and reinstall them. For me the below solution fixed the issue and removing the roles was not required.
To fix this you need to enable or activate .NET 4.0. On a 64-bit computer that runs the .NET Framework version 4.0.30319, launch the command prompt as administrator and run the following command :
%windir%/Microsoft.NET/Framework64/v4.0.30319/aspnet_regiis.exe /i –enable
You could also change the path to the folder v4.0.30319 and run the command aspnet_regiis.exe /i –enable
After executing the above command, restart the IIS using iisreset command.
Now open the Application Catalog, there should be no errors.

If the above steps did not fix the issue and if something else worked, please post it in the comments section. If you face similar issues then you need not worry, you are just one step away from the Community Forums :).
Still Need Help?
If you need further assistance on the above article or want to discuss other technical issues, check out some of these options.