Tuesday, 15 November 2016

502 - Web server received an invalid response while acting as a gateway or proxy server.

I had a problem in an ASP.Net web application hosted on IIS 8.0 and there was ARR server to load balance requests.

The error was as follows, sometimes when I hit the URL the below error appears and when I refresh the page the error disappears.

502 - Web server received an invalid response while acting as a gateway or proxy server. There is a problem with the page you are looking for, and it cannot be displayed.

When investigating the issue I found that it was happening randomly and happened always for long requests (when I upload a file or requesting heavy pages).
After lots of searching I found that the error code is 502.2 which related to 
  • 502.2 - Bad gateway: Premature Exit.
as per Microsoft error codes for IIS in the below link 

And the solution was very simple, Just increase the ARR request timeout as the below screenshots




Important Note: If you are using IIS 7.0 or 7.5 you can take a loot at the below hotfixes from Microsoft, would be helpful

Tuesday, 18 October 2016

[IE] Internet Explorer keep asking for user credentials


I had an issue in my company's product which is Internet Explorer was asking about user credentials on every request.
Despite the user is submitting the correct username and password but IE was asking again about it.
The issue was happening on IE and firefox however it was working fine with google chrome.
The issue was in loop back check, it had to be disabled for the site URL.
The below article helped me a lot in this fix, hope it'll be helpful for you.

https://blogs.technet.microsoft.com/sharepoint_foxhole/2010/06/21/disableloopbackcheck-lets-do-it-the-right-way/


Best Regards,
Ahmed Gamal

Tuesday, 31 May 2016

Error while deploying WSP on SharePoint

The below error appeared when I was deploying Exam Expert WSP.

Some of the files failed to copy during deployment of the solution

I was deploying using -GacDeployment and -Force parameters and failed however when I tried to deploy this dll to GAC it had no problems.

The problem was in SharePoint Timer and Administration services, for some reasons they were not able to perform this operation.
After restarting these services, everything went well.
SharePoint Administration Service
SharePoint Timer Service

Monday, 28 March 2016

IE: No save option when clicking on downloadable link

Problem: 
When clicking on any file (specially office files) using IE the tool bar shows open/cancel options only and no save button is there

Solution: 
The idea is that IE for unknown reason shows Open/Cancel dialog instead of Save/Open/Cancel dialog.
There's a solution in which Save/Cancel dialog will be appeared instead of Open/Cancel dialog.
It's done by adding additional response header "X-Download-Options: noopen".

By using this header we force IE to hide Open option in the dialog so it shows Save button instead of it.


Regards,
Gamal