System.UnauthorizedAccessException on GET

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
davenovak
Posts: 222
Joined: Mon Jan 15, 2007 2:15 pm
Location: Atlanta, GA

System.UnauthorizedAccessException on GET

Post by davenovak » Wed Apr 21, 2010 2:26 pm

Hi --

I'm using Vault 5.0.3 on Windows 7 Enterprise / 64-bit client. Many people on my team (with similar configuration) are seeing client-side-only error when doing a Get Latest from the Vault server. Here's a sampling of such errors:

Code: Select all

[4/21/2010 1:39:53 PM] Finished get latest of $
[4/21/2010 1:33:10 PM] Local file update for $/Crytek_Releases/v3_1_0/Code/Tools/SphericalHarmonics/PRT/SampleGenerator.h failed: System.UnauthorizedAccessException: Access to the path 'C:\Src\Crytek_Releases\v3_1_0\Code\Tools\SphericalHarmonics\PRT\SampleGenerator.h' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
   at System.IO.File.OpenFile(String path, FileAccess access, SafeFileHandle& handle)
   at System.IO.File.SetLastWriteTimeUtc(String path, DateTime lastWriteTimeUtc)
   at System.IO.File.SetLastWriteTime(String path, DateTime lastWriteTime)
   at VaultClientOperationsLib.WorkingFolder.UpdateWorkingFile(VaultClientFile file, Int64 targetVersion, Int64 displayVersion, MergeType merge, VaultDateTime dt, Boolean makeBackups, OverwritePrompt PromptData)
   at VaultClientOperationsLib.WorkingFolder.UpdateWorkingFile(VaultClientFile file, Int64 targetVersion, Int64 displayVersion, MergeType merge, VaultDateTime dt, OverwritePrompt PromptData)
   at VaultClientOperationsLib.ClientInstance.ProcessGetFileRequests(GetFileInfo[] infos, MakeWritableType makeWritable, SetFileTimeType setFileTime, MergeType merge, Boolean updateHiddenFilesOnly, String ancestorFullPath, Boolean flat, String ancestorDiskPath, OverwritePrompt PromptData, Boolean isLabelGet, String currentPathToLabelItem, Int64 labelID, Boolean isRetry, Boolean isGetByDisplayVersion)
[4/21/2010 1:33:12 PM] Local file update for $/Crytek_Releases/v3_1_0/Code/Tools/SphericalHarmonics/PRT/SimpleIndexedMesh.cpp failed: System.UnauthorizedAccessException: Access to the path 'C:\Src\Crytek_Releases\v3_1_0\Code\Tools\SphericalHarmonics\PRT\SimpleIndexedMesh.cpp' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
   at System.IO.File.OpenFile(String path, FileAccess access, SafeFileHandle& handle)
   at System.IO.File.SetLastWriteTimeUtc(String path, DateTime lastWriteTimeUtc)
   at System.IO.File.SetLastWriteTime(String path, DateTime lastWriteTime)
   at VaultClientOperationsLib.WorkingFolder.UpdateWorkingFile(VaultClientFile file, Int64 targetVersion, Int64 displayVersion, MergeType merge, VaultDateTime dt, Boolean makeBackups, OverwritePrompt PromptData)
   at VaultClientOperationsLib.WorkingFolder.UpdateWorkingFile(VaultClientFile file, Int64 targetVersion, Int64 displayVersion, MergeType merge, VaultDateTime dt, OverwritePrompt PromptData)
   at VaultClientOperationsLib.ClientInstance.ProcessGetFileRequests(GetFileInfo[] infos, MakeWritableType makeWritable, SetFileTimeType setFileTime, MergeType merge, Boolean updateHiddenFilesOnly, String ancestorFullPath, Boolean flat, String ancestorDiskPath, OverwritePrompt PromptData, Boolean isLabelGet, String currentPathToLabelItem, Int64 labelID, Boolean isRetry, Boolean isGetByDisplayVersion)
[4/21/2010 1:33:43 PM] Local file update for $/Crytek_Releases/v3_1_0/Code/Tools/LibTIFF/tiff/3.8.2/tiff-3.8.2-src/libtiff/tif_print.c failed: System.UnauthorizedAccessException: Access to the path 'C:\Src\Crytek_Releases\v3_1_0\Code\Tools\LibTIFF\tiff\3.8.2\tiff-3.8.2-src\libtiff\tif_print.c' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
   at System.IO.File.OpenFile(String path, FileAccess access, SafeFileHandle& handle)
   at System.IO.File.SetLastWriteTimeUtc(String path, DateTime lastWriteTimeUtc)
   at System.IO.File.SetLastWriteTime(String path, DateTime lastWriteTime)
   at VaultClientOperationsLib.WorkingFolder.UpdateWorkingFile(VaultClientFile file, Int64 targetVersion, Int64 displayVersion, MergeType merge, VaultDateTime dt, Boolean makeBackups, OverwritePrompt PromptData)
   at VaultClientOperationsLib.WorkingFolder.UpdateWorkingFile(VaultClientFile file, Int64 targetVersion, Int64 displayVersion, MergeType merge, VaultDateTime dt, OverwritePrompt PromptData)
   at VaultClientOperationsLib.ClientInstance.ProcessGetFileRequests(GetFileInfo[] infos, MakeWritableType makeWritable, SetFileTimeType setFileTime, MergeType merge, Boolean updateHiddenFilesOnly, String ancestorFullPath, Boolean flat, String ancestorDiskPath, OverwritePrompt PromptData, Boolean isLabelGet, String currentPathToLabelItem, Int64 labelID, Boolean isRetry, Boolean isGetByDisplayVersion)
