Made change to VB code behind file but changes not reflecting on live app
Hi everyone
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!
thank you!!
Simon
4
Contributors
9
Replies
7 Months
Discussion Span
2 Weeks Ago
Last Updated
13
Views
Related Article:How can I change the HTML code via VB .Net?
is a ASP.NET discussion thread by mrjimoy_05 that has 1 reply, was last updated 1 year ago and has been tagged with the keywords: asp, .net, vb.
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