Using Vault for IIS Site's

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

Moderator: SourceGear

Post Reply
aconran
Posts: 13
Joined: Wed Aug 25, 2004 12:14 pm

Using Vault for IIS Site's

Post by aconran » Wed Aug 25, 2004 1:28 pm

I am running a demo version of source vault to manage a ColdFusion based website. We have been very impressed so far.

We run 3 different sites (Projects) which reside on 3 different web servers. We would like to connect to one centralized vault server and have the option of selecting which repository (Project) we would like to work with. The problem is that we can't create a shadow folder on a remote drive. I created a mapped network drive H:\ to \\server\inetpub. The drive shows up in browse but when I click add it gives me an error. Is there anyway to do this?

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

Post by lbauer » Wed Aug 25, 2004 2:06 pm

By "remote drive" do you mean a machine on the same LAN as the Vault Server? This takes extra configuration.

See this KB article about configuring Shadow Folder for UNC paths:

http://support.sourcegear.com/viewtopic.php?t=188
Linda Bauer
SourceGear
Technical Support Manager

aconran
Posts: 13
Joined: Wed Aug 25, 2004 12:14 pm

No Domain

Post by aconran » Wed Aug 25, 2004 2:24 pm

Yes, this is what I mean. In our environment there is no domain. We just use a workgroup, is this a problem?

aconran
Posts: 13
Joined: Wed Aug 25, 2004 12:14 pm

Post by aconran » Wed Aug 25, 2004 2:57 pm

From the Microsoft doc that the forum referenced

When you need to access network resources, such as a database, using the ASP.NET process identity, you can do one of the following:

*Use a domain account.
*Use "mirrored" local accounts (that is, accounts with matching usernames and passwords on two computers). You need to use this approach when the computers are in separate domains with no trust relationship or when the computers are separated by a firewall and you cannot open the ports required for NTLM or Kerberos authentication.

The simplest approach is to change the ASPNET account's password to a known value on the Web server and then create an account named ASPNET with the same password on the target computer. On the Web server, you must first change the ASPNET account password in Local Users and Groups and then replace "AutoGenerate" with the new password in machine.config.

----------------------------
So I think if I create an identitical account on both servers and change the web.config file it should fix my issue.

aconran
Posts: 13
Joined: Wed Aug 25, 2004 12:14 pm

Post by aconran » Wed Aug 25, 2004 3:22 pm

So I added an identitical account named Vault on both machines and added the web.config file entry and I receive this error. I'm sure that it is simply I need to add permissions to some folders. Please advise

Below is the popup error message I received:
Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.
The request failed with the error message:
--
<html>
<head>
<title>Access to the path "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\vaultservice\80d8b66a\a86ea4e5\hash.web" is denied.</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>

<body bgcolor="white">

<span><H1>Server Error in '/VaultService' Application.<hr width=100% size=1 color=silver></H1>

<h2> <i>Access to the path "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\vaultservice\80d8b66a\a86ea4e5\hash.web" is denied.</i> </h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

<b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

<br><br>

<b> Exception Details: </b>System.UnauthorizedAccessException: Access to the path "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\vaultservice\80d8b66a\a86ea4e5\hash.web" is denied.
<br><br>ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
<br><br>To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.<br><br>

<b>Source Error:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code>

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>

</td>
</tr>
</table>

<br>

<b>Stack Trace:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>

[UnauthorizedAccessException: Access to the path "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\vaultservice\80d8b66a\a86ea4e5\hash.web" is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String str) +393
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy) +888
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) +44
System.IO.StreamWriter.CreateFile(String path, Boolean append) +55
System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) +49
System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding) +20
System.Web.Compilation.PreservedAssemblyEntry.WritePreservedSpecialFilesCombinedHash(Int64 hash) +165
System.Web.Compilation.PreservedAssemblyEntry.DoFirstTimeInit(HttpContext context) +848
System.Web.Compilation.PreservedAssemblyEntry.EnsureFirstTimeInit(HttpContext context) +97
System.Web.Compilation.PreservedAssemblyEntry.GetPreservedAssemblyEntry(HttpContext context, String virtualPath, Boolean fApplicationFile) +29
System.Web.UI.TemplateParser.GetParserCacheItemFromPreservedCompilation() +91
System.Web.UI.TemplateParser.GetParserCacheItemInternal(Boolean fCreateIfNotFound) +148
System.Web.UI.TemplateParser.GetParserCacheItemWithNewConfigPath() +125
System.Web.UI.TemplateParser.GetParserCacheItem() +88
System.Web.UI.ApplicationFileParser.GetCompiledApplicationType(String inputFile, HttpContext context, ApplicationFileParser& parser) +171
System.Web.HttpApplicationFactory.CompileApplication(HttpContext context) +43
System.Web.HttpApplicationFactory.Init(HttpContext context) +485
System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +170
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +414
</pre></code>

