Error:
Method 'MyController' in type 'MyProject.AppStart.Selector' from assembly 'MyProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=......' does not have an implementation.
Background:
I have an ASP.NET
project with target
framework set to .NET Framework 4.6.2
. After installing Microsoft.Azure.SignalR.AspNet
1.0.0-preview1-103a17
from nuget package manager
, it builds and runs fine on Visual Studio 2017
. No problem at all. When I deploy the release to my server and try to access any of its services, I get the above-mentioned error. The method is implemented in a class which implements System.Web.Http.Dispatcher.IHttpControllerSelector
.
Configuration:
- The machine on which code works: Windows 10 Version 1809 (OS Build 17763.316). Visual Studio 2017 15.9.6.
- The machine on which code does not work: Windows Server 2012 R2 Version 6.2 Build 9200. IIS version 8.5.9600.16384.
What I tried:
- Clean/Rebuild deploy again.
- Delete
obj
andbin
folder, publish and deploy again. - Deleted CachedAssessmbly as suggested here.
- Change Configuration from
Release
toDebug
. - Install
Azure SDK
in theWindows Server 2012 R2
machine. - Try to install the dependencies of
Microsoft.Azure.SignalR.AspNet
without directly installingMicrosoft.Azure.SignalR.AspNet
. It appears that the error starts toMicrosoft.Azure.SignalR.Protocols
is installed. The dependencies of theMicrosoft.Azure.SignalR.Protocols
are:
All of these four dependencies are being added when I install Microsoft.Azure.SignalR.Protocols
i.e. they are not already being used.
I can't seem to find the issue.
Update:
I deployed the folder on the above mentioned Windows 10 machine and used IIS Manager
to create an application. The application works fine on the same machine without Visual Studio.