The source code is different from the original version. To allow the breakpoint to be hit when the source code is different, right-click on the breakpoint, choose ‘Location ….’, and turn on ‘Allow the source code to be different from the original version.’ To allow this for all breakpoints, disable the option “Require source files to exactly match the original version’ under Tools, Options, Debugging, General.
It’s the second time now I got this error. Everything was fine before, and no major changes were made. Both proposed options (Allow the source code to be different for this single breakpoint or for all) are not satisfying: I’m compiling with VS2005 so why is my source code outdated…?
Checking the output-screen while running the Build shows that all my projects from this solution are not built because ‘Project not selected to build for this solution configuration’. I did not change the solution configuration so that’s strange….I’ve then checked the configuration settings (Right-click on the solution, select ‘Properties’ –> ‘Configuration Properties’) and none of my projects was enabled. So I enabled them again, compiled it and the error message is away.
Today I found another reason for this error message in another project: There was in error displayed in IIS, probably because the files are on a movable partition so sometimes it’s not available. I just deleted the entry in IIS and created a new one and now it works fine again (probably until I remove the drive temporarily again… 😉 )
Update on 07. Sept 2008: Today I found another reason for the problem, even though I don’t know why it happened: Recompiling and cleaning solution did not help. While compiling the temporary ASP.net files were not refreshed. Check the output while compiling and you’ll see lots of entries like this:
‘aspnet_wp.exe’ (Managed): Loaded ‘c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\myproject\c726c8aef\6c8883fed\assembly\dl3\061ed431d\0091d3a96_1cf6c801\AjaxControlToolkit.DLL’, Symbols loaded.
I’ve checked the files and saw that they are 3 days old. Nevertheless they are still used, so my code changes did not have any effect. It was not possible to delete them, so I had to shutdown my IIS, delete all files within ‘’c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\myproject\’ and start again. And now it works! I still need to investigate why it wasn’t updated automatically…
In my application I needed to have 2 listboxes and users should be able to move entries from the source list to the target list. Continue reading…
The problem with editing large texts in SQL Backend is that the text is broken up into separate lines, so the “carriage return” character at the end of the first line is interpreted by anything SQL as the “I’ve finished typing, now go do that” command.
The quickest way around it is simply to update the table using standard SQL commands (i.e. update tablename set field=value where….). Now usually, you would simply put the value bit in single quotes and run the SQL, but you have the added complication that the text contains single quotes itself, and the way to specify single quotes as literals is putting a single quote before it (i.e. ” – which is obviously not the same as the ” double quote even if it looks the same on screen).
Therefore, I would suggest doing the following (name of the textfield is ‘comment’ and ‘logid’ is the unique identifier):
- Open up a new query window in SQL Server Management Studio, pointing to the database.
- Paste in the following code:
set quoted_identifier ON declare @comment varchar(8000), @logid int set @logid = set @comment = '' update actionlog set comment = @comment where logid = @logid
- Paste the text you want to change into Notepad, change it and then do an Edit Replace, replacing single quote ‘ with double quote ” and replace all instances.
- Do a Select All, and copy the text.
- Paste what you have on the clipboard into the SSMS query window between the two single quotes next to @Comment, so the text you copied gets assigned to the @comment variable.
- Specify the logid number to identify the record to be updated.
- Run the code.
It looks like a lot of steps, but once you’ve gone through it once, you’ll see it’s not much work at all, and certainly much quicker than scrolling through the field.
An alternative way could be to use the REPLACE function as follows:
update Actionlog set comment = replace(convert(varchar(8000), comment), 'put what you want replaced here within the single quotes', 'put the new text you want here within the single quotes') where logid = 'replace this string including single quotes with the logid number of the record you want changed'
update Actionlog set comment = replace(convert(varchar(8000), comment), 'Test result from yesterday, 'Test result from today') where logid = 132
That way, you don’t need to copy large amounts of text out and in again, since you’re just changing small bits of it.
By default the gridview displays the page numbers unformatted even without any spaces between the page numbers. This makes it hard to read. Continue reading…
This procedure explains how to add a ‘Please wait’ screen to an ASP.net application.
By default at server process (e.g. saving a request) you only see a progress bar in the status bar . If it’s a long running process you might not see any update for a longer time, and users might think that the application stopped, is already finished or did not even start because they did not press the correct button. This might result in double clicks on the Save button or closure of the browser window without completion. Continue reading…