Comments
2 comments
-
My best guess would be that you had a bin directory containing compiled versions of the classes.
For example, if I write a simple web application (with just default.aspx and default.aspx.cs) and then publish it, I get a bin directory containing the compiled version of default.aspx.cs. If I then put back the default.aspx.cs, it will be ignored until I delete the compiled version in the bin directory. -
Hey Clive,
Yeah I think that must be it. There was a version of the whole site, compiled, in the bin directory which I got rid of. I also tried creating a new project from scratch, then moving only the code I needed to (for example none of the resources or reference - I can recreate those from scratch). Seems to be working fine now.
Thanks for the reply.
Regards,
Richard
Add comment
Please sign in to leave a comment.
I have found myself in a very bad situation recently. Basically, on the day that I officially started my final year project at uni (which I had unofficially started 8 months before that), my laptop got stolen along with all my work. Luckily the site had gone into testing so I had been compiling code and uploading it to the server during off peak times.
I recently came across .net reflector and used it to decompile my code. The first time I ran it I got the following error:
[NullReferenceException: Object reference not set to an instance of an object.]
Heritage.Web.Content.SiteContent.ReplaceHtml(String str) in C:\Website\Website\WebApplication1\Development\WebApplication1\Classes\Content\SiteContent.vb:299
Heritage.Web.Pages.Customer.Page.Page_PreInit(Object sender, EventArgs e) in C:\Website\Website\WebApplication1\Development\WebApplication1\Classes\CustomPages\Customer\Customer.vb:30
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Page.OnPreInit(EventArgs e) +8698174
System.Web.UI.Page.PerformPreInit() +31
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +282
I started going through the code in the files listed only to realise that it is referencing folder "Website" on drive C. This is strange cos the site is now situated in folder "Websites" on drive E.
Does anyone have any idea where it could be referencing this location?
Any help would be greatly appreciated.
Regards,
Richard
Edit (@ 00:22)
I removed all the project files from the decompiled folder, and it seems to be working ok now - its just a case of going through about 15000 lines of code and debugging it..
Will edit this message again if it starts playing up again..