Cannot access web.config

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

Moderator: SourceGear

walterdbn
Posts: 10
Joined: Wed Apr 13, 2011 2:19 pm

Cannot access web.config

Post by walterdbn » Wed Apr 13, 2011 2:38 pm

Hi, I'm in the process of installing the latest version of Vault on an IIS 7.5 server that is also used by my company's web site.
My companys website is under Default Web Site and the Vault Service is in a folder underneath it.
When trying to access the Vault at: http://localhost/vaultservice
I get the following error:
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Error Code 0x80070005
Config Error Cannot read configuration file due to insufficient permissions
Config File \\?\C:\MyCompanyWebsiteName\web.config

For security, I see that VaultService belongs to VaultAppPool but the web.config in question does not. The both do belong to DefaultAppPool. I tried adding VaultAppPool to web.config but it wouldn't let me, couldn't even find it. What kind of permissions need to be added to this file? Or is this error caused by something else?

For the AppPools, does it matter which pipeline mode is used? My Default pool uses integrated but the VaultAppPool uses classic.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Cannot access web.config

Post by Beth » Wed Apr 13, 2011 3:15 pm

The VaultAppPool should use Classic.

During the install, did you choose Machine, System, or Custom for the IIS Process Model?

Are there other websites on this machine?

Go to the disk location where Vault was installed. The default location would be under C:\inetpub\wwwroot. Right-click Vault service and click the security tab. What users have read/write permissions there?
Beth Kieler
SourceGear Technical Support

walterdbn
Posts: 10
Joined: Wed Apr 13, 2011 2:19 pm

Re: Cannot access web.config

Post by walterdbn » Thu Apr 14, 2011 2:52 pm

Hi Beth,
I left the AppPool as Classic and during setup I'm pretty sure I selected Machine for security.
When doing the install, I changed the location from C:\inetpub\wwwroot to the folder where our website files are stored which for this example is: C:\MyCompanyWebsiteName
Vault service is underneath at C:\MyCompanyWebsiteName\VaultService

We only have our company website on this with some asp.net applications underneath it. No Sharepoint or anything else.
For security on VaultService I have:
IUSR (all rights)
Everyone (list contents)
System (all)
Network Service (all)
Administrators (all)
DefaultAppPool (all)
VaultAppPool (all)

For the ones with 'all' some checkmarks are black, some are light grey. I'm not sure what the difference is between the two. Some are all black, some all grey, some a mix.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Cannot access web.config

Post by Beth » Thu Apr 14, 2011 3:35 pm

In your IIS Manager, click the website where you installed Vault, then click Basic Settings. What path is listed for the website? Is it the same as C:\MyCompanyWebsiteName?
Beth Kieler
SourceGear Technical Support

walterdbn
Posts: 10
Joined: Wed Apr 13, 2011 2:19 pm

Re: Cannot access web.config

Post by walterdbn » Fri Apr 15, 2011 7:17 am

Here are the paths for the sites:
CompanyWebsite (default website): C:\MyCompanyWebsiteName
VaultService: C:\VaultService

So virtually, VaultService is located under the company website, but on physical disk they are at the same level.

walterdbn
Posts: 10
Joined: Wed Apr 13, 2011 2:19 pm

Re: Cannot access web.config

Post by walterdbn » Fri Apr 15, 2011 7:29 am

I'm thinking that I need to give VaultAppPool rights to the main company website directory. Is this correct? When I try to add it through security, VaultAppPool can not be found.

Right now, VaultService has DefaultAppPool and VaultAppPool. The main company website directory only has DefaultAppPool.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Cannot access web.config

Post by Beth » Fri Apr 15, 2011 7:36 am

I've seen some cases in the past where unexplained events can sometimes be resolved by having Vault installed to the same location that the website points to. Try uninstalling Vault, make sure the old vaultservice folder is completely gone, and then reinstall. During the reinstall, choose a custom install and choose the path C:\MyCompanyWebsiteName as the location to install to.

I'm assuming that in the properties page of the website in IIS is showing C:\MyCompanyWebsiteName as the path as well. If it isn't then I'll need to know what is listed there as well.

I would agree that Vault will need permissions to C:\MyCompanyWebsiteName as well, so if you would prefer to try that first, you can feel free to do that.
Beth Kieler
SourceGear Technical Support

