We help IT Professionals succeed at work.

Cannot edit asp.net .cs files. Is my code locked?

wilbur88
wilbur88 asked
on
Hello Experts
I have a website written in asp.net c# that someone gave me to fix a few bugs in. I am using visual studio 2008 as that is what the site was made in. I am having a few issues though. If I try to make a change to html side of the web page the change is reflected when I debug the site, however if I make any changes to the behind the scene code (the .cs files) the change does not get executed. Also I have placed break points in the code to try and debug the issue, but the code does not stop on the break points. If I look at the break point when in debug mode, it is a hollow circle with hover text “Break point will not currently be hit, source data is different from original version”
I do not understand this issue as I have not made any changes to the source code after I started to debug, so why is the source data different.
What is going on? Is the project somehow locked? Why can’t I change or debug the c# code behind the page?
Thank you for you help
Comment
Watch Question

Commented:
Somtimes this happens when there are multiple versions of the DLL's (Debug or Release modes). Try to right-click on the Solution and select Clean solution. Rebuild web site and try again.

Author

Commented:
Hi Mez4343

Thank you for your prompt response. I however do not have a clean solution option as this is a website not a project. I did however find that location where it places the solution for the website (C:\Users\admin\Documents\Visual Studio 2008\Projects) and deleted the solution for my site to try and get a clean solution, however even that did not work. I have also tried build and rebuild options but they also do not work.

Thank you for your help
Make sure that you are executing your code in debug mode.
Go to Build -> Configuration Manager , check for active solution configuration. This should be set to debug.
Commented:
Hi Experts

I have found the problem. The website was made as a project and had project files. I need to open the website as a project not as a website like I was doing. Once I opened the site as a project everything started working correctly.

Thank you for your help.

Author

Commented:
The comments made by the experts were not the solution to the problem.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.