Made change to VB code behind file but changes not reflecting on live app
I'm having a very annoying problem that I can't seem to find an answer to.
I have a rather simple web app that basically retrieves some data from a database. I'm using Visual Studio 2010 Pro. I've developed the app and deployed it to my web server and it works fine. I've been requested to make a slight change to it which means changing some of the VB code behind.
I've done the changes in Visual Studio and when I test it on Visual Studio it works fine and my changes are there and working. I've then built and published the project again to generate updated DLL files and aspx files. I've then deployed those on to the web server and restart the web site and IIS. Yet when I browse to the site it still works fine but my changes are not reflected. This is what I have tried to fix the problem.
Deleted all ASP.Net temporary files
IISReset - quite a few times
stopped and started the website
deleted the whole directory containing the web app files on the web server and recreated it with all new files from my machine which runs visual studio
Stopped and started the application pool associated with my web site
I've done all of the above yet nothing seems to have resolved the problem. What I do know is that I can probably delete the web site and re-create the entire site and app pool in IIS and that should solve the problem but surely I should not have to do that every time I updated the app!
If anyone has an answer to this I would be very grateful as this problem is driving me mad!
The other thing you may want to double check is that in the declarations at the top of the aspx page that codefile="~/therightfilename.aspx.vb and that the declaration doesn't say codebehind, that's if you are using a codefile or vice versa.
On the Default.aspx page in the top it says CodeBehind="Default.aspx.vb". Now when I build and publish the project it is compiling the vb code in to a dll.. is that correct? If that is then it definetly has the updated version of the dll file with the changes I have made.
As a test I have added a button to the default.aspx page itself, saved it, re-built and re-published the app with the new files, updated the live web site and hey presto my button appears. So it is seeing the new default.aspx file but doesn't appear to be seeing any changes made to code behind files.
hi mine is already codefile but i dont know why its not working after i publish and copy the dll to the server. but when i published the same changes from another pc it works. only in my computer when i publish it will have no effect on the changes