![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | IIS HTTP Error Code: 404 Hi, In asp.net 1.1 i m using response.redirect("a.pdf") but if file is not present then HTTP error 404 "Page not found" is displayed is there any way I can control it using web.config or global.asa I am aware it can be controlled using IIS -- virtual directory - custom error tab but being complex application i cannot set IIS virtual directory custom pages. I am trying following code but it is not working: * * * * aspx: * * * * <form id="Form1" method="post" runat="server"> <asp:Button id="Button1" style="Z-INDEX: 101; LEFT: 181px; POSITION: absolute; TOP: 104px" runat="server" Text="Button"></asp:Button> </form> * * * * vb code: * * * * Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here If Page.IsPostBack Then Response.Redirect("a.pdf", False) End If End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click End Sub * * * * web.config: * * * * <customErrors mode="RemoteOnly" defaultRedirect="PageNotFound.aspx" /> Request to let me know why HTTP 404 error code is not trapped in above code. Regards, Amit |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Free Source Code + Interview Question(http://www.sourcecode4you.com/) | .NET General | |||
| Errors- HTTP, Terminal Services, TBS, DPS, UAC, Code Integrity, WM | Vista General | |||
| Error Code 80048820; extended error code 80048439 | Live Messenger | |||
| Certain emails not displaying http code properly | Vista mail | |||
| have any example code for reading HTTP status codes and headers? | PowerShell | |||