Tag | Debugging Posts

Just ran into a bit of nastiness with the SqlParameter class in .Net 2.0. The scenario: I have a DateTime with a value of '05/30/2006 23:59:59.999' (that's 999 milliseconds). When I save it to a (Microsoft SQL Server 2005) DB using a stored procedure invoked by SqlHelper.ExecuteNonQuery(), the value surprisingly changes to '05/31/2006 00:00:00.000'. A bit of step-by-step debugging led me to the culprit. When the DateTime is stored in a SqlParameter to be passed to SqlHelper.ExecuteNonQuery(), the ...
Well, technically its just day 2, but counting the UG Summit, Wednesday is Day 3. I blogged a bit earlier about the night before, so this is more of a recap for today in general. I was really looking forward to Derek Hatchard's talk on Open Source vs Team System for testing and building, but I heard he had a bout of the flu so it was cancelled (I saw him around later on in the day, so I hope you're feeling better man). Instead, I checked out Beth Massi's talk on datasources and databinding. Great ...

To simply regurgitate another post from GWB here (so that I can remember it), Javascript debugging is possible in Visual Studio .NET. In essence, it's not very good, but it's better than nothing and its integration with the common IDE keeps it familiar.

I ran across this weird problem while debugging a stored procedure in Sql Server 2000. Here's a sample stored procedure: drop procedure p1gocreate procedure p1as create table #t1( col1 int identity(1,1), col2 datetime, col3 int) select *from #t1 return update #t1set col3 = col2return Ok, notice that I have a return statement after the first select. That is my exit point for now because I am debugging so I am not interested in the section after that. Also notice that the update statement will throw ...
There is several factors can affect the performance of an ASP.NET application 1) Page settings. in a @Page directive in their source code. Settings that can affect performance and scalability such as : • Debug. For production sites, this setting should be false to enable batch compilation and remove the overhead caused by additional debugging information. For pages with no specified debug value, the setting is determined by the value of the debug attribute of the compilation element in the ...
This is a compelling platform, if it works, and it’s now going open source in hope of garnering a greater number of developers contributing and using. The DotNetNuke folks have built a DNN administration console based upon this. - CORRECTION - Someone has built an Admin Console; not the DNN folks.... WinForms Over Web (the WOW model) is a revolutionary development & deployment platform made possible by a unique, patented, server based RIA paradigm. The WOW model enables development of rich ...
Recently, one of my peers asked a question regarding the ability of SQL CLR classes to read configuration data from an Application Configuration file. After doing some quick Google searches on the topic, I came up with a couple of links that indicated the potential, but no concrete HOWTO on getting it all wired up. Now, I don’t want to debate whether this makes good architectural sense to store static settings in the file system when you’re already working inside a database management ...
I know that I am missing something small but not really sure what it is. I just added the configuration in the web.config file to upgrade my project to ATLAS. Most of the controls that I have tried are working with the exception of the AutoCompleteExtender control. I even tried debugging the application but it never reaches the web services method. <form id="form1" runat="server"> <atlas:ScriptManager ID="sm" EnablePartialRendering="true" runat="server" /> <div> <asp:TextBox ...
I was using the UpdatePanel and was noticing some strange behavior. After some debugging I found some cool stuff about the UpdatePanel. The first thing that you need to know is that the UpdatePanel is rendered as a DIV element. I guess that was pretty obvious. The next thing is if you put a Button inside the UpdatePanel then the Button will refresh all the UpdatePanels. Check out the code below: <atlas:UpdatePanel Mode="Always" RenderMode="Block" ID="up1" runat="server"> <ContentTemplate> ...
Live from Redmond! is a series presented to you directly by Microsoft product teams! No marketing hype -- just the technical details that you want to hear and need to know. Stay ahead of your peers by attending this exclusive series. #inetalive {background-color:#F1F1F1;} TD.DARK {BACKGROUND-COLOR:#ddd; font-size:1.5em;} Date Description April 12th5:30 pm PDT Crossbow – Building WPF and Windows Forms hybrid applicationsMike HenderlightWondering how to take advantage of the power of the next ...

A few times when I re-start debugging of my ASP.NET application from VS 2005 I received

"Unable to start debugging on the Web Server. The operation has timed out".

I had to restart IIS to fix the error. Not sure what causes this.

