"The process cannot access ..." when using MSBuild - visual-studio

I am so close to getting my TeamCity setup complete, but am stumped by this error:
(12/22/2011 2:30:15 PM) An error occurred when the request was processed on the remote computer.
An error was encountered when processing 'Web.zip'.
The error code was 0x80070020.
The process cannot access 'C:\Inetpub\wwwroot\Deneb\Website\obj\Deploy\Package\Web.zip' because it is being used by another process.
I tried deleting that file myself, and didn't have any problems. I am able to deploy this site from another server, also without any problems. I set the Team City build agent service to run as administrator, and restarted the service.
Any help would be greatly appreciated - thanks!

Realized that the checkout directory shouldn't be set the same as the web directory

Related

Windows Process Activation Service (WAS) will not start

IIS 10 will not restart on my PC. When I navigate to localhost, I get a 'localhost refused to connect' message. After looking through the event viewer, it turns out that the issue is that the Windows Process Activation Service (WAS) will not start.
The error message given is:
'The Windows Process Activation Service (WAS) encountered an error while handling key generation. This will prevent WAS from starting corrently. The data field contains the error number.'
When I try to start the service manually from the services app, I get the following:
Has anyone experienced this issue before? Any help would be greatly appreciated, I've been trawling the internet for several days trying to find a solution to no avail.
We've run into this issue several times after recent Windows Updates. In all cases, the following worked (got from a Microsoft support rep):
Run the following from an admin Powershell prompt:
reg delete HKLM\SYSTEM\CurrentControlSet\Services\WAS\Parameters /v GenerateKeys /f
net start w3svc
The keys will be regenerated, then the IIS AppPools can be started
According to your error message, WAS can not access the machine key when start up. Usually, machine keys are used to encrypt sensitive information in config file, WAS will not be able to start if there is no machine key to use.
The easiest and most common method is to try to uninstall and reinstall WAS.
If it still can not start, try to delete the registry entry NanoSet with cmd.
If the above two methods are useless, you can refer to this to delete machine keys, let WAS create new one while starting.
If somebody is still fighting with this issue, please check Event Viewer under System filter and check for any logs related to WAS. In my case I found the following entry:
The Windows Process Activation Service (WAS) encountered an error while handling key generation. This will prevent WAS from starting currently. The data field contains the error number.
So I just started again CNG Key Isolation service and everything is working now.

xxx.azurewebsites.net is currently unable to handle this request

Getting 500 error post deploying microservices on app service on the Azure
I ran across this same error today, for me the source of the problem occurred during startup. My application was trying to create a file, and this is not allowed.
"Running from package makes wwwroot read-only, so you will receive an error when writing files to this directory."
Source:
https://learn.microsoft.com/en-us/azure/app-service/deploy-run-package
Generally 500 comes due to application error on the server.
When "Server Error in '/' Application" comes , did you observe anything in "Diagnose and Solve Problem" under 5xx errors.
3) You can enable FREB logs . Follow this blog how to do it https://blogs.msdn.microsoft.com/benjaminperkins/2017/01/27/enable-failed-reuqest-tracing-for-an-azure-app-service-web-app/
4) See Events Logs in Kudu https://azure.microsoft.com/en-in/resources/videos/what-is-kudu-with-david-ebbo/

Jenkins start failed after changing service to be started as specific Windows user

I set up a Windows Jenkins 2.156 and everythings works fine. Some jobs need to access file servers within the local network, so I want to start the Jenkins Windows Service as a specific user with rights to access these locations.
When restarting the service after that change, I am stuck on the "Please wait while Jenkins is getting ready to work ..." screen.
File failed-boot-attempts.txt is filled with current time stamp.
Any tips on how to proceed to get this issue fixed?
Solution: FSTrigger plugin scans all configured folders during startup.

The application failed to start for UI Test

I have a UIcoded test that works in VS2010.
I want automated it with MTM. But when I associated it with test case and run it I get this error in ViewResult :
Microsoft.VisualStudio.TestTools.UITest.Extension.FailedToLaunchApplicationException: The application failed to start.
I am monitoring it in test agent status and every thing is ok.
how I can pass this test.
Sincerely you M.Bagheri
If you are running UI Coded test in the build process using TFS Build Service, make sure you run the build service as an interactive process.
The answer here also tells you how to make the interactive build service start when the build machine is started.
See here for how to run the build service as an interactive process.
Usually you will get a specific error if you cannot interact with the desktop.
I recently received this error. I performed the following tasks which solved the issue for me:
clear the controler temporary files
restart the agent and controller.

Problems with Database Deployment using VS2010 (Package/Publish SQL tab)

Background:
I am using the deployment tools in Visual Studio 2010.
I right clicked my project and selected Package/Publish settings. Put all my settings in there ...
I am then using "web deploy" to tranfer the files to my remote server running a remote agent service and this is working fine. The transforms i have on my Web.Release.config do their thing and the server can access the database I created manually.
Problem:
My next step was to get the Database Deployment working too.
I went into the Package / Publish SQL tab and entered my Connection string for the destination database.
(Data Source=MyDBServer;Initial Catalog=Database2;User ID=User;Password=pass)
This database is empty ready to accept the import.
I also enter in the connection string for the source database. This lives on the same server.
(Data Source=MyDBServer;Initial Catalog=Database;User ID=User;Password=pass)
Database Scripting options are set to Schema and Data (changing this makes no difference) and the database scripts are set to [Auto Generated Schema and Data]
When i deploy this now, i get the error:
Error 4 Web deployment task
failed.((09/06/2010 16:41:51) An error
occurred when the request was
processed on the remote computer.)
(09/06/2010 16:41:51) An error
occurred when the request was
processed on the remote computer. The
entry type 'Unknown' was not expected
at this time. The serialization stream
may be corrupted.
Additional Info:
I can successfully create a package with no problems. I looked at the contents in the zip and can see the SQL is generated fine (so no problems connecting to the database). I can then copy this SQL and run it as a new query on the new database and the tables and data are created fine.
I can not seem to work out where this is going wrong, i googled the error and there are no entries on the whole internet. Anyone have any ideas?
Addendum:
To get some further idea of what might be going on, i sent the package across to the server and imported it using IIS. It told me i needed SQL Server Management Objects. So I installed that.
Next attempt it told me my user did not have permission to create the database, I thought excellent this must be the problem. :Granted access - Re-run. Passed!
So i deleted all the tables and went back to VS2010 clicked publish and i get the same error. :(
Sorted it!
Thank goodness, i was totally out of ideas when i went back to a video by hanselman. He mentioned that the Web Deployment Agent can have permissions. I went in had a look and there was a tab in it's properties called log on.
I entered the detials of an account with a decent level of access and clicked okay.
I then restarted the service as requested to enable the changes.
I then went back to VS 2010 and clicked Publish Web.
Music to my eyes, i see the words "Publish succeeded", I check the database and the tables are there. Excellent!
I think i scared the office by getting a little over excited, if you get this problem and this solution fixes it for you, try to hold in the temptation to shout out "YES!, yes, get in!" while laughing maniacally or people will think you're weird like me.

Resources