Some quick Googling on this error seemed to point to Virus Scanner software as a possible problem, but I still see these errors even after excluding my C:\Src directory (and children) from the scanner (McAfee VirusScan Enterprise 8.7.0i). In terms of being able to reproduce this problem, it seems to show up only during large GETs (such as a get of the entire tree or a large branch). I've even completely deleted my Vault client cache and still get these errors on a fairly regular basis.

Any ideas?

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: System.UnauthorizedAccessException on GET

Post by lbauer » Wed Apr 21, 2010 7:58 pm

Is this strictly client-side? Are there any errors in the Vault Server log when this happens? Any errors in the Event Viewer?

What happens if you temporarily turn of real-time scanning?
Linda Bauer
SourceGear
Technical Support Manager

davenovak
Posts: 222
Joined: Mon Jan 15, 2007 2:15 pm
Location: Atlanta, GA

Re: System.UnauthorizedAccessException on GET

Post by davenovak » Fri Apr 23, 2010 9:49 am

I've done some more research on this and, unfortunately, have very few answers.

I am not seeing any errors in the Vault server log, the event log on the Vault server, or even the event log on the client machines. As to the virus scanner, I've checked the logs there and don't see McAfee reporting anything around the time of those errors. I should also point out that I've told McAfee VirusScan to exclude the Vault client cache and my root working directory.

I don't know if this is related or not, but I'm also getting reports of numerous people running Vault client getting the popup error "The server returned an unknown status code (80)". In this case as well, nothing in any of the logs provides me with any hint as to the source of the problem.

Where do we go next?

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: System.UnauthorizedAccessException on GET

Post by lbauer » Tue Apr 27, 2010 7:24 am

I'd like to take a look at client and server logs.

First, enable debug server logging in the Admin Web Client under Server Settings->Logging->Log Level.

Then enable logging for all events in the user's GUI Client. Open the Vault GUI Client and hold down the following keys on your keyboard: Control-Alt Shift F12.

When you encounter the problem, send me copies of the logs. Let me know what user was experiencing the error and what time the error occurred so I know where to look for in the logs.

Send the logs zipped up to support at sourcegear.com, Attn: Linda. Please include a link to this forum post.

I'd still be interested to know what happens when you temporarily turn off real-time scanning. Vault Client writes to temp directories as well as to the working directory and cache files.
Linda Bauer
SourceGear
Technical Support Manager

davenovak
Posts: 222
Joined: Mon Jan 15, 2007 2:15 pm
Location: Atlanta, GA

Re: System.UnauthorizedAccessException on GET

Post by davenovak » Tue Apr 27, 2010 12:56 pm

Regarding Control-Alt Shift F12, when exactly do I hold those keys down? Before the login prompt? Before the repository prompt? Before the GUI is populate? How do I know it "took"?

Is there some config file or some other location that I can set this?

davenovak
Posts: 222
Joined: Mon Jan 15, 2007 2:15 pm
Location: Atlanta, GA

Re: System.UnauthorizedAccessException on GET

Post by davenovak » Tue Apr 27, 2010 12:59 pm

Never mind that last question -- the answer appears to be "after the GUI client is populated". And the status line confirm that the user has set this option (as it should).

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: System.UnauthorizedAccessException on GET

Post by lbauer » Thu Apr 29, 2010 7:19 am

A couple more thoughts--

Have you tried giving Everyone permission to your src folder?

Also, just excluding the cache and the working folder from antivirus may not be enough. Vault also writes to various temp directories on the machine. Is it possible to turn off real-time scanning temporarily to see if that might be the culprit?
Linda Bauer
SourceGear
Technical Support Manager

davenovak
Posts: 222
Joined: Mon Jan 15, 2007 2:15 pm
Location: Atlanta, GA

Re: System.UnauthorizedAccessException on GET

Post by davenovak » Thu Apr 29, 2010 12:28 pm

Right now, for reasons I can't explain, I can't seem to be able to reproduce the problem. I'll get back with you when I can consistently reproduce the issue.

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: System.UnauthorizedAccessException on GET

Post by lbauer » Thu Apr 29, 2010 2:08 pm

Ok, just let me know.
Linda Bauer
SourceGear
Technical Support Manager

Post Reply