473,407 Members | 2,629 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Breakpoint on a web service

Hi,

I have a .Net Visual Studio solution with one asp.net Web application, which
uses a Asp.Net Web service. Both are compiled in debug mode, and both are
using the Studio development web server for debugging. I have also add the
Web reference to the web service with the "Add Web service in the solution"
choice, that is the Web app starts the Web service with the Studio
development web server.

So I thought I could set breakpoints on the web service C# code. But as soon
as I start the main web app, the breakpoints are turning yellow with a
exclamation mark and they don't stop anything.

Did I miss something ?

Best regards

Sep 4 '08 #1
5 5551
"Oriane" <or****@noemail.noemailwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
Hi,

I have a .Net Visual Studio solution with one asp.net Web application,
which uses a Asp.Net Web service. Both are compiled in debug mode, and
both are using the Studio development web server for debugging. I have
also add the Web reference to the web service with the "Add Web service in
the solution" choice, that is the Web app starts the Web service with the
Studio development web server.

So I thought I could set breakpoints on the web service C# code. But as
soon as I start the main web app, the breakpoints are turning yellow with
a exclamation mark and they don't stop anything.

Did I miss something ?

Best regards
Are they both part of the same solution?
Sep 4 '08 #2
Hi Jeff,
"Jeff Dillon" <je********@hotmailremove.coma écrit dans le message de
news:ud*************@TK2MSFTNGP06.phx.gbl...
"Oriane" <or****@noemail.noemailwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...

Are they both part of the same solution?
Yes

Sep 5 '08 #3
Hello Oriane,

Thanks for your post. My name is Hongye Sun [MSFT]. It is my pleasure to
work on this issue for you.

From your description of the symptom, I understand that It is very easy to
confuse people when they are developing multiple websites, including web
service, at the first time. So I will explain the cause and the solution
from scratch to help you to understand.

=== CAUSE ===
First let us clarify how the website works. Website including web service,
they cannot be working individually. Every website of ASP.NET must be
hosted in a web server process. A web server process in windows is a
typical windows process. For example, IIS is a web server, which will run a
windows server process (named w3wp.exe in win2k03) to host websites.

Next, how can we debug the code of a website? A windows process is the
basic unit that we could attach debugger to. So if we want to debug on
website, we should first attach the debugger to the web server process.

Now let us take a look of how the web server hosts website in Visual
Studio. In VS 2008, it supports two types of web server. One is IIS and the
other is built-in ASP.NET Development Server. When one or multiple websites
are run in IIS, they will be all hosted in IIS service process as we
mentioned before. If one or multiple websites are run in built-in ASP.NET
Development Server in Visual Studio, Visual Studio will create built-in web
server process for each website.
We can check what type of web server that we are using by opening website
properties, select "Start Options" in the menu and view "Server" section on
the right side. If we are using default web server, that means built-in web
server. Or we are using custom server, that means external web server like
IIS. By default, it is using built-in web server. For more information
about web server in Visual Studio, please visit:
http://msdn.microsoft.com/en-us/library/58wxa9w5.aspx.

For your scenario, I suppose that your website and web service are all
hosted by built-in web server. So when you run them, there will be two
built-in web server processes started by Visual Studio. If you want to
debug two projects, the debugger should attach to both of the web server
processes. However, Visual Studio does not know about that. It just
automatically attaches to startup website's web server process when
clicking start debugging, while the web server of web service is not
attached. That's why you cannot debug web service code.

=== SOLUTION ===
Before starting debugging, please make sure that in Web.config files in
both website and web service project, the compilation debug is set to true.
After clicking "Start Debugging" button. Please do actions as below:
1. Click top menu item "Debug". In its expanding menu, select "Attach to
Process". (or press shortcut key ALT+SHIFT+P)
2. The "Attach to Process" dialog is shown up and there will be two
processes named "WebDev.WebServer.EXE".
3. Select one that you can attach to. Since the other is already attached,
you will see it gray out and cannot attach to it.
4. Click Attach button.
You can view the attached processes by opening from menu:
Debug->Windows->Processes, when VS.net is in a debug mode.
For how to attach debugger to a process, please visit:
http://msdn.microsoft.com/en-us/library/3s68z0b3.aspx.

