Discussion:
Source Server failing to realise it's almost worked in VS 2008 SP1
(too old to reply)
Tristan MSDN Keen
2008-12-05 19:29:02 UTC
Permalink
I'm trying to introduce Symbol/Source server technology at our company, and
almost succeeding. I've a custom source indexing process (we use MKS - not
supported by the main distrib) correctly indexing the PDBs - srctool -x
successfully gets the source required. I also use symstore to put the
indexed PDB/EXE/DLLs in a network share. VS 2008 will download from the
symbol store to it's local cache, load the symbols and bring up the "Do you
trust this command?" dialog in response to the source indexing. The output
window shows it then running the command, which is successful & I can see the
downloaded file on the disk.

But then VS 2008 refuses to play, and says it's cannot access the source
code it just downloaded - bringing up the open file dialog or merely the
"Source code cannot be displayed" stop box. I'm at a loss as to how to
proceed - any suggestions?

The srcsrv block from the example I'm using is below:
SRCSRV: ini ------------------------------------------------
VERSION=1
VERCTRL=wget 1
DATETIME=05/12/2008 13:52:25
SRCSRV: variables ------------------------------------------
HTTP_ADDR=http://gwsmon/SrcServer/
HTTP_PROG=s:\testing\wget.exe
SRCSRVTRG=%targ%\%var2%\%var3%\%var5%\%var6%\%var7%\%var6%
SRCSRVCMD=%HTTP_PROG%
"%HTTP_ADDR%?Project=%var4%&Member=%var6%&Version=%var7%"
-O %SRCSRVTRG%
SRCSRV: source files ---------------------------------------
f:\godalming\Projects\IdentityProvider\Source\IntegrationTests\Integration.cs*ATLAS*NoCheckpoint*$23d$3A$2FMKS$2FProjects$2FRepo$2FExperian.Qas.Lib$23IdentityProvider$2FIntegrationTests*IntegrationTests*Integration.cs*1.2
SRCSRV: end ------------------------------------------------

It gets downloaded to
C:\DOCUME~1\username\LOCALS~1\APPLIC~1\SOURCE~1\ATLAS\NoCheckpoint\IntegrationTests\Integration.cs\1.2,
where I obviously have full rights so it's not a real file access security
issues.

The output window when this runs shows (some odd spaces in the filename -
significant or just display oddity?):

SRCSRV: s:\testing\wget.exe
"http://gwsmon/SrcServer/?Project=$23d$3A$2FMKS$2FProjects$2FRepo$2FExperian.Qas.Lib$23IdentityProvider$2FIntegrationTests&Member=Integration.cs&Version=1.2"
-O
"C:\DOCUME~1\tristan\LOCALS~1\APPLIC~1\SOURCE~1\ATLAS\NoCheckpoint\IntegrationTests\Integration.cs\1.2\Integration.cs"
--19:23:21--
http://gwsmon/SrcServer/?Project=$23d$3A$2FMKS$2FProjects$2FRepo$2FExperian.Qas.Lib$23IdentityProvider$2FIntegrationTests&Member=Integration.cs&Version=1.2
=>
`C:\DOCUME~1\username\LOCALS~1\APPLIC~1\SOURCE~1\ATLAS\NoCheckpoint\Inte
grationTests\Integration.cs\1.2\Integration.cs'
Resolving gwsmon... done.
Connecting to gwsmon[150.150.154.17]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3,347 [text/plain]

0K . ..

Thanks in advance for any help!

Tristan.
Jochen Kalmbach [MVP]
2008-12-05 20:07:48 UTC
Permalink
Hi Tristan!
"Do you trust this command?" dialog in response to the source indexing.
You can use a file called "srcsrv.ini" in the directory of
devenv.exe/srcsrv.dll (which is normaly the "%ProgramFiles%\Microsoft
Visual Studio 9.0\Common7\IDE"-directory).

For example with the following content:

[trusted commands]
wget.exe

See also:
http://msdn.microsoft.com/en-us/library/ms242029.aspx


Maybe the following will also help you:

Source Server Helps You Kill Bugs Dead In Visual Studio 2005
http://msdn.microsoft.com/en-us/magazine/cc163563.aspx
--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
Tristan MSDN Keen
2008-12-08 16:13:01 UTC
Permalink
I was using it "untrusted" so I could see the command it was about to run &
check it was fine before allowing it to continue. But using srcsrv.ini as
you suggested had no affect other than skipping the "Do you trust..."
question.

Looking through the links you sent for suggestions I also tried updating the
VS 2008 SP1 symsrv/srcsrv.dlls with the ones from the latest Debugging for
Windows release, and using the undocumented INDEXVERSION=2, but still no joy.

Any more ideas please?
Post by Jochen Kalmbach [MVP]
Hi Tristan!
"Do you trust this command?" dialog in response to the source indexing.
You can use a file called "srcsrv.ini" in the directory of
devenv.exe/srcsrv.dll (which is normaly the "%ProgramFiles%\Microsoft
Visual Studio 9.0\Common7\IDE"-directory).
[trusted commands]
wget.exe
http://msdn.microsoft.com/en-us/library/ms242029.aspx
Source Server Helps You Kill Bugs Dead In Visual Studio 2005
http://msdn.microsoft.com/en-us/magazine/cc163563.aspx
--
Greetings
Jochen
My blog about Win32 and .NET
http://blog.kalmbachnet.de/
Tristan MSDN Keen
2009-01-02 10:27:00 UTC
Permalink
FWIW, I never managed to solve the original problem (not being able to use an
external tool to retreive source file for VS IDE), but did manage another way.

I copied the source server block (using pdbstr.exe to look at it) from the
PDB provided for reading the .NET framework source code when debugging that
code.
This uses a direct HTTP reference that somehow the VS IDE understands that
it needs to be downloaded as a web request.
A bit of messing around created a suitable ASP.NET website with the right
sort of URL patterns to turn into subdirs.
srctool -x no longer works though - will have to live with that!

Tristan.
Post by Tristan MSDN Keen
I'm trying to introduce Symbol/Source server technology at our company, and
almost succeeding. I've a custom source indexing process (we use MKS - not
supported by the main distrib) correctly indexing the PDBs - srctool -x
successfully gets the source required. I also use symstore to put the
indexed PDB/EXE/DLLs in a network share. VS 2008 will download from the
symbol store to it's local cache, load the symbols and bring up the "Do you
trust this command?" dialog in response to the source indexing. The output
window shows it then running the command, which is successful & I can see the
downloaded file on the disk.
But then VS 2008 refuses to play, and says it's cannot access the source
code it just downloaded - bringing up the open file dialog or merely the
"Source code cannot be displayed" stop box. I'm at a loss as to how to
proceed - any suggestions?
SRCSRV: ini ------------------------------------------------
VERSION=1
VERCTRL=wget 1
DATETIME=05/12/2008 13:52:25
SRCSRV: variables ------------------------------------------
HTTP_ADDR=http://gwsmon/SrcServer/
HTTP_PROG=s:\testing\wget.exe
SRCSRVTRG=%targ%\%var2%\%var3%\%var5%\%var6%\%var7%\%var6%
SRCSRVCMD=%HTTP_PROG%
"%HTTP_ADDR%?Project=%var4%&Member=%var6%&Version=%var7%"
-O %SRCSRVTRG%
SRCSRV: source files ---------------------------------------
f:\godalming\Projects\IdentityProvider\Source\IntegrationTests\Integration.cs*ATLAS*NoCheckpoint*$23d$3A$2FMKS$2FProjects$2FRepo$2FExperian.Qas.Lib$23IdentityProvider$2FIntegrationTests*IntegrationTests*Integration.cs*1.2
SRCSRV: end ------------------------------------------------
It gets downloaded to
C:\DOCUME~1\username\LOCALS~1\APPLIC~1\SOURCE~1\ATLAS\NoCheckpoint\IntegrationTests\Integration.cs\1.2,
where I obviously have full rights so it's not a real file access security
issues.
The output window when this runs shows (some odd spaces in the filename -
SRCSRV: s:\testing\wget.exe
"http://gwsmon/SrcServer/?Project=$23d$3A$2FMKS$2FProjects$2FRepo$2FExperian.Qas.Lib$23IdentityProvider$2FIntegrationTests&Member=Integration.cs&Version=1.2"
-O
"C:\DOCUME~1\tristan\LOCALS~1\APPLIC~1\SOURCE~1\ATLAS\NoCheckpoint\IntegrationTests\Integration.cs\1.2\Integration.cs"
--19:23:21--
http://gwsmon/SrcServer/?Project=$23d$3A$2FMKS$2FProjects$2FRepo$2FExperian.Qas.Lib$23IdentityProvider$2FIntegrationTests&Member=Integration.cs&Version=1.2
=>
`C:\DOCUME~1\username\LOCALS~1\APPLIC~1\SOURCE~1\ATLAS\NoCheckpoint\Inte
grationTests\Integration.cs\1.2\Integration.cs'
Resolving gwsmon... done.
Connecting to gwsmon[150.150.154.17]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3,347 [text/plain]
0K . ..
Thanks in advance for any help!
Tristan.
Tristan MSDN Keen
2009-01-12 15:31:02 UTC
Permalink
OP again - final (hopefully!) issue that I encountered was that the length of
the command line/URL is limited.
When I got up to around 260 chars I'd get occaisonal errors, but after a bit
of trimming/compression
down to around the 150-200 mark it all seems to work fine again.

