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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • yashgt@gmail.com

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

    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.Com mon.DbCommand =
    db.GetStoredPro cCommand(strPro cName)
    Line 25: Dim param As Parameter
    Line 26: For Each param In objPrameters
    Line 27: db.AddInParamet er(cmd, param.Name, param.Type,
    param.DefaultVa lue)


    We know for sure that there is not syntax error in the changed code.
    If we reset IIS and delete everything from "C:\WINDOWS\Mic rosoft.NET
    \Framework\v2.0 .50727\Temporar y 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\Mic rosoft.NET\Fram ework
    \v2.0.50727\Tem porary 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

    #2
    Re: Temporary ASP.NET files not auto-updated when files change?

    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)

    yashgt@gmail.co m 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.Com mon.DbCommand =
    db.GetStoredPro cCommand(strPro cName)
    Line 25: Dim param As Parameter
    Line 26: For Each param In objPrameters
    Line 27: db.AddInParamet er(cmd, param.Name, param.Type,
    param.DefaultVa lue)
    >
    >
    We know for sure that there is not syntax error in the changed code.
    If we reset IIS and delete everything from "C:\WINDOWS\Mic rosoft.NET
    \Framework\v2.0 .50727\Temporar y 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\Mic rosoft.NET\Fram ework
    \v2.0.50727\Tem porary 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
    >

    Comment

    Working...