0

我有一个带有服务器代码的应用程序,现在我尝试在Photon Server上运行它,但我收到PhotonHostRuntimeInterfaces异常,我猜版本有问题,我搜索了很多这样的问题,但我真的很新在服务器编程中,任何人都可以帮助我解决这个问题吗?

这是日志:

*System.Exception: Stop: unable to call the Application.TearDown() - undefined photonControl.
   в PhotonHostRuntime.PhotonDomainManager.PhotonPlainAppDomainBehavior.Stop()
   в PhotonHostRuntime.PhotonDomainManager.Stop()
6336: 10:34:55.862 - ERROR: Failed to start application: "RagingServer" in app domain: 2
6336: 10:34:55.863 - CService::OnException() - Exception: CManagedHost::StartApplication() - Failed to start application in AppDomain: 2 - Could not load file or assembly "PhotonHostRuntimeInterfaces, Version=3.56.0.0, Culture=neutral, PublicKeyToken=6cb1467adaa73020"or one of their dependencies. The obtained assembly manifest definition does not match the assembly reference  (Исключение из HRESULT: 0x80131040)
6336: 10:34:55.863 - Server shutting down...*

我还找到了这样的解决方案:

<dependentAssembly>
      <assemblyIdentity name="PhotonHostRuntimeInterfaces" publicKeyToken="6cb1467adaa73020"               culture="neutral" />
      <bindingRedirect oldVersion="3.56.0.0" newVersion="3.58.0.0" />
    </dependentAssembly>

但我不确定我应该把它放在哪里,在我的PhotonServer.config?

4

1 回答 1

0

这通常放置在您的应用程序配置中,类似于 AssemblyName.dll.config。在这里查看示例和文档

你回到你的问题,至少有两个选择:1.你混合了sdk版本。Photon SDK 版本 v3.4.27 使用 PhotonHostRuntimeInterfaces.dll,版本=3.56.0.0。您可以在 sdk lib 文件夹和 'deploy\bin_Win64' 中找到它。较新版本的 sdk 使用 3.58 版 PhotonHostRuntimeInterfaces.dll。可能你升级了你的开发机器,但没有升级你的服务器

  1. 您根本忘记添加此 dll。它应该在您的应用程序的 bin 文件夹中

希望对你有帮助

- 光子学

于 2016-05-09T12:00:08.397 回答