About Links Archives Search Feed Albums of Note


But I don’t want to execute sp_sdidebug

I’ve been trying my hand at extending Community Server [http://www.communityserver.org]. The SDK [http://communityserver.org/files/folders/communityserver/default.aspx] and Dave Stokes’ SDK installation guide [http://www.davestokes.net/files/8/default.aspx] are invaluable but I came upon an awkward glitch when trying to debug my first extension. Having attached the VS debugger to the web server process, and done anything in Community Server I’d get An exception of type ‘System.Data.SqlClient.SqlException’ occurred in System.Data.dll but was not handled in user code

Additional information: EXECUTE permission denied on object ‘sp_sdidebug’, database ‘master’, owner ‘dbo’.

A quick bit of googling reveals that this isn’t a uncommon but it’s related to SQL debugging and I wasn’t attempting to do that. None of my VS projects had ‘Enable SQL Debugging’ checked. Fortunately the solution was quite straightforward : when attaching the aspnet_wp.exe process to VS, make sure you are only attach managed code. * Click Tools > Attach to Process * Click the Select button just above the list of available processes to attach to * Select ‘Debug these code types’ and check only the boxes for Managed (and Native if necessary) code. * Click OK * Click Attach * Debug as normal

Full credit to techenvelope [http://www.techenvelope.com/2006/03/09/my-experiences-with-visual-studionet-2005/] for this.

For reference though, if you are trying to do some SQL debugging, the MS advice [http://support.microsoft.com/default.aspx?scid=kb;EN-US;839280] is to * install Service Pack 4 for SQL2000 [http://www.microsoft.com/downloads/details.aspx?familyid=8E2DFC8D-C20E-4446-99A9-B7F0213F8BC5&displaylang=en] if you haven’t already or * grant the ASPNET user the EXECUTE permission on sp_sdidebug)

The actual support articles are * Troubleshooting tips for T-SQL Debugger in Visual Studio .NET [http://support.microsoft.com/kb/817178/en-us] * FIX: SQL debugging does not work in Visual Studio .NET after you install Windows XP Service Pack 2 [http://support.microsoft.com/default.aspx?scid=kb;EN-US;839280] * PRB: A Database User Cannot Debug Stored Procedures That Another User Owns [http://support.microsoft.com/default.aspx?scid=kb;EN-US;328173]

Posted on September 29, 2006   #Geek Stuff  






← Next post    ·    Previous post →