0

I have a ASP.NET Web Form site, in which I blended ASP.NET MVC so now we have ASP.NET Web Forms and ASP.NET MVC both on this site

If I have a error on Web Forms page it shows regular yellow error page But When I am accessing MVC page and it throws 500 error, it renders all as this Unicode characters.

How can I fix this?

��{sڸ��3����.�%晤�ܼz�L�f�l;w�Nl�5�W�I��~�{�d��!}m�Ild�u$���/�o���{~Bz��5�?kDW�F�Q'��ߕ�<�|G����>W�͈z��h��9��ćk�H �5 fX�t������e�j���W�W����z��6��_6H!9\��=��ΐ|�����ް�� ��t��[o������E�z�I����.��m�qQk{��\��$�KM�S�u�-Ń����Nʺ�6���)�����򥗁��� ��IVG$Ab�� ��S�q_r�ʍ����vJL�ȟq�ˀ�,I��)j�z@������ N�\�m��\(F��c>CX~I O�����3+v��fsA�������LHxD�D��'{0!8��\��J�~�����T����m{2�9�&P�:� �Hf��p _z@�>a����R"m��O�1��静P5�S��6ɗ��u�VQ�Aߎ�ok�����m�UlK;���n ��G߂%����aR��e���#[���-�z��L�B�Ţ�:W��ڄ�kP���� P�o6NK�K&��D����o���Ax���d5z�H�_*�E0L�K�A���l�Q:3z�&i��'S������q�.F�{�7�K�<9e ����?�g�^��%����y"�d��k��䘁���̊F��<�I�c�y�;؝��3�mHL'N(r�c�١y�� ��y��D�?C&�E�=F%��$�nR��$J�20 �s�����h��ʰ���@��1�.�?�@�f�f���4�OFjÊ�zҨ~9����� ���p٨g�,��l������2�V�4��Q��ځ�mo4'G�Ab�Q�;���ڰـ٨ex �T;��y�aj�s���lu�bN%��\�{��r6G�wG�aΛ6�C 5�>/kI9T@���A�}S�Aq׽�����s�ˏ�0D����b�Q�;]R�|���������+�OY�1�rwd�/wVK3��l�įg��Ǻ��� �!��'O�7x�,c ��a��޴� ��p8n�lZW��+Un��(��逈�UHs%�N;�0�R�0}bD� FbfJ������#W ��h҃.L�kX>�i����V*vmԄ�pLe�ͩp�[��c8������a(��R��]׾~���0��C˖(��-���O��8/O�K�f�0�|����2�����<�Q3�RX�O���U�C�5n�T���ɫз?���}��$�W��ogx˚��Th��R����o>�8F�0+�����?Z֫�/f�.T �y��Y9n���-+�,����F �ގѣ��Co��=��<.CX��d����|$ढ़r����l[6ϙ�t��Bِ��F��E{�5A;�L�R5����0ǰ�w<����7�+jɓֱ��S1��份��xL�pn�[�\��/&����N5���*����,qq5:d�1 �е'�Dʤ �0�on*{���v�d�)B���H��X!f}�v����D1�#E��6��qL�S�:���|��.��d������A�����a��3v��|���HY�c�l����݁�n�ed��a�Ӽ�Ã�;�ϴ���l�H;�778O=:<�����<�k'�ݽ�4�Je:&��6�9�登4G+-p��~̀KXen�fй�(�ӽ�dk7�,O�4��=��ɽ:7�ݳ��-�Gp��͚���$�]�k����]�,f�w�u�3���v��/���ɑ�s��t{�M��K>Zs�upk.�®l͹"�g�T�ZSdAf���Nu�(�6�M۰G�0e��{�79 eN�K?ΜHX�M�6W���PK墄�Ј�/�2M����sG��]�+�Dz�ޏ�/΅���HB�&�^���.����S���#�n�}N���=�� :��)r������v�Z��L�9j�L�%taq\� b�('TQ�[\�vV���e�^��]6��4��s�#���n�)�ݴ|������BH�Y�Ĕ\y}$%��?ހ��5��Zx� X�@mvu�?d*�ܓ�|����vo�׽�E���g�M #ְ/J��}��3�R�gq������:�%�|�:K���ǃ�uUT�b:J݉]п�@�Yf$����w0�O�k���˷��v;u���Q�G�@�w���ݘHc����jZ2ʨp��3u/�H�v.��"m�QN|�� ��b]iwN%�Z�T�{��=U랪uOպ%�uh���I��T,H���x��d������j�2�JM�F���$1�6�t�}A�"Y���s�|m��o#��A��u����E������D�t�ڂK�Q�zsrE^!JA"$V�ZE�R��������Əv�R��U�ak�o#tk��/�x���H���"̈́����(�W��2�qAXQL��yR1��{iY#t���h*����El�'pQ����'7�5��_�踖x��:���ܒ���]x�:#�0��XԌ�H�#Ls������8#E�21 2P;�{�Lk��%v��u�/�uZ�˥��v�S�Q�eͼ��<��~�XYZ�Ħ�1]�i>��-{��X�^��͛�j��~���W�����44R�8͇�p~:�V湟��U+���?�����?���j�4\l���-�N�B�=��Ռ@UW=WF�<�� �ǟh�Ʉ�X��3�����Oֵ�MC8J�/�:n7��S���%&�\�?k�3�!� ��K�i�R�~I����x��l�o���t�p���'�"���s����0��bт;��}2��e(%-����<��NV

I do have META tag in my layout page

<meta charset="utf-8" />

1 Answer 1

1

It looks like the error page is served as gziped content by your webserver but you are missing the Content-Encoding response header to indicate to the user agent that he needs to decompress the stream before displaying it.

Try clearing response filters in your Application_Error method in global.asax:

protected void Application_Error(object sender, EventArgs e)
{
    Response.Filter = null;
    ...
}

Rick Strahl wrote a very detailed blog post about what is happening here.

Sign up to request clarification or add additional context in comments.

1 Comment

That helped. Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.