gpt4 book ai didi

c# - 在 ASP.NET 中的其他 AppDomain 中运行应用程序

转载 作者:行者123 更新时间:2023-11-30 12:45:57 24 4
gpt4 key购买 nike

我有一个 ASP.NET 应用程序,其中运行了 5 个子应用程序。我希望一个子应用程序在另一个域中运行。我尝试创建一个新的 AppDomain:

AppDomain domain = AppDomain.CreateDomain("MyDomain");

当我尝试通过以下代码检索 FriendlyName 时:

System.Diagnostics.Debug.WriteLine(domain.FriendlyName);

我遇到了这个错误:

Cannot obtain fields or call methods on the instance of type 'System.AppDomain' because it is a proxy to a remote object.

最佳答案

如果我的理解正确,那么您需要为此编写一个可视化工具。它是 Visual Studio 的一个插件,用于“可视化”任何监视值,您可以在其中执行任何您想执行的操作,而不用在您的实际项目代码中执行。

关于c# - 在 ASP.NET 中的其他 AppDomain 中运行应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22043721/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com