Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / March 2007

Tip: Looking for answers? Try searching our database.

Web Service Debugging

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John Cantley - 14 Mar 2007 18:23 GMT
Usually I write the web service into my solution and can debug it with no
problems. My current situation does not give me access to the source control
so I want to keep the web service out of the main web solution. So in
essence how do I debug the webservice? I can instantiate it in my web
project but never hit any breakpoints. I get an error when I try to step
into the webservice call from the web project. If I don't step in but just
f10 it, the webservice never stops at a breakpoint. I am attaching to the
WebDev.WebServer.EXE process and I get no breaks. I do not want to debug
this from the discovery but the other web project.

Thanks,
John Cantley
Glenn - 15 Mar 2007 08:17 GMT
John

If you want to debug on the same machine put a break point on the entry
point of the web service and start it up in debug.  From another instance of
VS run your client app and put a break point at the point you call the web
service.  You should now be able to step across into the web service code.

HTH

Glenn

> Usually I write the web service into my solution and can debug it with no
> problems. My current situation does not give me access to the source control
[quoted text clipped - 8 lines]
> Thanks,
> John Cantley
Valko - 18 Mar 2007 00:29 GMT
you can try to Override wse request too:

protected override System.Net.WebRequest GetWebRequest(Uri uri)
{
   PropertyInfo requestPropertyInfo = null;

   WebRequest request = base.GetWebRequest(uri);

   if (requestPropertyInfo==null)

   requestPropertyInfo = request.GetType().GetProperty("Request");

   // Retrieve underlying web request
   HttpWebRequest webRequest =
(HttpWebRequest)requestPropertyInfo.GetValue(request, null);

   // Setting KeepAlive
   //webRequest.KeepAlive = false;
   // or better use diffrent protocol
   webRequest.ProtocolVersion = System.Net.HttpVersion.Version10;

   return request;
}

Signature

Yotov, Valko
MCSD.NET, MCAD.NET, MCDBA 2000, MCP NT/2000

-------------------------------

"Live as if you were to die tomorrow. Learn as if you were to live forever."

-- Ghandi

> Usually I write the web service into my solution and can debug it with no
> problems. My current situation does not give me access to the source control
[quoted text clipped - 8 lines]
> Thanks,
> John Cantley

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.