How many web casts can you take in a month. Here are 2 web cast series facilitated by INETA. One of them is done by UG leaders and the other one is done by products guys from Redmond. INETA Live! is a series brought to you primarily by user group leaders around the country that have exceptional material they believe would be good to share with other user group leaders. Don't miss these if you are interested in growing your own user group. Check out INETA page for this oneLive from Redmond! is a series ...
In a previous post I detailed some conditions existing on development teams that would suggest some changes need to be made in order to bring about better performance and ultimately higher quality software. In this post I will identify a couple more Team Smells and discuss how these issues can be remedied and why these conditions should be addressed in the first place. Smell: Developers Spent Way Too Much In The Debugger (AKA Debugger Junkies) A good feature-rich debugger like the one that comes ...
This is not the prettiest solution - but is the only way I could easily get it all working - so I could click the Run button from VS to startup NUnit and run my tests project. As a primer, read James Newkirks article on this (he explains the config files a bit more than I do). Firstly to get NUnit to work with .NET 2.0 assemblies you need to have this in your nunit config file (nunit-gui.exe.config): <startup> <supportedRuntime version="v2.0.50727" /> <requiredRuntime version="v2.0.50727" ...
The remote debugger is available on the last disc of your Visual Studio 2005 installation set. Insert this disc on the remote machine. For example, if you have four discs in your installation set, insert disc four on the remote machine. If you have a DVD instead of a CD, insert the DVD. In Windows Explorer, open the CD/DVD. Locate the Remote Debugger folder (on the CD) or vs/Remote Debugger (on the DVD). In the Remote Debugger folder, open the subfolder that matches your platform (x86, x64, or IA64). ...
Here are the WinDbg / SOS commands I talked about at Code Camp NY. These are the basic commands to get you going with WinDbg / SOS. Starting, Attaching, Executing and Exiting Start -> All Programs -> Debugging Tools for Windows -> WinDbg F6 attach to process Ctrl-Break interrupt debugee .detach detach from a process g continue debugee execution q exit WinDbg Getting Help ? help on commands that affect the debugee .help help on commands that affect the debugger .hh command view the on line ...
I've tried to work with DotNetNuke Windows Authentication to extend it to work in mixed mode ( Use Windows Integrated Authentication for seamless logon intranet logon and use Forms authentication for users unable to use Windows Integrated authentication), as I did it before for my ASP.NET application . I found that since I activated Windows Authentication, I can logon only as my domain account user,which does not have DNN portal host or admin roles. So I unable using DNN web interface to administrate ...
In Visual Studio.Net 2005 things have changed quite a bit. For better. But for people who resist changes, they're gonna have some starting trouble. Like the following ones. For me. May be for you as well. Problem 1:I want to run my webservices under IIS, not on a developement server with some port (For ex: 4187) which kicks off while debugging (when you press F5). Solution: Right click on the project (there's no really a project there in your solution explorer. Its just a directory structure like ...
Just wanted to introduce everyone to a great debugging tool, you can use with Visual Studio 2005. It’s called DebugView. You can find it at http://www.sysinternals.com... DebugView is an application that lets you monitor debug output on your local system, or any computer on the network that you can reach via TCP/IP. It is capable of displaying both kernel-mode and Win32 debug output, so you don’t need a debugger to catch the debug output your applications or device ...
OK, a bit late with the plug for the DDD3 on 3rd June 2006, but as I was on holiday when the date was announced, and the registration hasn't opened yet I don't feel too guilty. Find out more at http://www.developerday.co.uk. If it's as good as the previous events it'll be well organised, cover a broad range of subjects and have a lively atmosphere making it a great day out. I haven't yet decided whether I'll be presenting another session, possibly time to give other's a chance. Being a developer ...
Theres a lot of new cool stuff in visual studio 2005 that makes programming better. But cool stuff was aplenty in .NET since it started. Debug.WriteLine...doesn't seem very exciting does it? It writes some text to the default trace listener for debugging. Woo. But actually, this is very cool. Just spend a little time looking into TraceSwitches, which allow you to define settings in the application config file to determine if stuff is logged (and to what detail), and combine that with a variety of ...
Thanks to John Robbins for the link to If broken it is, fix it you should, an awesome blog about debugging your code. I wish I knew about this blog a long time ago when I was looking at dump files practically every day.
Sometimes life can get so busy, you don't have time for it...Taking my 5th exam today, and it's been a interesting experience so far. While I would like to pass, these exams are almost just as valuable for showing in areasyou need to learn a little more about. One of the interesting things about the beta exams is course that there are no books around for them. So, all you can dois to go through the list of topics on MS website, and ensure that you have worked with a bit of all of it.I do wonder, ...
There are two primary scenarios for throwing exceptions: - Throwing a new exception (creating and throwing it) - Re-Throwing an exception (an exception that has been caught within a try/catch block) THROWING (a new exception): Rule: Throw an exception only when the current request/process simply can not progress due to incorrect, insufficient data, or otherwise. If this code is in the UI an exception should rarely be thrown since a user can usually be notified of the error - such as an incorrect ...
This is an excellent list of performance profiling and debugging tools for monitoring, testing, and optimizing your .NET code: http://sharptoolbox.com/Cat... From the little taste of ANTS Profiler from Red-Gate that I got, I think it rocks ...
To get complete CLR stacks traces in WinDbg/SOS, you need instruct Visual Studio 2005 to not optimize the code and to create "full" debugging information. In the project properties, Build screen: 1) Clear the check next to Optimize code 2) In the Advanced... dialog box, Debug Info, select full. If either of these aren't done the optimizer will in-line some of the function calls ...
You may receive the error "The request failed with HTTP status 401: Access Denied." when trying to access a Webservice from your ASP.NET Application. This normally indicates that Anonymous access has been disabled for the Webservice. Also, when you try to step into the webservice using the Visual Studio debugger, "Unable to automatically step into the server. The remote procedure could not be debugged. This usually indicates that debugging has not been enabled on the server. See help for more information" ...
I'll be speaking at Code Camp NYC, Saturday, February 25th, on Microsoft Debugging Tools for Windows. If you're going to the code camp, I hope you'll attend my talk ...
I speak at user groups on a regular basis and have some presentations people might find useful. The downloads all come with slide decks and sample applications. Multi Threading in Microsoft .NET (Visual Studio 2003) http://njmsdev.org/Meetings... Generics and Iterators in Microsoft .NET 2.0 (Visual Studio 2005) http://www.setfocus.com/N3U... This was created using beta 1 of Visual Studio 2005; one of the samples doesn't compile using ...
[via Paul Gielens] I installed VS.NET 2005 on my laptop last year when it RTM'd, but I recently had to edit a VS.NET 2003 ASP.NET project on it and kept getting an error “Unable to start debugging on the web server “. I figured that the issue was probably related to the installation of .Net 2.0, but running aspnet_regiis -i, did not fix things. Even the initial results on a visit to Google did not look promising. The first few hits I got were not much help until I came across the blog ...
After reading Mike Stalls Debugging Blog I was wondering if it is really impossible to pass property values by reference: void PassIntByRef(ref int x) ... PassIntByRef(ref MyProperty); <-- this is illegal in C#.Another restriction which is often annoying is that you cannot have property delegates. class PropertyDelegation { public delegate int ReturnValueDelegate(); ReturnValueDelegate ValueGetter; int x = 0; public int X // This is our beloved property we care so much about. { get { return x; ...
Today, one of my teammate was getting a "TargetInvocationException" : Exception has been thrown by the target of an invocation. This reminded me of my 'initial learning curve' days in .Net when I encountered this exception, and had a really hard time fixing this one. I can't remember how we(There were other team members who worked on this as well and it was back in 2002-03) solved it. The beauty of the problem is you wouldn't know why you are being thrown this one, inspite of things working as they ...
Have you ever had the need to get line numbers from an exception stack trace for an assembly in the GAC? If you work with BizTalk Server the answer is likely yes. To debug Commerce Server pipeline components which I have traditionally put custom C# pipeline components in the GAC and then registered for COM interop. I've found having line numbers indespensible when apps are running in the production test environment. I went searching for the answer and came across it. I thought I'd write it down here ...
New IDE Features in Visual Studio 2005 IntroductionTechnology evolves along with the need of people using the technology. Same is the case with Visual Studio. Visual Studio 2005 aims to simplify the development process thereby adding many new features to simplify the overall development experience. This article aims to discuss all major IDE related changes in Visual Studio 2005.Productivity featuresThe first time that you start Visual Studio, it asks to make a selection from a list of predefined ...
As you can assume, a developer running the server configuration for a site like this can be hectic from times. Each month this site continues to grow in members, readers, and content, so some failure was going to happen with the default settings of IIS. Through the month of January we started receiving Deadlocks and "Server Too Busy" errors on the site and it was becoming unstable. Is started debugging and researching the issue, finding most results saying, "throw more servers at it!". Well I really ...
I have been thinking lately about delegates and their possible use for interceptors. One really cool thing that they could provide for me with a trivial amount of code is the ability to define a give interceptor as being asynchronous. The code generated for this is rather trivial and I think it is a rather cool functionality (especially when considerring things like logging). Roger pointed out a good gotcha with this in that one could quite easily context switch themselves to death but in the case ...
It's funny in way. I do like .NET 2.0, but some of reports I've been hearing regardings bugs in the Visual Studio do put you off.I have been working on a some code (part of a data transformation application), and today I finally had enough coded to start debugging it. I then started running into problems, including a slow editor, and finally this message: ContextSwitchDeadlock was detectedMessage: The CLR has been unable to transition from COM context 0x1b1ab0 to COM context 0x1b1c20 for 60 seconds. ...
I don't know if you already know this or not. But when you are in debugging mode and you see a yellow pointer moving to the lines which are being debugged. Now suppose that you are debugging and that yellow pointer is moving through your code and you just wanted to see on a particular line of code that what is the value of the variables. But since you were pressing F11 or F10 like crazy you passed that line. Now what do you do? Should you start the debugging once again and this time press F10 in ...
Don't - Say "Hey, I got a NullReferenceException," what's the problem?Do - Provide a Stack Trace/Dump with the line number it likely happened on. Don't - Get deep into your complicated program, find a bug and insist it's BillGs fault.Do - Reproduce the bug in some simple test program and tell the world. Remember, 9/10 times it's you. Don't - Decide there's a problem if you don't know the preferred behavior.Do - Always Assert your assumptions. If null can happen, check for it. BUT, if null must never ...
Today was horrible. Looked forward to slip away from work around 17:00. About 16:30 hell broke lose. The system i'm currently refactoring (completely) started to failure bigtime in the production environment ( not my code ;) ). After a hell lot of debugging i realized that some process that I wasn't aware of (apperently not so good communication between it-dev and it-op) was spamming one of the sql-servers with 15 (!!!) A4 pages long IN queries which in turn resulted in that the strange database ...
Been doing a bit of development in SQL lately and got frustrated with Query Analyzer and its lack of certain features (like unblimited undo's!), so I wrote one! After lots of positive feedback from co-workers, I decided to offer it to you. Integrated into Visual Studio .NET, SqlAssist is a plugin that basically turns the Visual Studio IDE into Query Analyzer on steriods. It includes advanced intellisense for SQL, powerful templates, pretty SQL formatting, many features for running and debugging your ...
I was doing a simples subscribtion by using a send port with filter like this BTS.ReceivePortName == "recPort1". I kept getting “The published message could not be routed because no subscribers were found “ error. For some reason I strongly believed that double quotation marks should be around the filter value. After 2 hours non-productive trying. I did the last pre-bug-report-try with a filter value without double quotation marks, and it worked. Then I found this note in BizTalk 2006 ...
I really liked the original exception management block put out by Microsoft. The reason is because it included all the information relating to an exception - not just the Message property. It made production debugging a breeze. Now with ASP.NET 2.0 and Health Monitoring something similar has been created but it doesn't quite cover all the details. I first ran into this in an application where I had created a custom exception, ArgumentFormatException, and passed along two additional properties. After ...
UPDATE : October 16, 2008 There are quite a few useful alternative solutions in case your problem doesnt get resolved after following the steps in this post. Make sure to check out the alternative options posted by readers in the comments. You may receive the error "Unable to automatically step into the server. The remote procedure could not be debugged.This usually indicates that debugging has not been enabled on the server." while trying to debug a Web Service. You may receive the error when you ...
I found another useful change in DNN core to debug exceptions. Function GetPortalModuleBase in Library\Components\Skins\Co... silently catchs exception with comment ' module was not loaded correctly I beleive that exception should not be catched at all, because nothing return after exception causes very unclear message “MinMax persistance type of cookie requires a ModuleId“ but at least for debugging purposes catch should be replaced with the followning code. (UPDATE 9/6/2006: ...
I can only agree whole heartedly with Michael Roth over at ThinComputing that - "This util is sure to come in handy ....." The User Mode Process Dumper (userdump) dumps any running Win32 processes memory image (including system processes such as csrss.exe, winlogon.exe, services.exe, etc) on the fly, without attaching a debugger, or terminating target processes. Generated dump file can be analyzed or debugged by using the standard debugging tools. The userdump generates dump file by several triggers; ...
I have a solution with Start ASP.NET project and several VB and C# library projects. When I stopped in Visual Studio 2005 debugger in the library class code, the file is shown with small “lock”. It doesn't allow me to do any changes, but show the message "Edit and Continue" "Changes are not allowed when the debugger has been attached to an already running process or the code being debugged is optimized". None of of these conditions is actually applicable for my case. Library is included in the solution, ...
You can automatically add Web.config file in your ASP.NET 2.0 Website Project. Simply free F5 or start debugging and it will ask you to add the web.config and enable the compilation attribute to true. I still prefer to manually adding the web.config since when added automatically it does not add most of the tags and web.config file is pretty much empty. powered by IMHO 1.3 ...
[Original Post Date: 16th August 2005] System.Diagnostics.Process class is a managed wrap over a subset of the ToolHelp API - as it enumerates only the process list. Not only that, it will list all the running processes, irrespective of whether they are running unmanaged code or running managed code. What if you wish to identify which of these processes are running managed code? Unfortunately, neither the ToolHelp API, nor the Process class allow us to identify managed processes from the list they ...
You may receive the error "Error while trying to run project: Unable to start debugging on the web server. You do not have permission to debug the application. The URL for this project is in the Internet zone. Click Help for more information."This is one of the various errors that appear when you are debugging and may haunt you until you do the following fix:-1. In the Internet Explorer, "Tools" Menu, select "Internet Options".2. Switch to "Security" Tab.3. Click on "Internet" (The Globe Icon. Its ...