If you ever get your SRCSRV issuing errors that the "data is invalid" or
complaints about making a directory it might be this.

Tristan.
Post by Tristan MSDN Keen
FWIW, I never managed to solve the original problem (not being able to use an
external tool to retreive source file for VS IDE), but did manage another way.
I copied the source server block (using pdbstr.exe to look at it) from the
PDB provided for reading the .NET framework source code when debugging that
code.
This uses a direct HTTP reference that somehow the VS IDE understands that
it needs to be downloaded as a web request.
A bit of messing around created a suitable ASP.NET website with the right
sort of URL patterns to turn into subdirs.
srctool -x no longer works though - will have to live with that!
Tristan.
Post by Tristan MSDN Keen
I'm trying to introduce Symbol/Source server technology at our company, and
almost succeeding. I've a custom source indexing process (we use MKS - not
supported by the main distrib) correctly indexing the PDBs - srctool -x
successfully gets the source required. I also use symstore to put the
indexed PDB/EXE/DLLs in a network share. VS 2008 will download from the
symbol store to it's local cache, load the symbols and bring up the "Do you
trust this command?" dialog in response to the source indexing. The output
window shows it then running the command, which is successful & I can see the
downloaded file on the disk.
But then VS 2008 refuses to play, and says it's cannot access the source
code it just downloaded - bringing up the open file dialog or merely the
"Source code cannot be displayed" stop box. I'm at a loss as to how to
proceed - any suggestions?
SRCSRV: ini ------------------------------------------------
VERSION=1
VERCTRL=wget 1
DATETIME=05/12/2008 13:52:25
SRCSRV: variables ------------------------------------------
HTTP_ADDR=http://gwsmon/SrcServer/
HTTP_PROG=s:\testing\wget.exe
SRCSRVTRG=%targ%\%var2%\%var3%\%var5%\%var6%\%var7%\%var6%
SRCSRVCMD=%HTTP_PROG%
"%HTTP_ADDR%?Project=%var4%&Member=%var6%&Version=%var7%"
-O %SRCSRVTRG%
SRCSRV: source files ---------------------------------------
f:\godalming\Projects\IdentityProvider\Source\IntegrationTests\Integration.cs*ATLAS*NoCheckpoint*$23d$3A$2FMKS$2FProjects$2FRepo$2FExperian.Qas.Lib$23IdentityProvider$2FIntegrationTests*IntegrationTests*Integration.cs*1.2
SRCSRV: end ------------------------------------------------
It gets downloaded to
C:\DOCUME~1\username\LOCALS~1\APPLIC~1\SOURCE~1\ATLAS\NoCheckpoint\IntegrationTests\Integration.cs\1.2,
where I obviously have full rights so it's not a real file access security
issues.
The output window when this runs shows (some odd spaces in the filename -
SRCSRV: s:\testing\wget.exe
"http://gwsmon/SrcServer/?Project=$23d$3A$2FMKS$2FProjects$2FRepo$2FExperian.Qas.Lib$23IdentityProvider$2FIntegrationTests&Member=Integration.cs&Version=1.2"
-O
"C:\DOCUME~1\tristan\LOCALS~1\APPLIC~1\SOURCE~1\ATLAS\NoCheckpoint\IntegrationTests\Integration.cs\1.2\Integration.cs"
--19:23:21--
http://gwsmon/SrcServer/?Project=$23d$3A$2FMKS$2FProjects$2FRepo$2FExperian.Qas.Lib$23IdentityProvider$2FIntegrationTests&Member=Integration.cs&Version=1.2
=>
`C:\DOCUME~1\username\LOCALS~1\APPLIC~1\SOURCE~1\ATLAS\NoCheckpoint\Inte
grationTests\Integration.cs\1.2\Integration.cs'
Resolving gwsmon... done.
Connecting to gwsmon[150.150.154.17]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3,347 [text/plain]
0K . ..
Thanks in advance for any help!
Tristan.
rgavrilov
2012-02-29 22:44:57 UTC
Permalink
Tristan MSDN Keen wrote on 12/05/2008 14:29 ET
Post by Tristan MSDN Keen
I'm trying to introduce Symbol/Source server technology at our company, an
almost succeeding. I've a custom source indexing process (we use MKS - no
supported by the main distrib) correctly indexing the PDBs - srctool -
successfully gets the source required. I also use symstore to put th
indexed PDB/EXE/DLLs in a network share. VS 2008 will download from th
symbol store to it's local cache, load the symbols and bring up the "D
yo
trust this command?" dialog in response to the source indexing. Th
outpu
window shows it then running the command, which is successful & I can se
th
downloaded file on the disk
But then VS 2008 refuses to play, and says it's cannot access the sourc
code it just downloaded - bringing up the open file dialog or merely th
"Source code cannot be displayed" stop box. I'm at a loss as to ho
t
proceed - any suggestions
The srcsrv block from the example I'm using is below
SRCSRV: in
VERSION=
VERCTRL=wget
DATETIME/12/2008 13:52:2
SRCSRV: variable
HTTP_ADDR=http://gwsmon/SrcServer
HTTP_PROG=s:testingwget.ex
SRCSRVTRG=%targ%%var2%%var3%%var5%%var6%%var7%%var6
SRCSRVCMD=%HTTP_PROG
"%HTTP_ADDR%?Project=%var4%&Member=%var6%&Version=%var7%
-O %SRCSRVTRG
SRCSRV: source file
f:godalmingProjectsIdentityProviderSourceIntegrationTestsIntegration.cs*ATLAS*NoCheckpoint*$23d$3A$2FMKS$2FProjects$2FRepo$2FExperian.Qas.Lib$23IdentityProvider$2FIntegrationTests*IntegrationTests*Integration.cs*1.
Post by Tristan MSDN Keen
SRCSRV: en
It gets downloaded t
C:DOCUME~1usernameLOCALS~1APPLIC~1SOURCE~1ATLASNoCheckpointIntegrationTestsIntegration.cs1.2
Post by Tristan MSDN Keen
where I obviously have full rights so it's not a real file access securit
issues
The output window when this runs shows (some odd spaces in the filename
significant or just display oddity?)
SRCSRV: s:testingwget.ex
"http://gwsmon/SrcServer/?Project=$23d$3A$2FMKS$2FProjects$2FRepo$2FExperian.Qas.Lib$23IdentityProvider$2FIntegrationTests&Member=Integration.cs&Version=1.2
Post by Tristan MSDN Keen
-
"C:DOCUME~1tristanLOCALS~1APPLIC~1SOURCE~1ATLASNoCheckpointIntegrationTestsIntegration.cs1.2Integration.cs

http://gwsmon/SrcServer/?Project=$23d$3A$2FMKS$2FProjects$2FRepo$2FExperian.Qas.Lib$23IdentityProvider$2FIntegrationTests&Member=Integration.cs&Version=1.
Post by Tristan MSDN Keen
=
`C:DOCUME~1usernameLOCALS~1APPLIC~1SOURCE~1ATLASNoCheckpointInt
grationTestsIntegration.cs1.2Integration.cs
Resolving gwsmon... done
Connecting to gwsmon[150.150.154.17]:80... connected
HTTP request sent, awaiting response... 200 O
Length: 3,347 [text/plain
0K . .
Thanks in advance for any help
Tristan
do you mind sharing your mks source indexing solution?
Roman Gavrilov
2012-03-13 16:18:11 UTC
Permalink
Tristan, I am trying to do the same (Source Index for MKS). Is there a chance I could get a copy of your script?

clavrg at hotmail not dot com
Post by Tristan MSDN Keen
I'm trying to introduce Symbol/Source server technology at our company, and
almost succeeding. I've a custom source indexing process (we use MKS - not
supported by the main distrib) correctly indexing the PDBs - srctool -x
successfully gets the source required. I also use symstore to put the
indexed PDB/EXE/DLLs in a network share. VS 2008 will download from the
symbol store to it's local cache, load the symbols and bring up the "Do you
trust this command?" dialog in response to the source indexing. The output
window shows it then running the command, which is successful & I can see the
downloaded file on the disk.
But then VS 2008 refuses to play, and says it's cannot access the source
code it just downloaded - bringing up the open file dialog or merely the
"Source code cannot be displayed" stop box. I'm at a loss as to how to
proceed - any suggestions?
SRCSRV: ini ------------------------------------------------
VERSION=1
VERCTRL=wget 1
DATETIME=05/12/2008 13:52:25
SRCSRV: variables ------------------------------------------
HTTP_ADDR=http://gwsmon/SrcServer/
HTTP_PROG=s:\testing\wget.exe
SRCSRVTRG=%targ%\%var2%\%var3%\%var5%\%var6%\%var7%\%var6%
SRCSRVCMD=%HTTP_PROG%
"%HTTP_ADDR%?Project=%var4%&Member=%var6%&Version=%var7%"
-O %SRCSRVTRG%
SRCSRV: source files ---------------------------------------
f:\godalming\Projects\IdentityProvider\Source\IntegrationTests\Integration.cs*ATLAS*NoCheckpoint*$23d$3A$2FMKS$2FProjects$2FRepo$2FExperian.Qas.Lib$23IdentityProvider$2FIntegrationTests*IntegrationTests*Integration.cs*1.2
SRCSRV: end ------------------------------------------------
It gets downloaded to
C:\DOCUME~1\username\LOCALS~1\APPLIC~1\SOURCE~1\ATLAS\NoCheckpoint\IntegrationTests\Integration.cs\1.2,
where I obviously have full rights so it's not a real file access security
issues.
The output window when this runs shows (some odd spaces in the filename -
SRCSRV: s:\testing\wget.exe
"http://gwsmon/SrcServer/?Project=$23d$3A$2FMKS$2FProjects$2FRepo$2FExperian.Qas.Lib$23IdentityProvider$2FIntegrationTests&Member=Integration.cs&Version=1.2"
-O
"C:\DOCUME~1\tristan\LOCALS~1\APPLIC~1\SOURCE~1\ATLAS\NoCheckpoint\IntegrationTests\Integration.cs\1.2\Integration.cs"
--19:23:21--
http://gwsmon/SrcServer/?Project=$23d$3A$2FMKS$2FProjects$2FRepo$2FExperian.Qas.Lib$23IdentityProvider$2FIntegrationTests&Member=Integration.cs&Version=1.2
=>
`C:\DOCUME~1\username\LOCALS~1\APPLIC~1\SOURCE~1\ATLAS\NoCheckpoint\Inte
grationTests\Integration.cs\1.2\Integration.cs'
Resolving gwsmon... done.
Connecting to gwsmon[150.150.154.17]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3,347 [text/plain]
0K . ..
Thanks in advance for any help!
Tristan.
Post by Jochen Kalmbach [MVP]
Hi Tristan!
You can use a file called "srcsrv.ini" in the directory of
devenv.exe/srcsrv.dll (which is normaly the "%ProgramFiles%\Microsoft
Visual Studio 9.0\Common7\IDE"-directory).
[trusted commands]
wget.exe
http://msdn.microsoft.com/en-us/library/ms242029.aspx
Source Server Helps You Kill Bugs Dead In Visual Studio 2005
http://msdn.microsoft.com/en-us/magazine/cc163563.aspx
--
Greetings
Jochen
My blog about Win32 and .NET
http://blog.kalmbachnet.de/
Post by Tristan MSDN Keen
I was using it "untrusted" so I could see the command it was about to run &
check it was fine before allowing it to continue. But using srcsrv.ini as
you suggested had no affect other than skipping the "Do you trust..."
question.
Looking through the links you sent for suggestions I also tried updating the
VS 2008 SP1 symsrv/srcsrv.dlls with the ones from the latest Debugging for
Windows release, and using the undocumented INDEXVERSION=2, but still no joy.
Any more ideas please?
Post by Tristan MSDN Keen
FWIW, I never managed to solve the original problem (not being able to use an
external tool to retreive source file for VS IDE), but did manage another way.
I copied the source server block (using pdbstr.exe to look at it) from the
PDB provided for reading the .NET framework source code when debugging that
code.
This uses a direct HTTP reference that somehow the VS IDE understands that
it needs to be downloaded as a web request.
A bit of messing around created a suitable ASP.NET website with the right
sort of URL patterns to turn into subdirs.
srctool -x no longer works though - will have to live with that!
Tristan.
Post by Tristan MSDN Keen
OP again - final (hopefully!) issue that I encountered was that the length of
the command line/URL is limited.
When I got up to around 260 chars I'd get occaisonal errors, but after a bit
of trimming/compression
down to around the 150-200 mark it all seems to work fine again.
If you ever get your SRCSRV issuing errors that the "data is invalid" or
complaints about making a directory it might be this.
Tristan.
f:godalmingProjectsIdentityProviderSourceIntegrationTestsIntegration.cs*ATLAS*NoCheckpoint*$23d$3A$2FMKS$2FProjects$2FRepo$2FExperian.Qas.Lib$23IdentityProvider$2FIntegrationTests*IntegrationTests*Integration.cs*1.2
C:DOCUME~1usernameLOCALS~1APPLIC~1SOURCE~1ATLASNoCheckpointIntegrationTestsIntegration.cs1.2,
"http://gwsmon/SrcServer/?Project=$23d$3A$2FMKS$2FProjects$2FRepo$2FExperian.Qas.Lib$23IdentityProvider$2FIntegrationTests&Member=Integration.cs&Version=1.2"
"C:DOCUME~1tristanLOCALS~1APPLIC~1SOURCE~1ATLASNoCheckpointIntegrationTestsIntegration.cs1.2Integration.cs"
http://gwsmon/SrcServer/?Project=$23d$3A$2FMKS$2FProjects$2FRepo$2FExperian.Qas.Lib$23IdentityProvider$2FIntegrationTests&Member=Integration.cs&Version=1.2
do you mind sharing your mks source indexing solution?
Loading...