Web Service Debugging

Discussion in 'ASP .Net Web Services' started by John Cantley, Mar 14, 2007.

  1. John Cantley

    John Cantley Guest

    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
     
    John Cantley, Mar 14, 2007
    #1
    1. Advertising

  2. John Cantley

    Glenn Guest

    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

    "John Cantley" <> wrote in message
    news:#...
    > 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, Mar 15, 2007
    #2
    1. Advertising

  3. John Cantley

    Valko Guest

    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;
    }


    --
    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




    "John Cantley" wrote:

    > 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
    >
    >
    >
     
    Valko, Mar 17, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. hocho888
    Replies:
    1
    Views:
    661
  2. Michael Averstegge
    Replies:
    0
    Views:
    4,273
    Michael Averstegge
    Jan 10, 2006
  3. Not Me
    Replies:
    1
    Views:
    3,209
    Not Me
    Jun 5, 2007
  4. Isaias Formacio Serna

    Web Service that calls an external Web Service

    Isaias Formacio Serna, Jan 28, 2004, in forum: ASP .Net Security
    Replies:
    5
    Views:
    259
  5. Leo Violette
    Replies:
    0
    Views:
    1,068
    Leo Violette
    Apr 17, 2009
Loading...

Share This Page