Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Local file paths showing in stack traces

Reply
Thread Tools

Local file paths showing in stack traces

 
 
AbsolutG
Guest
Posts: n/a
 
      08-27-2008
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.as mx.cs

When the clients get an exception, in the stack trace they see
something like this:
etc...
at System.Xml.Linq.XContainer.ReadContentFrom(XmlRead er 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.as mx.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!

 
Reply With Quote
 
 
 
 
John Saunders
Guest
Posts: n/a
 
      08-28-2008
"AbsolutG" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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


 
Reply With Quote
 
 
 
 
AbsolutG
Guest
Posts: n/a
 
      08-28-2008
On Aug 27, 10:15*pm, "John Saunders" <(E-Mail Removed)> wrote:
> "AbsolutG" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed)...
>
> > 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!
 
Reply With Quote
 
John Saunders
Guest
Posts: n/a
 
      08-28-2008
"AbsolutG" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Aug 27, 10:15 pm, "John Saunders" <(E-Mail Removed)> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
C/C++ compilers have one stack for local variables and return addresses and then another stack for array allocations on the stack. Casey Hawthorne C Programming 3 11-01-2009 08:23 PM
Post about ThreadDump Stack Traces Bryan Duxbury Ruby 0 11-15-2007 01:44 AM
Generating stack traces Chrisie Java 8 03-12-2007 06:43 PM
My threads keep dying! Exceptions without stack traces? How to debug? Twisted Java 1 02-24-2006 08:13 PM
What are the enigmatic "offset" numbers in SOAP exception stack traces? Jim.Pollard@Blackbaud.com ASP .Net Web Services 0 11-23-2005 05:16 PM



Advertisments