'What is "AppOffline" which prevents my bot application from getting published to the IIS web server?

Just created an application with the Bot Framework, from the template downloaded here: http://aka.ms/bf-bc-vstemplate.

It works well in the testing Emulator. But when publishing to the IIS server, I got this error:

Error Web deployment task failed. ((5/6/2016 3:03:54 PM) An error occurred when the request was processed on the remote computer.)

(5/6/2016 3:03:54 PM) An error occurred when the request was processed on the remote computer.
Exception has been thrown by the target of an invocation.
   at System.RuntimeMethodHandle._SerializationInvoke(Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context)
   at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
   at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
   at System.Runtime.Serialization.ObjectManager.DoFixups()
   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, IMethodCallMessage methodCallMessage)
   at Microsoft.Web.Deployment.Base64EncodingHelper.DeserializeHelper(BinaryFormatter formatter, Byte[] buffer)
   at Microsoft.Web.Deployment.Base64EncodingHelper.Deserialize(String str, Exception& handledException)
   at Microsoft.Web.Deployment.SerializationHelper.Deserialize(String str)
   at Microsoft.Web.Deployment.DeploymentAgentWorkerRequest.GetTraceMessage(String[] additionalMessage)
   at Microsoft.Web.Deployment.DeploymentAgent.HandleSync(DeploymentAgentWorkerRequest workerRequest)
   at Microsoft.Web.Deployment.DeploymentAgent.HandleRequestWorker(DeploymentAgentAsyncData asyncData)
   at Microsoft.Web.Deployment.DeploymentAgent.HandleRequest(DeploymentAgentAsyncData asyncData)
   at Microsoft.Web.Deployment.DeploymentAgent.BeginProcessRequest(DeploymentAgentWorkerRequest workerRequest, AsyncCallback callback, Object extraData)
Unrecognized rule 'AppOffline'. ParkingBot      0   

What is the AppOffline error?



Solution 1:[1]

I worked around it by doing the following:

  • locate the .pubxml file for your deployment
  • toggle EnableMSDeployAppOffline True to False.

You may need this feature, so it might not be an option. However my application doesn't have this requirement.

Solution 2:[2]

Make sure you have the latest version of IIS Web Deploy installed on your server. I was getting this error.

I needed to install Web Deploy 3.6 on our server fixed it.

Solution 3:[3]

Check to see if you have a file named app_offline.htm in your deployment folder. That file is for when you're deploying and want to prevent logins on the site until you're done. That file might not have been deleted after deployment.

Solution 4:[4]

To add on to jbtule's answer (https://stackoverflow.com/a/49635669/7733418), you might also need to DOWNGRADE to version 3.6. I had Web Deploy 4 installed and was getting the "Unrecognized rule 'AppOffline'" error, but after uninstalling version 4 and installing version 3.6, deployment with <EnableMSDeployAppOffline>True</EnableMSDeployAppOffline> worked immediately.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 jbtule
Solution 3 Joe Mayo
Solution 4 Yunnosch