简体   繁体   中英

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.

I had a project with that name in mysolution however I rolled back using git. I also deleted the AppName.Backend service from azure. Why would this message still be showing.

Steps already taken: Rebuilt all projects in solution. Deleted obj and bin folders and rebuilt. Rolled back using git and deleted new folders

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;

  • Please try to check whether AppName.Backend project or AppName.Backend.dll still left in your Git repository;

  • Check your deployed mobile app content via Kudu console to find whether AppName.Backend is still survived.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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