locked
Publishing problem - The "WebDeployAppHostAuthOverride" task failed unexpectedly RRS feed

  • Question

  • While publishing my LS 2013 update 3 application to a server, I keep running into this exception if I enable either windows or forms authentication. It deploys properly if I disable authentication, but forms authentication is required for my application. It also happens if I take the project and attempt to deploy on the server, so I can rule out firewall issues (I have VS2013 on the server, too).

    I can see this question has asked before but the reply doesn't make any sense - it looks like it was copied and pasted from this site (http://www.iis.net/learn/publish/using-web-deploy/changing-authentication-mode-for-a-given-website), which has nothing to do with lightswitch deployment, and then the reply was marked as the solution by a moderator.

    I can see that it's complaining about "The specified path is invalid", but what path is it referring to exactly? Obviously the variable passed to the "AddLocation" function where the exception occured is named "bstrLocationPath", but that doesn't help me much.

    Could it be some path variable that's not set on the server? Is there a way to bypass this part of the publish script by configuring web deploy security via command line after the fact on the server?

    Here is a copy of the exception text for reference:

    Error	100	The "WebDeployAppHostAuthOverride" task failed unexpectedly.
    Microsoft.Web.Deployment.DeploymentException: (9/12/2014 2:53:24 PM) An error occurred when the request was processed on the remote computer. ---> System.Exception: The specified path is invalid. (Exception from HRESULT: 0x800700A1)
       at Microsoft.Web.Deployment.IAppHostConfigLocationCollection.AddLocation(String bstrLocationPath)
       at Microsoft.Web.Deployment.WriteableIIS7ApplicationWrapper.ModifyAuthInAppHostConfig(String authSetting, String authPath, OverrideMode overrideMode)
       at Microsoft.Web.Deployment.AppHostAuthOverrideCommitItem.CommitChanges(DeploymentCommitContext commitContext)
       at Microsoft.Web.Deployment.DeploymentCommitContext.CommitChanges(DeploymentSyncOptions syncOptions, DeploymentBaseContext baseContext)
       at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable`1 syncPassId, String syncSessionId)
       at Microsoft.Web.Deployment.DeploymentAgent.HandleSync(DeploymentAgentAsyncData asyncData, Nullable`1 passId)
       --- End of inner exception stack trace ---
       at Microsoft.Web.Deployment.StatusThreadHandler.CheckForException()
       at Microsoft.Web.Deployment.AgentClientProvider.RemoteDestSync(DeploymentObject sourceObject, DeploymentSyncContext syncContext, Nullable`1 syncPass, String syncSessionId)
       at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable`1 syncPassId, String syncSessionId)
       at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
       at CallSite.Target(Closure , CallSite , Object , Object , Object , Object )
       at Microsoft.LightSwitch.Publish.Tasks.Deployment.WebDeployAppHostAuthOverride.ApplyAppHostAuthOverride(String authenticationType)
       at Microsoft.LightSwitch.Publish.Tasks.Deployment.WebDeployAppHostAuthOverride.ExecuteTask()
       at Microsoft.LightSwitch.Publish.Tasks.Deployment.WebDeploymentTaskBase.ExecuteCore()
       at Microsoft.LightSwitch.Publish.Tasks.Common.BuildTask.Execute()
       at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
       at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext()	C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v4.5\Publish\v2.4\Microsoft.LightSwitch.Publish.targets	1289	10	Threading Mill Traceability
    

    • Edited by Philip Rose Friday, September 12, 2014 8:10 PM
    Friday, September 12, 2014 8:09 PM

Answers

  • The problem was an extra "/" at the end of the "Site/Application:" field in the publish setting area of the publish wizard. So...very...frustrating...but relieved that the problem had a simple fix. I didn't even think that would be the issue because the "Validate Connection" button on that was telling me "successful". I was starting to dig deep into the belly of IIS configuration and then just randomly decided to try it without the "/". I hope it saves someone else some time! 
    • Marked as answer by Philip Rose Friday, September 12, 2014 9:01 PM
    Friday, September 12, 2014 9:00 PM