因此,它一直像永远一样工作(并且在模拟器中仍然可以正常工作)。
[当我在Azure中启动我的经典云服务时,出现以下错误。 ExecuteAsync()
在Web角色中,在Results/ChallengeResult.cs
(直到现在我都没有注意到的文件夹)中。
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.
[当我看时,ChallengeResult.cs确实具有ExecuteAsync()
的实现。这是默认实现,其签名是这样的:
public Task<HttpResponseMessage> ExecuteAsync(CancellationToken cancellationToken)
我RDP进入并使用Azure工具运行windbg
;它没有提供任何线索。我怀疑某个地方的DLL期望使用不同的签名。
但是哪一个?谁叫这个?
奇怪的是,即使角色正在回收,该服务实际上仍在工作。
我遇到了同样的问题。由于某些原因,System.Net.Http
的绑定重定向有效,从而导致了问题。
为了解决该问题,我已复制了我的web.config,将其重命名为MyProjectName.dll.config,并将Copy to Output Directory
设置为Copy always
。您可以使用csproj中的BeforeBuild
自动执行此操作。