Unhandled Exceptions & Framesets

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • terry

    Unhandled Exceptions & Framesets

    Hi,
    Question:
    When using Framesets and Server.Transfer in the
    Application_Err or 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_Err or(Object sender, EventArgs
    e)
    {
    Server.Transfer ("ErrorPage.asp x");
    }

    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

    #2
    Re: Unhandled Exceptions & Framesets

    Hi

    You have to return a client script that redirects

    <script language="JavaS cript">
    top.location.hr ef = "errorpage.aspx ";
    </script>

    --
    Best Regards
    Vidar Petursson
    =============== ===============
    Microsoft Internet Client & Controls MVP
    =============== ===============
    "terry" <terry_wahl@msn .com> wrote in message
    news:04fe01c340 96$53e53c30$a00 1280a@phx.gbl.. .[color=blue]
    > Hi,
    > Question:
    > When using Framesets and Server.Transfer in the
    > Application_Err or 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_Err or(Object sender, EventArgs
    > e)
    > {
    > Server.Transfer ("ErrorPage.asp x");
    > }
    >
    > 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[/color]


    Comment

    • terry

      #3
      Re: Unhandled Exceptions &amp; Framesets

      Hi,

      I tried the following...

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

      global.asax contains the following:
      protected void Application_Err or(Object sender, EventArgs
      e)
      {
      System.Web.UI.P age page = (System.Web.UI. Page)
      HttpContext.Cur rent.Handler;
      string script = "<script>";
      script += "top.location.h ref =
      \"ErrorPage.asp x\";";
      script += "</script>";
      page.RegisterSt artupScript("On Startup", 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 -->

      <configuratio n>
      <system.web>
      <customErrors mode="RemoteOnl y"/>
      </system.web>
      </configuration>


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


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

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












      [color=blue]
      >-----Original Message-----
      >Hi
      >
      >You have to return a client script that redirects
      >
      ><script language="JavaS cript">
      >top.location.h ref = "errorpage.aspx ";
      ></script>
      >
      >--
      >Best Regards
      > Vidar Petursson
      > =============== ===============
      >Microsoft Internet Client & Controls MVP
      > =============== ===============
      >"terry" <terry_wahl@msn .com> wrote in message
      >news:04fe01c34 096$53e53c30$a0 01280a@phx.gbl. ..[color=green]
      >> Hi,
      >> Question:
      >> When using Framesets and Server.Transfer in the
      >> Application_Err or 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.[/color][/color]
      When[color=blue][color=green]
      >> 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_Err or(Object sender,[/color][/color]
      EventArgs[color=blue][color=green]
      >> e)
      >> {
      >> Server.Transfer ("ErrorPage.asp x");
      >> }
      >>
      >> 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[/color]
      >
      >
      >.
      >[/color]

      Comment

      • Bassel Tabbara [MSFT]

        #4
        Re: Unhandled Exceptions &amp; Framesets

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

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

        You will use the same method by registering the Script using the
        page.RegisterSt artupScript.
        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

        erence/events/onload.asp

        window Object

        erence/objects/obj_window.asp

        open Method

        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$5 3e53c30$a001280 a@phx.gbl>
        <OZF7e9KQDHA.15 84@TK2MSFTNGP11 .phx.gbl>
        | Subject: Re: Unhandled Exceptions & Framesets
        | Date: Wed, 2 Jul 2003 10:53:42 -0700
        | Lines: 128
        | Message-ID: <008601c340c2$d ff75fb0$a501280 a@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/3YeorCd18Roa9Dz MnVw3LRQ==
        | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
        | Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
        | Path: cpmsftngxa09.ph x.gbl
        | Xref: cpmsftngxa09.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:3180 0
        | NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
        | X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
        |
        | Hi,
        |
        | I tried the following...
        |
        | web.config files contains the entry:
        | <customErrors mode="On"></customErrors>
        |
        | global.asax contains the following:
        | protected void Application_Err or(Object sender, EventArgs
        | e)
        | {
        | System.Web.UI.P age page = (System.Web.UI. Page)
        | HttpContext.Cur rent.Handler;
        | string script = "<script>";
        | script += "top.location.h ref =
        | \"ErrorPage.asp x\";";
        | script += "</script>";
        | page.RegisterSt artupScript("On Startup", 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 -->
        |
        | <configuratio n>
        | <system.web>
        | <customErrors mode="RemoteOnl y"/>
        | </system.web>
        | </configuration>
        |
        |
        | Notes: The current error page you are seeing can be
        | replaced by a custom error page by modifying
        | the "defaultRedirec t" attribute of the application's
        | <customErrors > configuration tag to point to a custom
        | error page URL.
        |
        |
        | <!-- Web.Config Configuration File -->
        |
        | <configuratio n>
        | <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="JavaS cript">
        | >top.location.h ref = "errorpage.aspx ";
        | ></script>
        | >
        | >--
        | >Best Regards
        | > Vidar Petursson
        | > =============== ===============
        | >Microsoft Internet Client & Controls MVP
        | > =============== ===============
        | >"terry" <terry_wahl@msn .com> wrote in message
        | >news:04fe01c34 096$53e53c30$a0 01280a@phx.gbl. ..
        | >> Hi,
        | >> Question:
        | >> When using Framesets and Server.Transfer in the
        | >> Application_Err or 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_Err or(Object sender,
        | EventArgs
        | >> e)
        | >> {
        | >> Server.Transfer ("ErrorPage.asp x");
        | >> }
        | >>
        | >> 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
        | >
        | >
        | >.
        | >
        |



        Comment

        • terry

          #5
          Re: Unhandled Exceptions &amp; 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
          [color=blue]
          >-----Original Message-----
          >Hello Terry,
          >To open the window you can use the following script on[/color]
          onload Event:[color=blue]
          >
          > <script>
          > window.open ("[/color]
          ErrorPage.aspx" , "newwin", "fullscreen="ye s");[color=blue]
          > window.opener = self;
          > self.close();
          > </script>
          >
          >You will use the same method by registering the Script[/color]
          using the[color=blue]
          >page.RegisterS tartupScript.
          >The script will be in the ErrorPage.aspx that you are[/color]
          opening. This code[color=blue]
          >will open a new window for the error message
          >and close the one that has frame.
          >
          >For reference:
          >
          >onload Event
          >http://msdn.microsoft.com/library/default.asp?[/color]
          url=/workshop/author/dhtml/ref[color=blue]
          >erence/events/onload.asp
          >
          >window Object
          >http://msdn.microsoft.com/library/default.asp?[/color]
          url=/workshop/author/dhtml/ref[color=blue]
          >erence/objects/obj_window.asp
          >
          >open Method
          >http://msdn.microsoft.com/library/default.asp?[/color]
          url=/workshop/author/dhtml/ref[color=blue]
          >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[/color]
          confers no rights.[color=blue]
          >
          >
          >
          >--------------------
          >| Content-Class: urn:content-classes:message
          >| From: "terry" <terry_wahl@msn .com>
          >| Sender: "terry" <terry_wahl@msn .com>
          >| References: <04fe01c34096$5 3e53c30$a001280 a@phx.gbl>
          ><OZF7e9KQDHA.1 584@TK2MSFTNGP1 1.phx.gbl>
          >| Subject: Re: Unhandled Exceptions & Framesets
          >| Date: Wed, 2 Jul 2003 10:53:42 -0700
          >| Lines: 128
          >| Message-ID: <008601c340c2$d ff75fb0$a501280 a@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/3YeorCd18Roa9Dz MnVw3LRQ==
          >| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
          >| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
          >| Path: cpmsftngxa09.ph x.gbl
          >| Xref: cpmsftngxa09.ph x.gbl[/color]
          microsoft.publi c.dotnet.framew ork.aspnet:3180 0[color=blue]
          >| NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
          >| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
          >|
          >| Hi,
          >|
          >| I tried the following...
          >|
          >| web.config files contains the entry:
          >| <customErrors mode="On"></customErrors>
          >|
          >| global.asax contains the following:
          >| protected void Application_Err or(Object sender,[/color]
          EventArgs[color=blue]
          >| e)
          >| {
          >| System.Web.UI.P age page = (System.Web.UI. Page)
          >| HttpContext.Cur rent.Handler;
          >| string script = "<script>";
          >| script += "top.location.h ref =
          >| \"ErrorPage.asp x\";";
          >| script += "</script>";
          >| page.RegisterSt artupScript("On Startup", script);
          >|
          >| }
          >|
          >|
          >| The ErrorPage.aspx is not being displayed but I am[/color]
          instead[color=blue]
          >| receving the standard Microsoft error page as below:
          >|
          >|
          >| Runtime Error
          >| Description: An application error occurred on the[/color]
          server.[color=blue]
          >| 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,[/color]
          please[color=blue]
          >| 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 -->
          >|
          >| <configuratio n>
          >| <system.web>
          >| <customErrors mode="RemoteOnl y"/>
          >| </system.web>
          >| </configuration>
          >|
          >|
          >| Notes: The current error page you are seeing can be
          >| replaced by a custom error page by modifying
          >| the "defaultRedirec t" attribute of the application's
          >| <customErrors > configuration tag to point to a custom
          >| error page URL.
          >|
          >|
          >| <!-- Web.Config Configuration File -->
          >|
          >| <configuratio n>
          >| <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="JavaS cript">
          >| >top.location.h ref = "errorpage.aspx ";
          >| ></script>
          >| >
          >| >--
          >| >Best Regards
          >| > Vidar Petursson
          >| > =============== ===============
          >| >Microsoft Internet Client & Controls MVP
          >| > =============== ===============
          >| >"terry" <terry_wahl@msn .com> wrote in message
          >| >news:04fe01c34 096$53e53c30$a0 01280a@phx.gbl. ..
          >| >> Hi,
          >| >> Question:
          >| >> When using Framesets and Server.Transfer in the
          >| >> Application_Err or event handler is there a mechanism[/color]
          to[color=blue]
          >| >> get the error page to display in the total view of[/color]
          the[color=blue]
          >| >> browser not just in the offending frame?
          >| >>
          >| >> Overview:
          >| >> I have an application in which I am using[/color]
          framesets.[color=blue]
          >| When
          >| >> an Unhandled exception occurs I try to handle it
          >| >> gracefully by transfering to an error handling page[/color]
          as[color=blue]
          >| >> follows:
          >| >>
          >| >> Global.asax.cs. ..
          >| >> protected void Application_Err or(Object sender,
          >| EventArgs
          >| >> e)
          >| >> {
          >| >> Server.Transfer ("ErrorPage.asp x");
          >| >> }
          >| >>
          >| >> The problem is that the ErrorPage.aspx is only[/color]
          displayed[color=blue]
          >| >> in the offending frame not the complete window of the
          >| >> browser.
          >| >>
          >| >> Thanks in advance for your help!!!
          >| >> Terry
          >| >
          >| >
          >| >.
          >| >
          >|
          >
          >
          >
          >.
          >[/color]

          Comment

          • Bassel Tabbara [MSFT]

            #6
            Re: Unhandled Exceptions &amp; 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$5 3e53c30$a001280 a@phx.gbl>
            <OZF7e9KQDHA.15 84@TK2MSFTNGP11 .phx.gbl>
            <008601c340c2$d ff75fb0$a501280 a@phx.gbl>
            <TQ4al$MQDHA.24 16@cpmsftngxa09 .phx.gbl>
            | Subject: Re: Unhandled Exceptions & Framesets
            | Date: Wed, 2 Jul 2003 14:05:51 -0700
            | Lines: 231
            | Message-ID: <480701c340dd$b 83384c0$a401280 a@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: AcNA3bgsaQw2Y1B JSVyw5Ci5Cc/+yQ==
            | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
            | Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
            | Path: cpmsftngxa09.ph x.gbl
            | Xref: cpmsftngxa09.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:3185 1
            | NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
            | X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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="ye s");
            | > window.opener = self;
            | > self.close();
            | > </script>
            | >
            | >You will use the same method by registering the Script
            | using the
            | >page.RegisterS tartupScript.
            | >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
            | >http://msdn.microsoft.com/library/default.asp?
            | url=/workshop/author/dhtml/ref
            | >erence/events/onload.asp
            | >
            | >window Object
            | >http://msdn.microsoft.com/library/default.asp?
            | url=/workshop/author/dhtml/ref
            | >erence/objects/obj_window.asp
            | >
            | >open Method
            | >http://msdn.microsoft.com/library/default.asp?
            | 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$5 3e53c30$a001280 a@phx.gbl>
            | ><OZF7e9KQDHA.1 584@TK2MSFTNGP1 1.phx.gbl>
            | >| Subject: Re: Unhandled Exceptions & Framesets
            | >| Date: Wed, 2 Jul 2003 10:53:42 -0700
            | >| Lines: 128
            | >| Message-ID: <008601c340c2$d ff75fb0$a501280 a@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/3YeorCd18Roa9Dz MnVw3LRQ==
            | >| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
            | >| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
            | >| Path: cpmsftngxa09.ph x.gbl
            | >| Xref: cpmsftngxa09.ph x.gbl
            | microsoft.publi c.dotnet.framew ork.aspnet:3180 0
            | >| NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
            | >| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
            | >|
            | >| Hi,
            | >|
            | >| I tried the following...
            | >|
            | >| web.config files contains the entry:
            | >| <customErrors mode="On"></customErrors>
            | >|
            | >| global.asax contains the following:
            | >| protected void Application_Err or(Object sender,
            | EventArgs
            | >| e)
            | >| {
            | >| System.Web.UI.P age page = (System.Web.UI. Page)
            | >| HttpContext.Cur rent.Handler;
            | >| string script = "<script>";
            | >| script += "top.location.h ref =
            | >| \"ErrorPage.asp x\";";
            | >| script += "</script>";
            | >| page.RegisterSt artupScript("On Startup", 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 -->
            | >|
            | >| <configuratio n>
            | >| <system.web>
            | >| <customErrors mode="RemoteOnl y"/>
            | >| </system.web>
            | >| </configuration>
            | >|
            | >|
            | >| Notes: The current error page you are seeing can be
            | >| replaced by a custom error page by modifying
            | >| the "defaultRedirec t" attribute of the application's
            | >| <customErrors > configuration tag to point to a custom
            | >| error page URL.
            | >|
            | >|
            | >| <!-- Web.Config Configuration File -->
            | >|
            | >| <configuratio n>
            | >| <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="JavaS cript">
            | >| >top.location.h ref = "errorpage.aspx ";
            | >| ></script>
            | >| >
            | >| >--
            | >| >Best Regards
            | >| > Vidar Petursson
            | >| > =============== ===============
            | >| >Microsoft Internet Client & Controls MVP
            | >| > =============== ===============
            | >| >"terry" <terry_wahl@msn .com> wrote in message
            | >| >news:04fe01c34 096$53e53c30$a0 01280a@phx.gbl. ..
            | >| >> Hi,
            | >| >> Question:
            | >| >> When using Framesets and Server.Transfer in the
            | >| >> Application_Err or 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_Err or(Object sender,
            | >| EventArgs
            | >| >> e)
            | >| >> {
            | >| >> Server.Transfer ("ErrorPage.asp x");
            | >| >> }
            | >| >>
            | >| >> 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
            | >| >
            | >| >
            | >| >.
            | >| >
            | >|
            | >
            | >
            | >
            | >.
            | >
            |


            Comment

            Working...