After that, you should be able to debug web service code.

Please try the solution above and let me know if it works for you. I am
looking forward to your reply. Have a great day!

Regards,
Hongye Sun (ho*****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/...tance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

================================================== =======
From: "Oriane" <or****@noemail.noemail>
Subject: Breakpoint on a web service
Date: Thu, 4 Sep 2008 18:21:52 +0200
Newsgroups:
microsoft.public.dotnet.framework.aspnet,microsoft .public.vstudio.general

Hi,

I have a .Net Visual Studio solution with one asp.net Web application,
which
uses a Asp.Net Web service. Both are compiled in debug mode, and both are
using the Studio development web server for debugging. I have also add the
Web reference to the web service with the "Add Web service in the solution"
choice, that is the Web app starts the Web service with the Studio
development web server.

So I thought I could set breakpoints on the web service C# code. But as
soon
as I start the main web app, the breakpoints are turning yellow with a
exclamation mark and they don't stop anything.

Did I miss something ?

Best regards

Sep 5 '08 #4
Hi Hongye,
""Hongye Sun [MSFT]"" <ho*****@online.microsoft.coma écrit dans le message
de news:3X**************@TK2MSFTNGHUB02.phx.gbl...
Hello Oriane,

Thanks for your post. My name is Hongye Sun [MSFT]. It is my pleasure to
work on this issue for you.
[...]After that, you should be able to debug web service code.
>
Please try the solution above and let me know if it works for you. I am
looking forward to your reply. Have a great day!
I didn't have the time up to now, but I will try next week.

Thank you very much.

Sep 5 '08 #5
Hi Oriane,

It is always our pleasure to help you. If you have any problem when
implementing the solution, please feel free to let me know. I will try my
best to reply you at the first time.

Have a nice day!

Regards,
Hongye Sun (ho*****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
Sep 8 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ash | last post by:
Hi all, I have a C# web application which calls a number of stored procedures. I wish to step into the stored procedures while debugging i.e "Mix-mode debugging": I have completed the following...
3
by: Ash | last post by:
Hi all, I have a C# web application which calls a number of stored procedures. I wish to step into the stored procedures while debugging i.e "Mix-mode debugging": I have completed the following...
4
by: Wal Turner | last post by:
Consider the following simple class: public class ClassA { public static string VAR = "hello"; } public void MethodA() { while(true)
5
by: lawrencelee | last post by:
My purpose is to know which code reads value from a certain address. So I want to set a memory breakpoint and when cpu reads from the address, the breakpoint will be hit. But in the "Data breakpoint"...
2
by: Ash | last post by:
Hi all, I have a C# web application which calls a number of stored procedures. I wish to step into the stored procedures while debugging i.e "Mix-mode debugging": I have completed the following...
7
by: AC [MVP MCMS] | last post by:
Wierd situation here. Running ASP.NET 1.1 on Win2003. I have to manually attach the debugger to a process in order to debug. So I set a breakpoint in an obvious place (like within the Page.Load...
5
by: One Handed Man [ OHM# ] | last post by:
Pressing Button2 does cause the breakpoint shown in Button1's handler to be active the first time. After stopping the program and restarting it it break as soon as you start Button1, Any ideas...
5
by: Max2006 | last post by:
Hi, I am using Visual C# 2005 and I like to setup breakpoint that pause execution upon a class variable change. Is that possible?
9
by: Oriane | last post by:
Hi, I can set a breakpoint in my javascript client side code, but as sson as I start the Ajax Asp.Net application in debug mode, an exlamation mark shows up on the breakpoint, and a tooltip...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.