walterdbn
Posts: 10
Joined: Wed Apr 13, 2011 2:19 pm

Re: Cannot access web.config

Post by walterdbn » Fri Apr 15, 2011 10:28 am

I uninstalled and made sure everything was gone. I tried the install as you described putting VaultService in the directory underneath the main website directory. This did not work either and I tried the install twice, once using Machine security and the other time System. Exact same result.

On a whim, I changed the AppPool from VaultAppPool to DefaultAppPool. I got a little bit further but still got an error message:
Could not load file or assembly 'DragnetControlsLib, Version=5.1.1.19215, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.

I have set the app pools back to their original state and still get the original error of:
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Module IIS Web Core
Notification Unknown
Handler Not yet determined
Error Code 0x80070005
Config Error Cannot read configuration file due to insufficient permissions
Config File \\?\C:\\MyCompanyWebSite\web.config

You said that I can try adding VaultAppPool to the root website directory but when I try to add it on the security tab I am told it does not exist.

walterdbn
Posts: 10
Joined: Wed Apr 13, 2011 2:19 pm

Re: Cannot access web.config

Post by walterdbn » Fri Apr 15, 2011 10:33 am

I should add that I have added over time other ASP.NET apps and web service apps under this same website and they have installed and performed without problem. These apps pretty much keep to themselves and don't affect the IIS pipeline or security outside their own directory.

walterdbn
Posts: 10
Joined: Wed Apr 13, 2011 2:19 pm

Re: Cannot access web.config

Post by walterdbn » Fri Apr 15, 2011 12:19 pm

Under Basic Settings for VaultService I clicked Test Connection and got the following error for Authorization:

Authorization: Cannot verify access to path: .....VaultService

The server is configured to use pass-through authentication with a built-in account to access the specified physical path. However, IIS Manager cannot verify whether the built-in account has access. Make sure that the application pool identity has Read access to the physical path. If this server is joined to a domain, and the application pool identity is NetworkService or LocalSystem, verify that <domain>\<computer_name>$ has Read access to the physical path. Then test these settings again.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Cannot access web.config

Post by Beth » Fri Apr 15, 2011 12:23 pm

The second round of errors you received are different than the original. The new ones suggest to me that there's another web.config that Vault is reading instead of it's own.

Do you have the option of running Vault under its own website? If so, create a new website, but set it to use a different port such as 8888 or 8080. Create a new folder for that website to point to. For example the website might point to C:\Vaultwebsite. Then install Vault to C:\Vaultwebsite. When finished, try to reach it using the URL of http://servername:port number/vaultservice (ex. http://localhost:8888/vaultservice).
Beth Kieler
SourceGear Technical Support

walterdbn
Posts: 10
Joined: Wed Apr 13, 2011 2:19 pm

Re: Cannot access web.config

Post by walterdbn » Fri Apr 15, 2011 1:21 pm

We are one step further...

I installed to a different website and was able to reach the Vault home page at http://localhost:8080/VaultService/

However, when I click the link for Log In or for the Web Client I get the following error:

Could not load file or assembly 'DragnetControlsLib, Version=5.1.1.19215, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Description: 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.

Exception Details: System.BadImageFormatException: Could not load file or assembly 'DragnetControlsLib, Version=5.1.1.19215, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Cannot access web.config

Post by Beth » Fri Apr 15, 2011 2:55 pm

Are you on a 64-bit machine or a 32-bit machine?
Beth Kieler
SourceGear Technical Support

walterdbn
Posts: 10
Joined: Wed Apr 13, 2011 2:19 pm

Re: Cannot access web.config

Post by walterdbn » Fri Apr 15, 2011 3:05 pm

64 BIT

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Cannot access web.config

Post by Beth » Fri Apr 15, 2011 3:19 pm

There is more than one thing that error could indicate. It could be something with .NET and IIS. Try re-registering the .NET framework with the following command:

Code: Select all

"C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe" -i
Then try the URL http://localhost:8080/VaultService/vaultservice.asmx. Does that page come up? If it does, try using Vault.

If you still get an error, open your IIS Manager, click on Application Pools, then the VaultAppPool and Advanced Properties. The second property is Enable 32-bit Applications. Is that set to True or False?

Did you install the 32-bit version of Vault or the 64-bit version?
Beth Kieler
SourceGear Technical Support

Post Reply