</td>
</tr>
</table>

<br>

<hr width=100% size=1 color=silver>

<b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

</font>

</body>
</html>
<!--
[UnauthorizedAccessException]: Access to the path "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\vaultservice\80d8b66a\a86ea4e5\hash.web" is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String str)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at System.IO.StreamWriter.CreateFile(String path, Boolean append)
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding)
at System.Web.Compilation.PreservedAssemblyEntry.WritePreservedSpecialFilesCombinedHash(Int64 hash)
at System.Web.Compilation.PreservedAssemblyEntry.DoFirstTimeInit(HttpContext context)
at System.Web.Compilation.PreservedAssemblyEntry.EnsureFirstTimeInit(HttpContext context)
at System.Web.Compilation.PreservedAssemblyEntry.GetPreservedAssemblyEntry(HttpContext context, String virtualPath, Boolean fApplicationFile)
at System.Web.UI.TemplateParser.GetParserCacheItemFromPreservedCompilation()
at System.Web.UI.TemplateParser.GetParserCacheItemInternal(Boolean fCreateIfNotFound)
at System.Web.UI.TemplateParser.GetParserCacheItemWithNewConfigPath()
at System.Web.UI.TemplateParser.GetParserCacheItem()
at System.Web.UI.ApplicationFileParser.GetCompiledApplicationType(String inputFile, HttpContext context, ApplicationFileParser& parser)
at System.Web.HttpApplicationFactory.CompileApplication(HttpContext context)
at System.Web.HttpApplicationFactory.Init(HttpContext context)
at System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context)
at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
-->
--.

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Wed Aug 25, 2004 9:09 pm

Did you add all the policies and set permissions as the KB article Linda mentioned? All of those steps are required before setting up identity impersonation in web.config.

On a side note, please post back if you get this working. My earlier attempts at similar configurations failed. However, Shadow Folder has changed quite a bit since then.

In any case, with my previous setup, Shadow Folders worked flawlessly as long as the user was logged in. Once the user logged out, the Shadow Folders failed.
Jeff Clausius
SourceGear

aconran
Posts: 13
Joined: Wed Aug 25, 2004 12:14 pm

Using mirrored administrator account

Post by aconran » Thu Aug 26, 2004 8:42 am

I am now using a mirrored administrator account, because all of the permissions were already setup for sourcevault. However when I try to add the shadow folder i now get the error.

System.Web.Services.Protocols.SoapException: Server was unable to process request. --> System.NullReferenceException:
Object reference not set to an instance of an object.
at VaultLib.SimpleLogger.RealWriteLine(String logClass, String message)
at VaultLib.SimpleLogger.WriteLine(String logClass, String format, Object[] args)
at VaultShadowFolder.VaultShadowFolderServeice.AddShadowFolderAssociation(int32 repID, String repPath, String localPath, Boolean readOnly)
--- End of inner exception stack trace ---

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Thu Aug 26, 2004 9:56 am

Hmm... This could be due to a couple of things:

1) Is there enough disk space for the Shadow Folder log file? Check the dirve of your Shadow ASP.Net Process' temp directory. Is there any space there?

2) Can you delete the existing VaultShadowFolderService.txt file on the Shadow Folder web service? (Again located in your ASP.Net Process' temp directory).

After that try to re-add the folder.
Jeff Clausius
SourceGear

aconran
Posts: 13
Joined: Wed Aug 25, 2004 12:14 pm

Post by aconran » Thu Aug 26, 2004 10:38 am

Now i get the "The path that you specified is not accessible from the server machine. Association cannot be made" error again.

This person was trying to do something similair, but across 2 different domains.
http://support.sourcegear.com/viewtopic.php?t=1707

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Thu Aug 26, 2004 1:45 pm

What is the shadow folder destination? Is it a UNC path? If not, have you tried a UNC path for the destination?
Jeff Clausius
SourceGear

aconran
Posts: 13
Joined: Wed Aug 25, 2004 12:14 pm

Post by aconran » Thu Aug 26, 2004 2:42 pm

Have tried both a UNC path and a Mapped Network drive.

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Thu Aug 26, 2004 3:22 pm

After rebooting your Vault Shadow Folder machine (important step), what happens when you browse to the destination UNC path while logged in as the mirrored user on the Vault Shadow Folder machine? Try Start -> Run -> \\MACHINE\sharename. Does it open up an explorer window to that directory, or do you have to first log in?

If it opens right up, while still logged in as the mirrored user on the Vault Shadow Folder machine, are you able to create files / directories on the destination UNC path?
Jeff Clausius
SourceGear

Post Reply