Cannot access web.config
Moderator: SourceGear
Cannot access web.config
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.
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.
Re: Cannot access web.config
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?
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
SourceGear Technical Support
Re: Cannot access web.config
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.
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.
Re: Cannot access web.config
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
SourceGear Technical Support
Re: Cannot access web.config
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.
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.
Re: Cannot access web.config
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.
Right now, VaultService has DefaultAppPool and VaultAppPool. The main company website directory only has DefaultAppPool.
Re: Cannot access web.config
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.
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
SourceGear Technical Support
Re: Cannot access web.config
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.
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.
Re: Cannot access web.config
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.
Re: Cannot access web.config
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.
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.
Re: Cannot access web.config
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).
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
SourceGear Technical Support
Re: Cannot access web.config
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.
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.
Re: Cannot access web.config
Are you on a 64-bit machine or a 32-bit machine?
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: Cannot access web.config
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:
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?
Code: Select all
"C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe" -i
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
SourceGear Technical Support