我的机器人在Azure中的一个实例中工作,但当我尝试将其上传到另一个实例时,它停止响应。我得到以下例外。
因此我们被Bot框架拒绝了。
InternalServerError
{
"message": "An error has occurred.",
"exceptionMessage": "Multiple custom attributes of the same type found.",
"exceptionType": "System.Reflection.AmbiguousMatchException",
"stackTrace": " at System.Attribute.GetCustomAttribute(Assembly element, Type attributeType, Boolean inherit)\r\n at Microsoft.Rest.ServiceClient`1.get_FrameworkVersion()\r\n at Microsoft.Rest.ServiceClient`1.SetDefaultUserAgentInfo()\r\n at Microsoft.Rest.ServiceClient`1.SetUserAgent(String productName, String version)\r\n at Microsoft.Rest.ServiceClient`1.InitializeHttpClient(HttpClientHandler httpClientHandler, DelegatingHandler[] handlers)\r\n at Microsoft.Bot.Connector.ConnectorClient..ctor(Uri baseUri, DelegatingHandler[] handlers)\r\n at Microsoft.Bot.Connector.ConnectorClient..ctor(Uri baseUri, String microsoftAppId, String microsoftAppPassword, DelegatingHandler[] handlers)\r\n at HoroscopeBot.MessagesController.<Post>d__1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__3`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"
}
答案 0 :(得分:1)
截至目前,此问题已发布在GitHub上,似乎唯一的解决方案是删除当前的azure实例并创建新实例并再次上传代码。 这项工作也为我和其他人工作。
要说清楚,
删除显示错误的当前azure实例。
创建另一个名称的新实例(使用相同的名称给我带来了问题。它有效,但后来崩溃了。)
将您的代码上传到新实例。
这应该是神奇的。
另请注意,我已将实例删除了应用计划。
如有疑问,请发表评论。