Local file paths showing in stack traces

Discussion in 'ASP .Net Web Services' started by AbsolutG, Aug 27, 2008.

  1. AbsolutG

    AbsolutG Guest

    This is not exactly a show-stopper but I am concerned about it. I was
    hoping someone could shed some light on it.

    I have a web service that I've been programming on my local machine
    using Visual Studio 2008 for a while. Whenever it's ready for
    deployment I simply upload it to a web server using the Publish tool
    in VS2008. Client applications running from other machines (neither
    mine, nor the server) consume the web service from the server just
    fine.

    The thing that is making me nervous, though, is that whenever those
    clients get an exception from my web service and look at the stack
    trace, they see the complete path of the code files in my local
    machine!

    An example would be that I have a file in my web service project in
    the following path:
    C:\Documents and Settings\Administrator\My Documents\Visual Studio
    2008\Projects\MyWebService\MyWebService\Service.asmx.cs

    When the clients get an exception, in the stack trace they see
    something like this:
    etc...
    at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions
    o)
    at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions
    options)
    at System.Xml.Linq.XDocument.Load(XmlReader reader)
    at C:\Documents and Settings\Administrator\My Documents\Visual Studio
    2008\Projects\MyWebService\MyWebService\Service.asmx.cs:line 57
    etc...

    This means (I believe) that somehow, somewhere, the web service I'm
    publishing to the web server is saving information about where my
    local files are located in my hard drive.

    Is there a way to avoid having this information from being shown?

    Please don't pay attention to the exception handling. That is not what
    worries me right now. What worries me is that the web service seems to
    have a reference to my local files, even though the it is running on
    the web server.

    Thanks!
    AbsolutG, Aug 27, 2008
    #1
    1. Advertising

  2. "AbsolutG" <> wrote in message
    news:...
    > The thing that is making me nervous, though, is that whenever those
    > clients get an exception from my web service and look at the stack
    > trace, they see the complete path of the code files in my local
    > machine!

    ....
    > Is there a way to avoid having this information from being shown?


    Is this in a debug build or a release build? That information should not be
    present in a release build. In fact, I believe that information is only kept
    in the .PDB files.

    --
    John Saunders | MVP - Connected System Developer
    John Saunders, Aug 28, 2008
    #2
    1. Advertising

  3. AbsolutG

    AbsolutG Guest

    On Aug 27, 10:15 pm, "John Saunders" <> wrote:
    > "AbsolutG" <> wrote in message
    >
    > news:...
    >
    > > The thing that is making me nervous, though, is that whenever those
    > > clients get an exception from my web service and look at the stack
    > > trace, they see the complete path of the code files in my local
    > > machine!

    > ...
    > > Is there a way to avoid having this information from being shown?

    >
    > Is this in a debug build or a release build? That information should not be
    > present in a release build. In fact, I believe that information is only kept
    > in the .PDB files.
    >
    > --
    > John Saunders | MVP - Connected System Developer


    You are right!

    I was using the debug build so I tried to use the release build as you
    said but it didn't make any difference at first; the paths were still
    showing. I then checked on the web server and noticed that the pdb
    file was still published, even though I set the configuration to use
    the release build and the Publish tools deletes all the files in the
    server before copying the files needed. I then deleted the pdb file
    manually and tried again. The paths did not show!

    As you said, the path information seems to be stored in that pdb file.
    Problem is that I've been using the Publish tool from VS2008 to move
    the files to the server. Is there a way to avoid having the pdb file
    copied when publishing the project? Or should I simply move the files
    manually to the server and forget about the Publish tool?

    Thanks!
    AbsolutG, Aug 28, 2008
    #3
  4. "AbsolutG" <> wrote in message
    news:...
    > On Aug 27, 10:15 pm, "John Saunders" <> wrote:
    >
    > You are right!
    >
    > I was using the debug build so I tried to use the release build as you
    > said but it didn't make any difference at first; the paths were still
    > showing. I then checked on the web server and noticed that the pdb
    > file was still published, even though I set the configuration to use
    > the release build and the Publish tools deletes all the files in the
    > server before copying the files needed. I then deleted the pdb file
    > manually and tried again. The paths did not show!
    >
    > As you said, the path information seems to be stored in that pdb file.
    > Problem is that I've been using the Publish tool from VS2008 to move
    > the files to the server. Is there a way to avoid having the pdb file
    > copied when publishing the project? Or should I simply move the files
    > manually to the server and forget about the Publish tool?


    If you change your build to not build the PDB files, then I guarantee they
    won't be published.

    --
    John Saunders | MVP - Connected System Developer
    John Saunders, Aug 28, 2008
    #4
    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. Twisted
    Replies:
    1
    Views:
    1,045
    Twisted
    Feb 24, 2006
  2. Chrisie

    Generating stack traces

    Chrisie, Mar 10, 2007, in forum: Java
    Replies:
    8
    Views:
    340
    Chris Uppal
    Mar 12, 2007
  3. Replies:
    0
    Views:
    178
  4. Bryan Duxbury

    Post about ThreadDump Stack Traces

    Bryan Duxbury, Nov 15, 2007, in forum: Ruby
    Replies:
    0
    Views:
    90
    Bryan Duxbury
    Nov 15, 2007
  5. Replies:
    0
    Views:
    153
Loading...

Share This Page