Temporary ASP.NET files not auto-updated when files change?

Discussion in 'ASP .Net' started by yashgt@gmail.com, Feb 22, 2007.

  1. Guest

    Hi,

    We have an application that has been deployed into a virtual folder
    along with ascx, aspx and the code-behind files. It runs smoothly as
    long as we don't change any code-behind file. If we change a file, we
    expect ASP .NET to recompile the website when a user next accesses it.
    However, on next access the user gets the following 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: BC30554: 'Parameter' is ambiguous.

    Source Error:



    Line 23: Dim db As Database = DatabaseFactory.CreateDatabase()
    Line 24: Dim cmd As System.Data.Common.DbCommand =
    db.GetStoredProcCommand(strProcName)
    Line 25: Dim param As Parameter
    Line 26: For Each param In objPrameters
    Line 27: db.AddInParameter(cmd, param.Name, param.Type,
    param.DefaultValue)


    We know for sure that there is not syntax error in the changed code.
    If we reset IIS and delete everything from "C:\WINDOWS\Microsoft.NET
    \Framework\v2.0.50727\Temporary ASP.NET Files", the website runs fine
    again.
    Can you suggest why ASP.NET is not recompiling on its own when
    something changes?

    Will this problem go away if we use pre-compiled DLLs instead of
    letting ASP .NET compile in-place? We know that even if we use pre-
    compiled DLLs, the "C:\WINDOWS\Microsoft.NET\Framework
    \v2.0.50727\Temporary ASP.NET Files" directory still gets filled with
    DLLs. Not sure why. However, if we have to change something in a code-
    behind and create a new DLL and replace it in the vrtual directory,
    will we see the same problem as mentioned above?

    Please provide some guidance.

    Thanks,
    Yash
    , Feb 22, 2007
    #1
    1. Advertising

  2. bruce barker Guest

    this is due to compile batching. for compile performance when a site is
    compiled, several pages are compiled together. when you update the site
    a batch grouping occurs. in the recompile two pages reference Parameters
    from different namespaces (for example you named a class Parameters)
    and the decalre becomes ambiguous.

    just fully qualify parameter as you did DbCommand.

    -- bruce (sqlwork.com)

    wrote:
    > Hi,
    >
    > We have an application that has been deployed into a virtual folder
    > along with ascx, aspx and the code-behind files. It runs smoothly as
    > long as we don't change any code-behind file. If we change a file, we
    > expect ASP .NET to recompile the website when a user next accesses it.
    > However, on next access the user gets the following 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: BC30554: 'Parameter' is ambiguous.
    >
    > Source Error:
    >
    >
    >
    > Line 23: Dim db As Database = DatabaseFactory.CreateDatabase()
    > Line 24: Dim cmd As System.Data.Common.DbCommand =
    > db.GetStoredProcCommand(strProcName)
    > Line 25: Dim param As Parameter
    > Line 26: For Each param In objPrameters
    > Line 27: db.AddInParameter(cmd, param.Name, param.Type,
    > param.DefaultValue)
    >
    >
    > We know for sure that there is not syntax error in the changed code.
    > If we reset IIS and delete everything from "C:\WINDOWS\Microsoft.NET
    > \Framework\v2.0.50727\Temporary ASP.NET Files", the website runs fine
    > again.
    > Can you suggest why ASP.NET is not recompiling on its own when
    > something changes?
    >
    > Will this problem go away if we use pre-compiled DLLs instead of
    > letting ASP .NET compile in-place? We know that even if we use pre-
    > compiled DLLs, the "C:\WINDOWS\Microsoft.NET\Framework
    > \v2.0.50727\Temporary ASP.NET Files" directory still gets filled with
    > DLLs. Not sure why. However, if we have to change something in a code-
    > behind and create a new DLL and replace it in the vrtual directory,
    > will we see the same problem as mentioned above?
    >
    > Please provide some guidance.
    >
    > Thanks,
    > Yash
    >
    bruce barker, Feb 22, 2007
    #2
    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. Natty Gur
    Replies:
    2
    Views:
    4,262
    Yan-Hong Huang[MSFT]
    Jul 3, 2003
  2. Replies:
    7
    Views:
    3,185
    James Kanze
    Feb 12, 2008
  3. linkswanted
    Replies:
    1
    Views:
    887
  4. Dmitry Korolyov

    Datagrid not updated during delete, but updated during insert and update

    Dmitry Korolyov, Sep 22, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    403
    Dmitry Korolyov
    Sep 22, 2003
  5. Martin Erskine

    Help! - ASP.NET cannot 'Temporary ASP NET Files'

    Martin Erskine, Sep 17, 2003, in forum: ASP .Net Security
    Replies:
    0
    Views:
    112
    Martin Erskine
    Sep 17, 2003
Loading...

Share This Page