Porting from JScript to JScript.Net - compiler error

Discussion in 'ASP .Net' started by Jon Maz, Sep 3, 2004.

  1. Jon Maz

    Jon Maz Guest

    Hi All,

    Am trying to port an existing asp 3.0 app written in JScript to JScript.Net,
    and have just had the following error:

    COMPILATION ERROR
    Description: An error occurred during the compilation of a resource
    required to service this request. Please review the following
    specific error details and modify your source code appropriately.

    COMPILER ERROR MESSAGE:
    JS1113: Only valid inside a class definition

    SOURCE ERROR:
    Line 11242: }
    Line 11243:
    Line 11244: protected override function FrameworkInitialize() {
    Line 11245: this.__BuildControlTree(this);
    Line 11246: this.FileDependencies =
    ASP.test2_aspx.__fileDependencies;

    SOURCE FILE:
    C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary
    ASP.NET Files\root\6ee7ca74\d173ebaf\rcfu-d1s.0.js
    Line: 11244

    All I can find in the documentation about this is the following:

    TemplateControl.FrameworkInitialize Method
    This member supports the .NET Framework infrastructure and is not
    intended to be used directly from your code.

    This isn't looking good.... does anyone know how to deal with this?

    TIA,

    JON

    PS First posted to aspmessageboard
    http://www.aspmessageboard.com/forum/ASPPlus.asp?M=725525&T=725525&F=36&P=1
     
    Jon Maz, Sep 3, 2004
    #1
    1. Advertising

  2. At first glance, it seems like you are using the protected attribute outside
    of a class declaration. I can't tell for sure until I see more of the code
    block around this error.

    - Rashad Rivera
    Omegus Prime

    "Jon Maz" <> wrote in message
    news:e$...
    > Hi All,
    >
    > Am trying to port an existing asp 3.0 app written in JScript to

    JScript.Net,
    > and have just had the following error:
    >
    > COMPILATION ERROR
    > Description: An error occurred during the compilation of a

    resource
    > required to service this request. Please review the following
    > specific error details and modify your source code appropriately.
    >
    > COMPILER ERROR MESSAGE:
    > JS1113: Only valid inside a class definition
    >
    > SOURCE ERROR:
    > Line 11242: }
    > Line 11243:
    > Line 11244: protected override function FrameworkInitialize() {
    > Line 11245: this.__BuildControlTree(this);
    > Line 11246: this.FileDependencies =
    > ASP.test2_aspx.__fileDependencies;
    >
    > SOURCE FILE:
    > C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary
    > ASP.NET Files\root\6ee7ca74\d173ebaf\rcfu-d1s.0.js
    > Line: 11244
    >
    > All I can find in the documentation about this is the following:
    >
    > TemplateControl.FrameworkInitialize Method
    > This member supports the .NET Framework infrastructure and is not
    > intended to be used directly from your code.
    >
    > This isn't looking good.... does anyone know how to deal with this?
    >
    > TIA,
    >
    > JON
    >
    > PS First posted to aspmessageboard
    >

    http://www.aspmessageboard.com/forum/ASPPlus.asp?M=725525&T=725525&F=36&P=1
    >
    >
    >
    >
    >
     
    Rashad Rivera, Sep 4, 2004
    #2
    1. Advertising

  3. Jon Maz

    Jon Maz Guest

    Hi Rashad,

    That's just the thing, there *is* no code to show you - well, none that I
    wrote, anyway.

    All I did was take an existing (and working) asp 3.0 application written in
    JScript, changed all the .asp extensions to .aspx, added a web.config file
    to the root folder, and then got this error message - which clearly doesn't
    apply to any code that *I* wrote!

    In fact, since the error is clearly in a piece of dotnet code, the only
    thing that makes any sense to me is that this is a bug somewhere in the
    Dotnet Framework - which would mean that I can't do anything to fix it.

    Any other interpretation of the situation would be more than welcome...

    :-(

    J




    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.749 / Virus Database: 501 - Release Date: 01/09/2004
     
    Jon Maz, Sep 5, 2004
    #3
  4. Jon Maz

    Greg Burns Guest

    Make sure ASPNET user has proper rights to required temp folders.

    http://msdn.microsoft.com/library/d...cpconASPNETRequiredAccessControlListsACLs.asp

    Sounds somewhat reminiscent of the issues caused with the IIS lockdown tool.

    Greg

    "Jon Maz" <> wrote in message
    news:...
    > Hi Rashad,
    >
    > That's just the thing, there *is* no code to show you - well, none that I
    > wrote, anyway.
    >
    > All I did was take an existing (and working) asp 3.0 application written

    in
    > JScript, changed all the .asp extensions to .aspx, added a web.config file
    > to the root folder, and then got this error message - which clearly

    doesn't
    > apply to any code that *I* wrote!
    >
    > In fact, since the error is clearly in a piece of dotnet code, the only
    > thing that makes any sense to me is that this is a bug somewhere in the
    > Dotnet Framework - which would mean that I can't do anything to fix it.
    >
    > Any other interpretation of the situation would be more than welcome...
    >
    > :-(
    >
    > J
    >
    >
    >
    >
    > ---
    > Outgoing mail is certified Virus Free.
    > Checked by AVG anti-virus system (http://www.grisoft.com).
    > Version: 6.0.749 / Virus Database: 501 - Release Date: 01/09/2004
    >
    >
     
    Greg Burns, Sep 5, 2004
    #4
  5. Jon Maz

    Jon Maz Guest

    Hi All,

    Well, after much research I finally found out what was causing the problem,
    and can still hardly believe it - it was one function which used the JScript
    "arguments" property:

    function XXX(.........)
    {
    if (XXX.arguments.length < 3 ...)
    }

    Removing the line with .arguments removed the error! As to why the compiler
    came up with such an unhelpful error message, without pinpointing the file &
    line number, is beyond me...

    Anyway, onwards and upwards to the next problem! Thanks to all for their
    helpful contributions.

    JON
     
    Jon Maz, Sep 9, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Maxwell2006
    Replies:
    5
    Views:
    2,426
    Steven Cheng[MSFT]
    Mar 7, 2006
  2. Replies:
    2
    Views:
    531
    Peter Gordon
    May 17, 2005
  3. Replies:
    3
    Views:
    262
    Jay Nabonne
    Oct 10, 2005
  4. John Bentley
    Replies:
    14
    Views:
    377
    Jim Ley
    Feb 5, 2004
  5. VK
    Replies:
    4
    Views:
    369
    Thomas 'PointedEars' Lahn
    Jan 12, 2006
Loading...

Share This Page