I even tried to lift out the entire project from TFS, but it made no difference. The web.config file is still locked by another process.
Hello Jens,
I haven't experienced this problem unfortunately but have you tried checking which process that is locking the file using something like http://lockhunter.com/?
/Martin
I've had VS lock it for me, but I guess that wouldn't be the case for you. Are you running the installer as administrator? Another good tool beside the one Martin mentioned is Windows Sysinternals Process Explorer, it will show you which process has the handle on the file. Sounds a bit painful to do it manually, but I guess the web.config transformation that fails for you is \EPiServer\CMS\7.0.586.1\Upgrade\WebConfig\IIS7\0006_0001_0379_0000to0007_0000_9999_9999.xml. //Mathias
Thanks for your replies. I have now tried to run both Lockhunter and Process Explorer. But none of them warn that the web.config is locked or handles with another process. EPiServer installation script still complain about the lock. I wonder if it might be because we have broken out appsetting.config and connection.config in separate files from the web.config? Besides that, we have also transformed all our config files so that they can be built for different environments of our buildserver and deploymentserver (TeamCity and Octopus Deploy). I have checked that none of the files are read-only.
Mathias: I am running Deployment center as administrator. My machine has Windows 2008 R2 and Visual Studio 2013 SP 1 installed (Visual Studio is closed and no process are running). SQL Server 2008 R2 running on a separate database server. VPP folders are locale on my machine.
Hello,
We have a site created in EPiServer CMS 6 R2 that we want to upgrade to EPiServer CMS 7.5 . As I understand, it requires that you first starting with upgrading to EPiServer CMS 7. I installed version 7.0.586.1 and 7.5.394.2 version locally on my development computer. The site to be upgraded running version 6.1.379.1000. The source code is under version control in Team Foundation Server, but all the files are checked out (not protected) .
When I run the script "Upgrade site with SQL Server database" in version 7.0.586.1, I get error that a process locks the web.config and the script rolls back the installation. I have tried restarting the computer, shut down IIS and have only Deployment Center started. I have also tried running the script directly in the PowerShell console. Is there anyone who has encountered the same error and have an idea how to proceed?
An alternative is to instead do the entire upgrade manual and refer out the new binaries in the project, but I'm not sure what more you need to change in the project. As well as the database changes that must be made. Furthermore, all this has to work in a painless way in the production environment.
Below is a copy of the error log:
******************************************************************************
Started a transacted install
productPath: C:\Program Files (x86)\EPiServer\Framework\7.0.859.1\
Executing database script "C:\Program Files (x86)\EPiServer\Framework\7.0.859.1\Upgrade\Database\sql\0006_0000_0318_0113to0006_0002_0127_0000.sql"
Not executing database script "C:\Program Files (x86)\EPiServer\Framework\7.0.859.1\Upgrade\Database\sql\0006_0000_0318_0113to0006_0002_0127_0000.sql" because it has already been executed.
Executing database script "C:\Program Files (x86)\EPiServer\Framework\7.0.859.1\Upgrade\Database\sql\0006_0002_0128_0000to0006_0002_0130_0000.sql"
Not executing database script "C:\Program Files (x86)\EPiServer\Framework\7.0.859.1\Upgrade\Database\sql\0006_0002_0128_0000to0006_0002_0130_0000.sql" because it has already been executed.
Executing database script "C:\Program Files (x86)\EPiServer\Framework\7.0.859.1\Upgrade\Database\sql\0006_0002_0131_0000to0006_0002_0138_0000.sql"
Not executing database script "C:\Program Files (x86)\EPiServer\Framework\7.0.859.1\Upgrade\Database\sql\0006_0002_0131_0000to0006_0002_0138_0000.sql" because it has already been executed.
Executing database script "C:\Program Files (x86)\EPiServer\Framework\7.0.859.1\Upgrade\Database\sql\0006_0002_0139_0000to0006_0002_0228_0000.sql"
Not executing database script "C:\Program Files (x86)\EPiServer\Framework\7.0.859.1\Upgrade\Database\sql\0006_0002_0139_0000to0006_0002_0228_0000.sql" because it has already been executed.
Executing database script "C:\Program Files (x86)\EPiServer\Framework\7.0.859.1\Upgrade\Database\sql\0006_0002_0229_0000to0006_0002_0256_0000.sql"
Not executing database script "C:\Program Files (x86)\EPiServer\Framework\7.0.859.1\Upgrade\Database\sql\0006_0002_0229_0000to0006_0002_0256_0000.sql" because it has already been executed.
Executing database script "C:\Program Files (x86)\EPiServer\Framework\7.0.859.1\Upgrade\Database\sql\0006_0002_0257_0000to0006_0002_0312_0000.sql"
Executing database script "C:\Program Files (x86)\EPiServer\Framework\7.0.859.1\Upgrade\Database\sql\0007_0000_0258_0000to0007_0000_0259_0000.sql"
Executing database script "C:\Program Files (x86)\EPiServer\Framework\7.0.859.1\Upgrade\Database\sql\0007_0000_0259_0000to0007_0000_0260_0000.sql"
installedVersion: 6.2.267.1
frameworkVersion: 7.0.859.1
Skipping web config modification of EPiServer Framework (6.0.318.113 < 6.2.267.
1)
Skipping web config modification of EPiServer Framework (6.1.79.0 < 6.2.267.1)
Skipping web config modification of EPiServer Framework (6.2.267.1 < 6.2.267.1)
Applying web config modification for EPiServer Framework 7.0.859.1
An error has occured and the transaction will be rolled back
Rolledback
The process cannot access the file 'D:\TFS\SPVse\Leveranser\2014\Utv-mar-2014-EPiServer75\Solutions\src\SPV.Prt.Web.SPVse\web.config' because it is being used by another process.
The process cannot access the file 'D:\TFS\SPVse\Leveranser\2014\Utv-mar-2014-EPiServer75\Solutions\src\SPV.Prt.Web.SPVse\web.config' because it is being used by another process.
An unhandled error has occured:
The process cannot access the file 'D:\TFS\SPVse\Leveranser\2014\Utv-mar-2014-E
PiServer75\Solutions\src\SPV.Prt.Web.SPVse\web.config' because it is being used
by another process.
When executing
At C:\Program Files (x86)\EPiServer\Framework\7.0.859.1\Install\System Scripts\
Install Site (SqlServer).ps1:346 char:5
+ Update-EPiXmlFile -TargetFilePath $targetWebConfigPath -Modif
icationFilePath ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~
True
=
Get-EPiIsBulkInstalling
An unhandled error has occured:
The process cannot access the file 'D:\TFS\SPVse\Leveranser\2014\Utv-mar-2014-E
PiServer75\Solutions\src\SPV.Prt.Web.SPVse\web.config' because it is being used
by another process.
When executing
At C:\Program Files (x86)\EPiServer\Framework\7.0.859.1\Install\System Scripts\
Install Site (SqlServer).ps1:346 char:5
+ Update-EPiXmlFile -TargetFilePath $targetWebConfigPath -Modif
icationFilePath ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~
=
Get-EPiIsBulkInstalling
At C:\Program Files (x86)\EPiServer\Framework\7.0.859.1\Install\System Scripts\Install Site (SqlServer).ps1:346 char:5
+ Update-EPiXmlFile -TargetFilePath $targetWebConfigPath -ModificationFilePath ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
System.IO.IOException: The process cannot access the file 'D:\TFS\SPVse\Leveranser\2014\Utv-mar-2014-EPiServer75\Solutions\src\SPV.Prt.Web.SPVse\web.config' because it is being used by another process.
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, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.Xml.XmlDocument.Save(String filename)
at EPiServer.Install.Xml.Installers.XmlInstallerBase.Save()
at EPiServer.Install.Xml.Installers.SetXmlAttributeInstaller.Install(IDictionary stateSaver)
at System.Configuration.Install.Installer.Install(IDictionary stateSaver)
at EPiServer.Install.InstallationManager.Install(Installer installer)
at EPiServer.Install.InstallationManager.Install[T](Installer installer, T condition)
at EPiServer.Install.Xml.Cmdlets.UpdateConfigCmdlet.ProcessRecord(XmlInstallationManager xmlInstallationManager)
at EPiServer.Install.Xml.Cmdlets.XmlInstallationCmdlet.ProcessRecord()
at System.Management.Automation.Cmdlet.DoProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()
******************************************************************************