1
votes

So, this has worked like forever (and continues to work just fine in emulator).

When I spin up my classic cloud service in Azure I get the error below. ExecuteAsync() is in the web role, in Results/ChallengeResult.cs (a folder I hadn't even noticed until now).

 Role entrypoint could not be created:
 System.TypeLoadException: Unable to load the role entry point due to the following exceptions:
-- System.TypeLoadException: Method 'ExecuteAsync' in type 
'MyWebRole.Results.ChallengeResult' from assembly 'MyWebRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.

When I looked, ChallengeResult.cs does indeed have an implementation for ExecuteAsync(). This is the default implementation and its signature is this:

    public Task<HttpResponseMessage> ExecuteAsync(CancellationToken cancellationToken)

I RDP'd in and used Azure Tools to run windbg; it didn't provide any clues. I suspect there's a DLL somewhere that's expecting a different signature.

But which one? Who calls this?

Odd thing is, the service actually works even though the role is recycling.

1
Did you solve this Barry? I'm receiving the same errorGONeale

1 Answers

0
votes

I have encountered the same issue. For some reason a binding redirect was in effect for System.Net.Http which caused the issue.

To solve it, I have made a copy of my web.config, renamed it to MyProjectName.dll.config and set Copy to Output Directory to Copy always. You can automate this operation with BeforeBuild in csproj. You can check WebRole entry point and config file for more info.