We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

Server.GetLastError() not working on IIS8.5RSS

1 reply

Last post Jul 18, 2018 02:58 AM by deepakpanchal10

  • Server.GetLastError() not working on IIS8.5

    Jul 17, 2018 05:29 PM|osbornj6|LINK

    I've got an old, Classic ASP application that is now running on Windows 2012R2 under IIS8.5.  I've created a custom page to handle 500 errors, and used httpErrors configuration to reference it when an error occurs in any of the .asp pages within the application.

    However, when the custom pages executes and attempts to retrieve the details of the last error with Server.GetLastError(), it is essentially blank, so I can write nothing useful to a local logfile or in any Email.

    I've spent hours looking for useful "hits" from search engines, but so far I've not managed to find a working solution to this, despite many different attempts and clues, usually from people who encountered this when they first migrated from IIS6 to II7.

    Would appreciate any useful tips or pointers, especially with reference to to configuration in the relevant XML files.  Thanks in advance.

  • Re: Server.GetLastError() not working on IIS8.5

    Jul 18, 2018 02:58 AM|deepakpanchal10|LINK

    Hi osbornj6,

    I try to refer the documentation for Server.GetLastError Method and find that is for IIS 6.

    Then after there is no any other documentation was published.

    I also try to check some older threads but no one are using IIS 8.5.

    1. Server.GetLastError() is null in IIS 7.5 ASP.NET 3.5 SP1 (I have tried redirectMode="ResponseRewrite")
    2. Classic ASP and Server.GetLastError in IIS7
    3. server.getlasterror() not returning values

    So at present I am not sure that whether it supports IIS 8.5 or not.

    I will try to make a test and let you know about my testing results, Once I finished the testing.

    Thanks for your understanding.

    Regards

    Deepak

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.