简体   繁体   English

控制器与Azure移动应用程序中不存在的控制器发生冲突

[英]Controller conflicting with nonexistent controller in azure mobile app

I am getting an error when attempting to use a table controller. 尝试使用表控制器时出现错误。

Debugging the controller remotely shows this message 远程调试控制器会显示此消息

The request for 'appCenter' has found the following matching controllers:
AppName.Backend.Controllers.AppCenterController
AppNameService.Controllers.AppCenterController
   at System.Web.Http.Dispatcher.DefaultHttpControllerSelector.SelectController(HttpRequestMessage request)
   at System.Web.Http.Tracing.Tracers.HttpControllerSelectorTracer.<>c__DisplayClass3.<System.Web.Http.Dispatcher.IHttpControllerSelector.SelectController>b__1()
   at System.Web.Http.Tracing.ITraceWriterExtensions.TraceBeginEnd(ITraceWriter traceWriter, HttpRequestMessage request, String category, TraceLevel level, String operatorName, String operationName, Action`1 beginTrace, Action execute, Action`1 endTrace, Action`1 errorTrace)
w3wp.exe Information: 0 : Message='Will use same 'XmlMediaTypeFormatter' formatter', Operation=XmlMediaTypeFormatter.GetPerRequestFormatterInstance
w3wp.exe Information: 0 : Message='Selected formatter='XmlMediaTypeFormatter', content-type='application/xml; charset=utf-8'', Operation=DefaultContentNegotiator.Negotiate
w3wp.exe Information: 0 : Response, Status=500 (InternalServerError), Method=GET, Url=https://appname.azurewebsites.net/tables/appcenter?ZUMO-API-VERSION=2.0.0, Message='Content-type='application/xml; charset=utf-8', content-length=unknown'
w3wp.exe Information: 0 : Operation=XmlMediaTypeFormatter.WriteToStreamAsync

My problem is there is no AppName.Backend.Controllers.AppCenterController. 我的问题是没有AppName.Backend.Controllers.AppCenterController。

I had a project with that name in mysolution however I rolled back using git. 我在mysolution中有一个名称相同的项目,但是我使用git回滚了。 I also deleted the AppName.Backend service from azure. 我还从天蓝色删除了AppName.Backend服务。 Why would this message still be showing. 为什么此消息仍然显示。

Steps already taken: Rebuilt all projects in solution. 已经采取的步骤:重建解决方案中的所有项目。 Deleted obj and bin folders and rebuilt. 删除obj和bin文件夹并重建。 Rolled back using git and deleted new folders 使用git回滚并删除新文件夹

According to your description, it seems that you have did some trials about this issue. 根据您的描述,您似乎已经对此问题进行了一些试验。 I assumed that you could follow the steps below to isolate this issue: 我假设您可以按照以下步骤隔离此问题:

  • Please try to launch your project on your local side to see whether it could work as expected; 请尝试在本地启动您的项目,以查看它是否可以按预期工作;

  • Create a new Web App and deploy your mobile project to see whether this issue belongs to the old Azure Mobile App; 创建一个新的Web应用程序并部署您的移动项目,以查看此问题是否属于旧的Azure移动应用程序;

  • Please try to check whether AppName.Backend project or AppName.Backend.dll still left in your Git repository; 请尝试检查AppName.Backend项目或AppName.Backend.dll是否仍留在Git存储库中;

  • Check your deployed mobile app content via Kudu console to find whether AppName.Backend is still survived. 通过Kudu控制台检查已部署的移动应用程序内容,以查找AppName.Backend是否仍然存在。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM