Unhandled Exceptions & Framesets

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Unhandled Exceptions & Framesets

    Hi,
    Question:
    When using Framesets and Server.Transfer in the
    Application_Error event handler is there a mechanism to
    get the error page to display in the total view of the
    browser not just in the offending frame?

    Overview:
    I have an application in which I am using framesets. When
    an Unhandled exception occurs I try to handle it
    gracefully by transfering to an error handling page as
    follows:

    Global.asax.cs...
    protected void Application_Error(Object sender, EventArgs
    e)
    {
    Server.Transfer("ErrorPage.aspx");
    }

    The problem is that the ErrorPage.aspx is only displayed
    in the offending frame not the complete window of the
    browser.

    Thanks in advance for your help!!!
    Terry
    terry Guest

  2. Similar Questions and Discussions

    1. An unhandled exception occurred during compilation using the CodeDomProvider
      Hi, Please see the following error and revert back as early as possible. I am getting this once I request for the asp.net page. Server Error in...
    2. PDDOCSAVE -throwing unhandled exception
      Hi Everybody, When i am using PDDOCSAVE in my application to secure a file using Acrobat 9.0 in VC++ i am getting unhandled exception The code...
    3. System.InvalidCastException was unhandled
      For whatever reason, I am getting an invalidcast exception on this piece of code: gApp = CreateObject("AcroExch.App") This is just part of the...
    4. Unhandled Exception: System.TypeInitializationException:
      On Running a managed exe i get the following error : Unhandled Exception: System.TypeInitializationException: The type initializer for...
    5. Unhandled Exception HELP!!
      I just dished out 900 bucks for Studio MX Everything else installed fine except for Fireworks MX 2004 ( the one I use the MOST ) At about 90% ...
  3. #2

    Default Re: Unhandled Exceptions & Framesets

    Hi

    You have to return a client script that redirects

    <script language="JavaScript">
    top.location.href = "errorpage.aspx";
    </script>

    --
    Best Regards
    Vidar Petursson
    ==============================
    Microsoft Internet Client & Controls MVP
    ==============================
    "terry" <terry_wahl@msn.com> wrote in message
    news:04fe01c34096$53e53c30$a001280a@phx.gbl...
    > Hi,
    > Question:
    > When using Framesets and Server.Transfer in the
    > Application_Error event handler is there a mechanism to
    > get the error page to display in the total view of the
    > browser not just in the offending frame?
    >
    > Overview:
    > I have an application in which I am using framesets. When
    > an Unhandled exception occurs I try to handle it
    > gracefully by transfering to an error handling page as
    > follows:
    >
    > Global.asax.cs...
    > protected void Application_Error(Object sender, EventArgs
    > e)
    > {
    > Server.Transfer("ErrorPage.aspx");
    > }
    >
    > The problem is that the ErrorPage.aspx is only displayed
    > in the offending frame not the complete window of the
    > browser.
    >
    > Thanks in advance for your help!!!
    > Terry

    Vidar Petursson Guest

  4. #3

    Default Re: Unhandled Exceptions & Framesets

    Hi,

    I tried the following...

    web.config files contains the entry:
    <customErrors mode="On"></customErrors>

    global.asax contains the following:
    protected void Application_Error(Object sender, EventArgs
    e)
    {
    System.Web.UI.Page page = (System.Web.UI.Page)
    HttpContext.Current.Handler;
    string script = "<script>";
    script += "top.location.href =
    \"ErrorPage.aspx\";";
    script += "</script>";
    page.RegisterStartupScript("OnStartup", script);

    }


    The ErrorPage.aspx is not being displayed but I am instead
    receving the standard Microsoft error page as below:


    Runtime Error
    Description: An application error occurred on the server.
    The current custom error settings for this application
    prevent the details of the application error from being
    viewed.

    Details: To enable the details of this specific error
    message to be viewable on the local server machine, please
    create a <customErrors> tag within a "web.config"
    configuration file located in the root directory of the
    current web application. This <customErrors> tag should
    then have its "mode" attribute set to "RemoteOnly". To
    enable the details to be viewable on remote machines,
    please set "mode" to "Off".


    <!-- Web.Config Configuration File -->

    <configuration>
    <system.web>
    <customErrors mode="RemoteOnly"/>
    </system.web>
    </configuration>


    Notes: The current error page you are seeing can be
    replaced by a custom error page by modifying
    the "defaultRedirect" attribute of the application's
    <customErrors> configuration tag to point to a custom
    error page URL.


    <!-- Web.Config Configuration File -->

    <configuration>
    <system.web>
    <customErrors mode="On"
    defaultRedirect="mycustompage.htm"/>
    </system.web>
    </configuration>












    >-----Original Message-----
    >Hi
    >
    >You have to return a client script that redirects
    >
    ><script language="JavaScript">
    >top.location.href = "errorpage.aspx";
    ></script>
    >
    >--
    >Best Regards
    > Vidar Petursson
    > ==============================
    >Microsoft Internet Client & Controls MVP
    > ==============================
    >"terry" <terry_wahl@msn.com> wrote in message
    >news:04fe01c34096$53e53c30$a001280a@phx.gbl...
    >> Hi,
    >> Question:
    >> When using Framesets and Server.Transfer in the
    >> Application_Error event handler is there a mechanism to
    >> get the error page to display in the total view of the
    >> browser not just in the offending frame?
    >>
    >> Overview:
    >> I have an application in which I am using framesets.
    When
    >> an Unhandled exception occurs I try to handle it
    >> gracefully by transfering to an error handling page as
    >> follows:
    >>
    >> Global.asax.cs...
    >> protected void Application_Error(Object sender,
    EventArgs
    >> e)
    >> {
    >> Server.Transfer("ErrorPage.aspx");
    >> }
    >>
    >> The problem is that the ErrorPage.aspx is only displayed
    >> in the offending frame not the complete window of the
    >> browser.
    >>
    >> Thanks in advance for your help!!!
    >> Terry
    >
    >
    >.
    >
    terry Guest

  5. #4

    Default Re: Unhandled Exceptions & Framesets

    Hello Terry,
    To open the window you can use the following script on onload Event:

    <script>
    window.open (" ErrorPage.aspx", "newwin", "fullscreen="yes");
    window.opener = self;
    self.close();
    </script>

    You will use the same method by registering the Script using the
    page.RegisterStartupScript.
    The script will be in the ErrorPage.aspx that you are opening. This code
    will open a new window for the error message
    and close the one that has frame.

    For reference:

    onload Event
    [url]http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/ref[/url]
    erence/events/onload.asp

    window Object
    [url]http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/ref[/url]
    erence/objects/obj_window.asp

    open Method
    [url]http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/ref[/url]
    erence/methods/open_0.asp

    Please let me know if this answers your question.

    Thanks,
    Bassel Tabbara
    Microsoft, ASP.NET

    This posting is provided "AS IS", with no warranties, and confers no rights.



    --------------------
    | Content-Class: urn:content-classes:message
    | From: "terry" <terry_wahl@msn.com>
    | Sender: "terry" <terry_wahl@msn.com>
    | References: <04fe01c34096$53e53c30$a001280a@phx.gbl>
    <OZF7e9KQDHA.1584@TK2MSFTNGP11.phx.gbl>
    | Subject: Re: Unhandled Exceptions & Framesets
    | Date: Wed, 2 Jul 2003 10:53:42 -0700
    | Lines: 128
    | Message-ID: <008601c340c2$dff75fb0$a501280a@phx.gbl>
    | MIME-Version: 1.0
    | Content-Type: text/plain;
    | charset="iso-8859-1"
    | Content-Transfer-Encoding: 7bit
    | X-Newsreader: Microsoft CDO for Windows 2000
    | Thread-Index: AcNAwt/3YeorCd18Roa9DzMnVw3LRQ==
    | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
    | Newsgroups: microsoft.public.dotnet.framework.aspnet
    | Path: cpmsftngxa09.phx.gbl
    | Xref: cpmsftngxa09.phx.gbl microsoft.public.dotnet.framework.aspnet:31800
    | NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    |
    | Hi,
    |
    | I tried the following...
    |
    | web.config files contains the entry:
    | <customErrors mode="On"></customErrors>
    |
    | global.asax contains the following:
    | protected void Application_Error(Object sender, EventArgs
    | e)
    | {
    | System.Web.UI.Page page = (System.Web.UI.Page)
    | HttpContext.Current.Handler;
    | string script = "<script>";
    | script += "top.location.href =
    | \"ErrorPage.aspx\";";
    | script += "</script>";
    | page.RegisterStartupScript("OnStartup", script);
    |
    | }
    |
    |
    | The ErrorPage.aspx is not being displayed but I am instead
    | receving the standard Microsoft error page as below:
    |
    |
    | Runtime Error
    | Description: An application error occurred on the server.
    | The current custom error settings for this application
    | prevent the details of the application error from being
    | viewed.
    |
    | Details: To enable the details of this specific error
    | message to be viewable on the local server machine, please
    | create a <customErrors> tag within a "web.config"
    | configuration file located in the root directory of the
    | current web application. This <customErrors> tag should
    | then have its "mode" attribute set to "RemoteOnly". To
    | enable the details to be viewable on remote machines,
    | please set "mode" to "Off".
    |
    |
    | <!-- Web.Config Configuration File -->
    |
    | <configuration>
    | <system.web>
    | <customErrors mode="RemoteOnly"/>
    | </system.web>
    | </configuration>
    |
    |
    | Notes: The current error page you are seeing can be
    | replaced by a custom error page by modifying
    | the "defaultRedirect" attribute of the application's
    | <customErrors> configuration tag to point to a custom
    | error page URL.
    |
    |
    | <!-- Web.Config Configuration File -->
    |
    | <configuration>
    | <system.web>
    | <customErrors mode="On"
    | defaultRedirect="mycustompage.htm"/>
    | </system.web>
    | </configuration>
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    | >-----Original Message-----
    | >Hi
    | >
    | >You have to return a client script that redirects
    | >
    | ><script language="JavaScript">
    | >top.location.href = "errorpage.aspx";
    | ></script>
    | >
    | >--
    | >Best Regards
    | > Vidar Petursson
    | > ==============================
    | >Microsoft Internet Client & Controls MVP
    | > ==============================
    | >"terry" <terry_wahl@msn.com> wrote in message
    | >news:04fe01c34096$53e53c30$a001280a@phx.gbl...
    | >> Hi,
    | >> Question:
    | >> When using Framesets and Server.Transfer in the
    | >> Application_Error event handler is there a mechanism to
    | >> get the error page to display in the total view of the
    | >> browser not just in the offending frame?
    | >>
    | >> Overview:
    | >> I have an application in which I am using framesets.
    | When
    | >> an Unhandled exception occurs I try to handle it
    | >> gracefully by transfering to an error handling page as
    | >> follows:
    | >>
    | >> Global.asax.cs...
    | >> protected void Application_Error(Object sender,
    | EventArgs
    | >> e)
    | >> {
    | >> Server.Transfer("ErrorPage.aspx");
    | >> }
    | >>
    | >> The problem is that the ErrorPage.aspx is only displayed
    | >> in the offending frame not the complete window of the
    | >> browser.
    | >>
    | >> Thanks in advance for your help!!!
    | >> Terry
    | >
    | >
    | >.
    | >
    |



    Bassel Tabbara [MSFT] Guest

  6. #5

    Default Re: Unhandled Exceptions & Framesets

    Hi Bassel,

    Thanks for your reply. I have not tried this yet but I
    want to make sure that we are both on the same page.

    My goal is that I have an application making use of
    Framesets. When an Unhandled exception occurs I would
    like to display a custom error page (a page I create) in
    the same browser as the original application but display
    in the full view of the browser not just in the offending
    frame (which appears to be the default). Will this
    accomplish this?

    Thanks again, I really appreciate your help.
    Terry
    >-----Original Message-----
    >Hello Terry,
    >To open the window you can use the following script on
    onload Event:
    >
    > <script>
    > window.open ("
    ErrorPage.aspx", "newwin", "fullscreen="yes");
    > window.opener = self;
    > self.close();
    > </script>
    >
    >You will use the same method by registering the Script
    using the
    >page.RegisterStartupScript.
    >The script will be in the ErrorPage.aspx that you are
    opening. This code
    >will open a new window for the error message
    >and close the one that has frame.
    >
    >For reference:
    >
    >onload Event
    >[url]http://msdn.microsoft.com/library/default.asp?[/url]
    url=/workshop/author/dhtml/ref
    >erence/events/onload.asp
    >
    >window Object
    >[url]http://msdn.microsoft.com/library/default.asp?[/url]
    url=/workshop/author/dhtml/ref
    >erence/objects/obj_window.asp
    >
    >open Method
    >[url]http://msdn.microsoft.com/library/default.asp?[/url]
    url=/workshop/author/dhtml/ref
    >erence/methods/open_0.asp
    >
    >Please let me know if this answers your question.
    >
    >Thanks,
    >Bassel Tabbara
    >Microsoft, ASP.NET
    >
    >This posting is provided "AS IS", with no warranties, and
    confers no rights.
    >
    >
    >
    >--------------------
    >| Content-Class: urn:content-classes:message
    >| From: "terry" <terry_wahl@msn.com>
    >| Sender: "terry" <terry_wahl@msn.com>
    >| References: <04fe01c34096$53e53c30$a001280a@phx.gbl>
    ><OZF7e9KQDHA.1584@TK2MSFTNGP11.phx.gbl>
    >| Subject: Re: Unhandled Exceptions & Framesets
    >| Date: Wed, 2 Jul 2003 10:53:42 -0700
    >| Lines: 128
    >| Message-ID: <008601c340c2$dff75fb0$a501280a@phx.gbl>
    >| MIME-Version: 1.0
    >| Content-Type: text/plain;
    >| charset="iso-8859-1"
    >| Content-Transfer-Encoding: 7bit
    >| X-Newsreader: Microsoft CDO for Windows 2000
    >| Thread-Index: AcNAwt/3YeorCd18Roa9DzMnVw3LRQ==
    >| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
    >| Newsgroups: microsoft.public.dotnet.framework.aspnet
    >| Path: cpmsftngxa09.phx.gbl
    >| Xref: cpmsftngxa09.phx.gbl
    microsoft.public.dotnet.framework.aspnet:31800
    >| NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
    >| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    >|
    >| Hi,
    >|
    >| I tried the following...
    >|
    >| web.config files contains the entry:
    >| <customErrors mode="On"></customErrors>
    >|
    >| global.asax contains the following:
    >| protected void Application_Error(Object sender,
    EventArgs
    >| e)
    >| {
    >| System.Web.UI.Page page = (System.Web.UI.Page)
    >| HttpContext.Current.Handler;
    >| string script = "<script>";
    >| script += "top.location.href =
    >| \"ErrorPage.aspx\";";
    >| script += "</script>";
    >| page.RegisterStartupScript("OnStartup", script);
    >|
    >| }
    >|
    >|
    >| The ErrorPage.aspx is not being displayed but I am
    instead
    >| receving the standard Microsoft error page as below:
    >|
    >|
    >| Runtime Error
    >| Description: An application error occurred on the
    server.
    >| The current custom error settings for this application
    >| prevent the details of the application error from being
    >| viewed.
    >|
    >| Details: To enable the details of this specific error
    >| message to be viewable on the local server machine,
    please
    >| create a <customErrors> tag within a "web.config"
    >| configuration file located in the root directory of the
    >| current web application. This <customErrors> tag should
    >| then have its "mode" attribute set to "RemoteOnly". To
    >| enable the details to be viewable on remote machines,
    >| please set "mode" to "Off".
    >|
    >|
    >| <!-- Web.Config Configuration File -->
    >|
    >| <configuration>
    >| <system.web>
    >| <customErrors mode="RemoteOnly"/>
    >| </system.web>
    >| </configuration>
    >|
    >|
    >| Notes: The current error page you are seeing can be
    >| replaced by a custom error page by modifying
    >| the "defaultRedirect" attribute of the application's
    >| <customErrors> configuration tag to point to a custom
    >| error page URL.
    >|
    >|
    >| <!-- Web.Config Configuration File -->
    >|
    >| <configuration>
    >| <system.web>
    >| <customErrors mode="On"
    >| defaultRedirect="mycustompage.htm"/>
    >| </system.web>
    >| </configuration>
    >|
    >|
    >|
    >|
    >|
    >|
    >|
    >|
    >|
    >|
    >|
    >|
    >|
    >| >-----Original Message-----
    >| >Hi
    >| >
    >| >You have to return a client script that redirects
    >| >
    >| ><script language="JavaScript">
    >| >top.location.href = "errorpage.aspx";
    >| ></script>
    >| >
    >| >--
    >| >Best Regards
    >| > Vidar Petursson
    >| > ==============================
    >| >Microsoft Internet Client & Controls MVP
    >| > ==============================
    >| >"terry" <terry_wahl@msn.com> wrote in message
    >| >news:04fe01c34096$53e53c30$a001280a@phx.gbl...
    >| >> Hi,
    >| >> Question:
    >| >> When using Framesets and Server.Transfer in the
    >| >> Application_Error event handler is there a mechanism
    to
    >| >> get the error page to display in the total view of
    the
    >| >> browser not just in the offending frame?
    >| >>
    >| >> Overview:
    >| >> I have an application in which I am using
    framesets.
    >| When
    >| >> an Unhandled exception occurs I try to handle it
    >| >> gracefully by transfering to an error handling page
    as
    >| >> follows:
    >| >>
    >| >> Global.asax.cs...
    >| >> protected void Application_Error(Object sender,
    >| EventArgs
    >| >> e)
    >| >> {
    >| >> Server.Transfer("ErrorPage.aspx");
    >| >> }
    >| >>
    >| >> The problem is that the ErrorPage.aspx is only
    displayed
    >| >> in the offending frame not the complete window of the
    >| >> browser.
    >| >>
    >| >> Thanks in advance for your help!!!
    >| >> Terry
    >| >
    >| >
    >| >.
    >| >
    >|
    >
    >
    >
    >.
    >
    terry Guest

  7. #6

    Default Re: Unhandled Exceptions & Framesets

    Hello Terry,
    Well you can put a link which specify to open the page in the same window
    as full opened in the same window.
    The method that I described earlier is that you need to open a new window
    since you have to use Window.Open.

    Please let me know if you are not satisfied with this solution.

    Thanks,
    Bassel Tabbara
    Microsoft, ASP.NET

    This posting is provided "AS IS", with no warranties, and confers no rights.


    --------------------
    | Content-Class: urn:content-classes:message
    | From: "terry" <terry_wahl@msn.com>
    | Sender: "terry" <terry_wahl@msn.com>
    | References: <04fe01c34096$53e53c30$a001280a@phx.gbl>
    <OZF7e9KQDHA.1584@TK2MSFTNGP11.phx.gbl>
    <008601c340c2$dff75fb0$a501280a@phx.gbl>
    <TQ4al$MQDHA.2416@cpmsftngxa09.phx.gbl>
    | Subject: Re: Unhandled Exceptions & Framesets
    | Date: Wed, 2 Jul 2003 14:05:51 -0700
    | Lines: 231
    | Message-ID: <480701c340dd$b83384c0$a401280a@phx.gbl>
    | MIME-Version: 1.0
    | Content-Type: text/plain;
    | charset="iso-8859-1"
    | Content-Transfer-Encoding: 7bit
    | X-Newsreader: Microsoft CDO for Windows 2000
    | Thread-Index: AcNA3bgsaQw2Y1BJSVyw5Ci5Cc/+yQ==
    | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
    | Newsgroups: microsoft.public.dotnet.framework.aspnet
    | Path: cpmsftngxa09.phx.gbl
    | Xref: cpmsftngxa09.phx.gbl microsoft.public.dotnet.framework.aspnet:31851
    | NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    |
    | Hi Bassel,
    |
    | Thanks for your reply. I have not tried this yet but I
    | want to make sure that we are both on the same page.
    |
    | My goal is that I have an application making use of
    | Framesets. When an Unhandled exception occurs I would
    | like to display a custom error page (a page I create) in
    | the same browser as the original application but display
    | in the full view of the browser not just in the offending
    | frame (which appears to be the default). Will this
    | accomplish this?
    |
    | Thanks again, I really appreciate your help.
    | Terry
    |
    | >-----Original Message-----
    | >Hello Terry,
    | >To open the window you can use the following script on
    | onload Event:
    | >
    | > <script>
    | > window.open ("
    | ErrorPage.aspx", "newwin", "fullscreen="yes");
    | > window.opener = self;
    | > self.close();
    | > </script>
    | >
    | >You will use the same method by registering the Script
    | using the
    | >page.RegisterStartupScript.
    | >The script will be in the ErrorPage.aspx that you are
    | opening. This code
    | >will open a new window for the error message
    | >and close the one that has frame.
    | >
    | >For reference:
    | >
    | >onload Event
    | >[url]http://msdn.microsoft.com/library/default.asp?[/url]
    | url=/workshop/author/dhtml/ref
    | >erence/events/onload.asp
    | >
    | >window Object
    | >[url]http://msdn.microsoft.com/library/default.asp?[/url]
    | url=/workshop/author/dhtml/ref
    | >erence/objects/obj_window.asp
    | >
    | >open Method
    | >[url]http://msdn.microsoft.com/library/default.asp?[/url]
    | url=/workshop/author/dhtml/ref
    | >erence/methods/open_0.asp
    | >
    | >Please let me know if this answers your question.
    | >
    | >Thanks,
    | >Bassel Tabbara
    | >Microsoft, ASP.NET
    | >
    | >This posting is provided "AS IS", with no warranties, and
    | confers no rights.
    | >
    | >
    | >
    | >--------------------
    | >| Content-Class: urn:content-classes:message
    | >| From: "terry" <terry_wahl@msn.com>
    | >| Sender: "terry" <terry_wahl@msn.com>
    | >| References: <04fe01c34096$53e53c30$a001280a@phx.gbl>
    | ><OZF7e9KQDHA.1584@TK2MSFTNGP11.phx.gbl>
    | >| Subject: Re: Unhandled Exceptions & Framesets
    | >| Date: Wed, 2 Jul 2003 10:53:42 -0700
    | >| Lines: 128
    | >| Message-ID: <008601c340c2$dff75fb0$a501280a@phx.gbl>
    | >| MIME-Version: 1.0
    | >| Content-Type: text/plain;
    | >| charset="iso-8859-1"
    | >| Content-Transfer-Encoding: 7bit
    | >| X-Newsreader: Microsoft CDO for Windows 2000
    | >| Thread-Index: AcNAwt/3YeorCd18Roa9DzMnVw3LRQ==
    | >| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
    | >| Newsgroups: microsoft.public.dotnet.framework.aspnet
    | >| Path: cpmsftngxa09.phx.gbl
    | >| Xref: cpmsftngxa09.phx.gbl
    | microsoft.public.dotnet.framework.aspnet:31800
    | >| NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
    | >| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    | >|
    | >| Hi,
    | >|
    | >| I tried the following...
    | >|
    | >| web.config files contains the entry:
    | >| <customErrors mode="On"></customErrors>
    | >|
    | >| global.asax contains the following:
    | >| protected void Application_Error(Object sender,
    | EventArgs
    | >| e)
    | >| {
    | >| System.Web.UI.Page page = (System.Web.UI.Page)
    | >| HttpContext.Current.Handler;
    | >| string script = "<script>";
    | >| script += "top.location.href =
    | >| \"ErrorPage.aspx\";";
    | >| script += "</script>";
    | >| page.RegisterStartupScript("OnStartup", script);
    | >|
    | >| }
    | >|
    | >|
    | >| The ErrorPage.aspx is not being displayed but I am
    | instead
    | >| receving the standard Microsoft error page as below:
    | >|
    | >|
    | >| Runtime Error
    | >| Description: An application error occurred on the
    | server.
    | >| The current custom error settings for this application
    | >| prevent the details of the application error from being
    | >| viewed.
    | >|
    | >| Details: To enable the details of this specific error
    | >| message to be viewable on the local server machine,
    | please
    | >| create a <customErrors> tag within a "web.config"
    | >| configuration file located in the root directory of the
    | >| current web application. This <customErrors> tag should
    | >| then have its "mode" attribute set to "RemoteOnly". To
    | >| enable the details to be viewable on remote machines,
    | >| please set "mode" to "Off".
    | >|
    | >|
    | >| <!-- Web.Config Configuration File -->
    | >|
    | >| <configuration>
    | >| <system.web>
    | >| <customErrors mode="RemoteOnly"/>
    | >| </system.web>
    | >| </configuration>
    | >|
    | >|
    | >| Notes: The current error page you are seeing can be
    | >| replaced by a custom error page by modifying
    | >| the "defaultRedirect" attribute of the application's
    | >| <customErrors> configuration tag to point to a custom
    | >| error page URL.
    | >|
    | >|
    | >| <!-- Web.Config Configuration File -->
    | >|
    | >| <configuration>
    | >| <system.web>
    | >| <customErrors mode="On"
    | >| defaultRedirect="mycustompage.htm"/>
    | >| </system.web>
    | >| </configuration>
    | >|
    | >|
    | >|
    | >|
    | >|
    | >|
    | >|
    | >|
    | >|
    | >|
    | >|
    | >|
    | >|
    | >| >-----Original Message-----
    | >| >Hi
    | >| >
    | >| >You have to return a client script that redirects
    | >| >
    | >| ><script language="JavaScript">
    | >| >top.location.href = "errorpage.aspx";
    | >| ></script>
    | >| >
    | >| >--
    | >| >Best Regards
    | >| > Vidar Petursson
    | >| > ==============================
    | >| >Microsoft Internet Client & Controls MVP
    | >| > ==============================
    | >| >"terry" <terry_wahl@msn.com> wrote in message
    | >| >news:04fe01c34096$53e53c30$a001280a@phx.gbl...
    | >| >> Hi,
    | >| >> Question:
    | >| >> When using Framesets and Server.Transfer in the
    | >| >> Application_Error event handler is there a mechanism
    | to
    | >| >> get the error page to display in the total view of
    | the
    | >| >> browser not just in the offending frame?
    | >| >>
    | >| >> Overview:
    | >| >> I have an application in which I am using
    | framesets.
    | >| When
    | >| >> an Unhandled exception occurs I try to handle it
    | >| >> gracefully by transfering to an error handling page
    | as
    | >| >> follows:
    | >| >>
    | >| >> Global.asax.cs...
    | >| >> protected void Application_Error(Object sender,
    | >| EventArgs
    | >| >> e)
    | >| >> {
    | >| >> Server.Transfer("ErrorPage.aspx");
    | >| >> }
    | >| >>
    | >| >> The problem is that the ErrorPage.aspx is only
    | displayed
    | >| >> in the offending frame not the complete window of the
    | >| >> browser.
    | >| >>
    | >| >> Thanks in advance for your help!!!
    | >| >> Terry
    | >| >
    | >| >
    | >| >.
    | >| >
    | >|
    | >
    | >
    | >
    | >.
    | >
    |


    Bassel Tabbara [MSFT] Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139