all groups > visual studio .net debugging > january 2004 >
You're in the

visual studio .net debugging

group:

Can't debug SQL in .NET Web Service in VS.NET 2003 on Windows Server 2003 Enterprise Edition


Can't debug SQL in .NET Web Service in VS.NET 2003 on Windows Server 2003 Enterprise Edition John Dougrez-Lewis
1/15/2004 2:28:31 PM
visual studio .net debugging:
Hi,

I'm currently trying to stop at breakpoints in some SQL Server 2000
T-SQL stored procedure whilst debugging a C# .NET Web Service running in
VS.NET 2003 on Windows Server 2003 Enterprise Edition, but it just isn't
working.

I can see that my code is successfully calling the DB stored procedures,
albeit without stopping on the breakpoints.

I naturally run "Exec sp_sdidebug 'legacy_on'" each time I reboot.


I've tried enabling SQL Debugging on *each* and every single one of the
130 projects within the VS.NET solution that I'm debugging.

I have tried absolutely everything listed in all the articles in MSDN to
get it working, but it just won't work.

I'm running Windows Server 2003 Enterprise Edition on a Intel SE7505VB2
Dual XEON 3.06MHz.with all the latest patches installed.

I've tried installing SQL Server 2000 sp3a and then uninstalling and
re-installing VS.NET 2003 to reset the mssdi98.dll file.

I've tried changing all the Security Settings and identities that the
various services and applications run under as suggested in MSDN.


I'm not getting any "SQL" error messages displayed in the output window
when I try to start debugging.


I note there was a bug fix on "FIX: Cannot Step into Stored Procedure
from ASP.NET Code on Windows Server 2003", but this suggests the problem
was with VS.NET 2002 and fixed in VS.NET 2003.

Even so, I've tried running IIS6.0 in IIS5 isolation mode which was the
fix for the VS.NET 2002 problem but that didn't work.


I note that in VS.NET, the Server Explorer takes an age to find my local
SQL Server instance and then a further age to find the databases on the
Server.

After a while with the program repeatedly opening & closing DB
connections I get a connection error, even though I have connection
pooling disabled via "pooling=false" in the SQL connection string.


Is this a continuing known problem?

Is there an MS workaround or patch for this?

Is there an MS utility that can check all my settings and tell me why
SQL debugging is not working?


I've also got Compuware DevPartnerStudio 7.1 installed, but this is not
active and is not being used.


Regards,

John

John Dougrez-Lewis
RE: Can't debug SQL in .NET Web Service in VS.NET 2003 on Windows Server 2003 Enterprise Edition timhuang NO[at]SPAM online.microsoft.com
1/16/2004 7:35:30 AM
Hello John,

Thanks for your post. As I understand, the problem you are facing is that
VS .NET fails to debug into Stored Procedure. Please correct me if there is
any misunderstanding. I performed some research on this issue, and now I'd
like to share the following information with you:

1. I set up SQL Debugging per MSDN documentation, and followed the steps
listed in the KB article Q316549 on my Windows Server 2003, VS .NET 2003
and SQL Server 2000 testing environment and it works properly on my side.

Setting Up SQL Debugging
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/htm
l/vxlrfsettingupsqldebugging.asp

HOW TO: Debug Stored Procedures in Visual Studio .NET
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q316549

Would you please check if a .NET WinForm application can reproduce the
problem?

2. As you know, a web service in Windows Server 2003 will be executed under
the ASPNET account. I suggest that you can force your web service running
under more priviliged user account by specifying the userName and password
attributes in the <identity> tag of the Web.config file for it. For example:

<identity impersonate="true" userName="accountname" password="password"
/>

3. You might have already found the following article, but I'll include it
here for completeness.

INFO: Troubleshooting Tips for T-SQL Debugger in Visual Studio .NET
http://support.microsoft.com/?id=817178

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Re: Can't debug SQL in .NET Web Service in VS.NET 2003 on Windows Server 2003 Enterprise Edition John Dougrez-Lewis
1/16/2004 10:21:00 AM

[quoted text, click to view]

Thanks for the suggestions, but with the exception of the Web.Config
setting, I've already gone through everything listed.

Changing the Web.Config setting doesn't help either.

Could one of you guys at MSFT write a small app that tests all the
required conditions and flags the settings that are wrong?

Regards,

Re: Can't debug SQL in .NET Web Service in VS.NET 2003 on Windows Server 2003 Enterprise Edition timhuang NO[at]SPAM online.microsoft.com
1/19/2004 1:08:21 PM
Hello John,

Thanks for your feedback.

Could you please tell me whether or not you can reproduce the problem on a
WinForm application? In the meantime, I am creating a WebService to verify
it again on my side.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Re: Can't debug SQL in .NET Web Service in VS.NET 2003 on Windows Server 2003 Enterprise Edition timhuang NO[at]SPAM online.microsoft.com
1/21/2004 7:02:35 AM
Hello John,

Based on my research, I am able to debug SQL on my side. To narrow down the
problem, I suggest that you can try the following KB article to check if
you can debug SQL with a WinForm application.

HOW TO: Debug Stored Procedures in Visual Studio .NET
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q316549

I look forward to your result.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Re: Can't debug SQL in .NET Web Service in VS.NET 2003 on Windows Server 2003 Enterprise Edition John Dougrez-Lewis
1/22/2004 6:07:36 AM
[quoted text, click to view]

I'm in the middle of a big chunk of unreleated work at the moment.

When I get a chance I'll check it out and let you know.

Thanks,

AddThis Social Bookmark Button