Hi,
I'm trying to redirect to a new page but I'm getting the error I mentioned above. I'm passing strings in my redirect. It seems the problem is when there is an \n - sign in the error message or stacktrace. From research in the web I saw that a fix is:
1)Create a new webform: error.aspx
2)Use Server.Transfer("error.aspx")
3)In the error.aspx page access the error as Server.GetLastError()
This last step is what I did not understand. In error.aspx inside of Page_Load I added "Server.GetLastError()".
I run the code and I do not get an error anymore but I just get a blank page. nothing gets re-directed. Any suggestions?
Thanks!
I'm trying to redirect to a new page but I'm getting the error I mentioned above. I'm passing strings in my redirect. It seems the problem is when there is an \n - sign in the error message or stacktrace. From research in the web I saw that a fix is:
1)Create a new webform: error.aspx
2)Use Server.Transfer("error.aspx")
3)In the error.aspx page access the error as Server.GetLastError()
This last step is what I did not understand. In error.aspx inside of Page_Load I added "Server.GetLastError()".
I run the code and I do not get an error anymore but I just get a blank page. nothing gets re-directed. Any suggestions?
Thanks!