2016-04-10 10 views
5

Mam następujące ustawienia w moim pliku web.config do obsługi błędów:Jak zatrzymać Azure IIS Dołączanie error Code Query String

<httpErrors errorMode="Custom" existingResponse="Replace"> 
    <remove statusCode="500" /> 
    <error statusCode="500" responseMode="ExecuteURL" path="/error/internalservererror/" /> 
</httpErrors> 

Kiedy wyjątek w moim app działa prawidłowo lokalnie, ale to przekierowuje na następujący adres URL w bŁĘDÓW strony w błękicie (zauważ, że strona rzuciłem wyjątek od jest na końcu adresu URL:

https://example.com/error/internalservererror/?500;https://example.com/error/internalservererror/?500;https://example.com/error/internalservererror/?500;https://example.com/error/internalservererror/?500;https://example.com/error/internalservererror/?500;https://example.com/error/internalservererror/?500;https://example.com/error/internalservererror/?500;https://example.com/error/internalservererror/?500;https://example.com/error/internalservererror/?500;https://example.com/error/internalservererror/?500;https://example.com/error/internalservererror/?500;https://example.com/error/internalservererror/?500;https://example.com/error/internalservererror/?500;https://example.com/error/internalservererror/?500;https://example.com/error/internalservererror/?500;https://example.com/error/internalservererror/?500;https://example.com/error/internalservererror/?500;https://example.com/error/internalservererror/?500;https://example.com/error/internalservererror/?500;https://example.com/error/internalservererror/?500;https://example.com/error/internalservererror/?500;https://example.com/about/

Jak zatrzymać usługi IIS przed wyłudzaniem tego zachowania na platformie Azure?

+0

prostu próbowałem konfiguracji ale nie można odtworzyć ten problem, zarówno działać poprawnie, gdy uruchomiony lokalnie i opublikowane na błękitnym tle. Zastanawiam się, czy masz inne zasady przekierowania na IIS? – forester123

Odpowiedz

1

Wystarczy dodać znak zapytania na końcu parametru ścieżki, przy użyciu kodu można mieć coś takiego:

<httpErrors errorMode="Custom" existingResponse="Replace"> 
    <remove statusCode="500" /> 
    <error statusCode="500" responseMode="ExecuteURL" path="/error/internalservererror/?" /> 
</httpErrors> 
+0

Nie mogę rozwiązać problemu z tą odpowiedzią? Używam szablonu MVC 5 Boilerplate Rehana. Jakieś sugestie? – zbarrier

+0

To nie działa. –

+0

jaka jest logika tego? przy okazji nie działa. –

Powiązane problemy