Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

My ASP.NET App_code changes not getting picked up (or are cached??)

Help!! I have a single .cs file under a (root level) App_Code directory for the purpose of retrieving the correct template for the requested URL (it is linked to our own Content Management database). Initially, it was working fine - I could make changes to it and they were picked up by the web application OK. Then something happened (no idea what) and now whatever changes I make, they are not recognised. Even if I delete the entire App_Code directory, it makes no difference - I still seem to be picking up an earlier (cached??) version of what was in the App_Code directory. Code in the .cs file is below:

using System;
using Custom.CMS.Facade;
using Custom.CMS.BO;
public class CMHttpModule : IHttpModule
{
    code here...
}

The same problem occurs even after I have copied the website to our live server.

What I don't understand is - if I introduce a deliberate error to the .cs code, I still get a compilation error, and on successful compilation an App_Code.xxxx.dll is created under C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files

So what version of the App_Code is my web application actually picking up? How do I make it pick up the "correct" one?

FYI I am using C#, Visual Web Developer Express 2008 and IIS 6 web server

Any assistance would be gratefully appreciated.

like image 738
Patrick Avatar asked Jun 17 '11 12:06

Patrick


2 Answers

Reopening the solution also works.

like image 166
Chris Avatar answered Oct 24 '22 05:10

Chris


Can you right click the file, go to the properties and check the build action. It has to be set to 'Compile'.

like image 3
Jeroen Avatar answered Oct 24 '22 04:10

Jeroen