Question

I am deploying a number of .Net projects to different servers. To do this my team is using TFS to build, then from the build template calling a ps1 script that uses msdeploy to push to all the different servers. It's all very enterprisey and no, I am not at liberty to switch to something different at the moment. This process has been working for months with no issues.

Today the deploy failed a few times in a row with a few different errors. That alone confuses me (and may not be relevant) but now the one I am getting consistently is this:

An error occurred when the request was processed on the remote computer. The stream data of 'C:\Builds\SomeDirectory\obj\Debug\Package\PackageTmp\AReferencedProject.dll' is not yet available.

This error is happening when my script runs msdeploy. The dll is used by a windows service but the service is stopped (as far as I can tell - the service stop isn't throwing any errors) and the dll is not 'read only'. The dll exists on the machine that is building/deploying as well as the machine that is being deployed to.

I have discovered I can avoid this error if I delete the dll that 'is not available' from the server I am deploying to, but the problem comes right back on each subsequent deploy unless I manually delete this dll before each deploy.

I have seen this problem but I am not pushing to Azure, just to Windows Server 2008. Does anyone know why Microsoft web deploy (msdeploy) would throw this error?

Was it helpful?

Solution

I had the same problem. Tried deploying a couple of times with the same error.

Recycling the app pool on the server solved the problem, so that I could run a normal deploy again.

OTHER TIPS

We are experiencing this problem consistently with SQLite.Interop.dll (used by ELMAH in our web application.) As best I can tell, the problem relates to the fact that the DLL SQLite.Interop.dll is in use by our web app through ELMAH, and for some reason this DLL is not shadow copied. The solution we are using is that recommended here of recycling the app pool upon every deploy. Our command is like:

"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:recycleApp -dest:recycleApp="Default Web Site/ourApp",computerName="DeployComputer"

This allows the subsequent msdeploy which syncs our deploy package to succeed. Someone replied to that forum also suggesting using "-enableRule:AppOffline", which we didn't need to try.

I have been suffering from the exact same issue as you today and having come across your question with no answer, was beginning to pull my hair out...There are just so few articles or suggestions on this issue that I almost gave up!!

However, I have been able to solve the problem for me so I'm posting my solution to help yourself and anyone else who suffers from this issue.

For whatever reason, it seemed that my Site & AppPool in IIS had got a bit muddled up and started to throw the error as described in the question above. To resolve this, I took down the original site (Stopped the Site and AppPool), created a brand new Site and AppPool with the same settings, published to it using WebDeploy and it now seems to be behaving itself again.

This might not work for others, but it will hopefully give people something else to try.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top