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

May 6th, 2010 by ganton | Print

An exception that you can get during application  debugging when you attach to an aspnet_wp.exe process. If you use a published web site it is fine but attaching to it in some case can cause this exception to happened. What is the reason? By default the debugger tries to attach to and debug T-SQl code and if the user that your application uses doesn’t have rights to access stored procedures that are required for debugging  this exception will appear. When attaching to a process we see the window below.

image

By default, selected options for aspnet_wp process are to attach to T-SQL code and Managed code. If you need to debug the T-SQL code you must give proper rights to your user but if you don’t need to debug it you can just reconfigure attach to options. For this just press [Select…] and reconfigure it like it is shown below.

image

As you can see T-SQL option is not selected and the debugger will not attach to this code and the error will disappear and it is ready for testing.

Leave a Reply