Skip to content

Where can I report a problem with WebDeploy for vNext? #476

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
guardrex opened this issue Apr 22, 2015 · 12 comments
Closed

Where can I report a problem with WebDeploy for vNext? #476

guardrex opened this issue Apr 22, 2015 · 12 comments

Comments

@guardrex
Copy link
Contributor

For my project_name, there is a project_name.dll file at

<drive>:\project_name\approot\packages\project_name\1.0.0\lib\dnxcore50\project_name.dll

... and WebDeploy v3.5 frequently chokes when it tries to replace the file on a publish stating "ERROR_FILE_IN_USE." The IIS Worker Process has locked it. I must stop the application to get the process to release the file to allow the deployment.

@Eilon
Copy link
Contributor

Eilon commented Apr 23, 2015

@sayedihashimi can you take a look?

@guardrex
Copy link
Contributor Author

I'm using WD v3.5 from the command line:

"C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -allowUntrusted -source:contentPath="PROJECT_PATH\bin\output" -dest:contentPath="VM_PROJECT_PATH",ComputerName="https://VM_NAME.cloudapp.net:PORT/msdeploy.axd?site=WEBAPP_NAME",UserName="DOMAIN\USERNAME",Password="PASSWORD",AuthType='Basic'

I would have thought that if this is a general issue that users of CTP6 WebDeploy'ing out of VS would have seen this issue by now. I'm using Brackets/Omnisharp. Is there something VS is doing differently with its WD command that my command line is missing?

It doesn't happen every time. This happens quite frequently though ... perhaps 50-75% of the time I try to publish like this. When I shutdown the app in IIS and stop the AppPool, it takes just a minute or two for the IIS worker process to release that file, then I can use the WD command and it will sync the project. Then, I fire the AppPool and web app back up. It's always the same file that gets locked ... the DLL named after the project.

When I go to the file's location and try to delete it manually during one of these incidents, that's when the OS tells me that the file is in-use by another process and it identifies the process as the "IIS Worker Process."

@sayedihashimi
Copy link
Member

"ERROR_FILE_IN_USE."

It's a known issue with the runtime. Since we are not shadow copying anymore the actual assemblies are locked and there is no way for us to stop the site. I discussed with @davidfowl and @danroth27 the other day and it's on their radar, but I'm not sure if they have a specific plan to resolve it yet.

It doesn't happen every time.
Odds are that the app pool was recycled/stopped at some point releasing the lock.

We have encountered this in VS and the only thing that we can advise is to manually stop the site. Web Deploy has support for app_offline.htm but ASP.NET 5 doesn't respect that. Other than that there is no way for Web Deploy to stop the site.

@guardrex
Copy link
Contributor Author

@sayedihashimi Ok, thanks. I'm fine with the manual process until it gets resolved.

Should you/I close this issue? It's kind of better for me if it gets tracked as a bug here so that I'll know when this is resolved and that I can stop using the manual workaround.

@rondefreitas
Copy link

support for app_offline.htm or similar functionality would be ideal, imho

@sayedihashimi
Copy link
Member

@davidfowl @danroth27 @glennc are you guys tracking this issue somewhere else? If so I'll close this otherwise, what repo should this be filed in?

@danroth27
Copy link
Member

@muratg Please make sure this is tracked

@tugberkugurlu
Copy link
Contributor

@sayedihashimi

Web Deploy has support for app_offline.htm but ASP.NET 5 doesn't respect that. Other than that there is no way for Web Deploy to stop the site.

I was actually looking at deploying the web app into a different folder and later, modify IIS metabase to change the website path. I believe this approach would work around the mentioned problem, too.

However, I am not sure if this is a good option as I don't know what would happen to the in-flight requests during the IIS metabase change. Any thoughts?

@sayedihashimi
Copy link
Member

@tugberkugurlu that sounds like it would require admin privileges. In addition to that it would cause issues if your site was writing content to a file, for example you have a local XML or DB which the app stores values in. Having a runtime solution would be better.

@guardrex
Copy link
Contributor Author

@sayedihashimi Just out of curiosity, can you explain just a bit more about

we are not shadow copying anymore

So VS doesn't do something as simple as using the Web Deploy recycleApp Provider. I was sort of thinking that I would try doing this just so I don't need to RDC to the VM and have the IIS GUI up ... I'd issue a recycleApp command to kill the app ... run WD command ... then issue recycleApp again to get it running.

Can you say ... briefly ... I know you're very busy ... can you say what VS/WD normally does with shadow copying to make WD publishes that don't have locked file issues?

@muratg
Copy link
Contributor

muratg commented Apr 23, 2015

This is tracked in aspnet/Hosting#141

@guardrex
Copy link
Contributor Author

@muratg Ah! Yes, I see. It is woven into the discussion with app_offline.htm. This should be closed here as a dup of aspnet/Hosting#141

@ghost ghost locked as resolved and limited conversation to collaborators Dec 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants