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

Y

yashgt

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
 
B

bruce barker

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)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top