Stackoverflow 适用于 IIS 网站而不是控制台应用程序?
我有一个来自 C com 的“第三方”dll -> C++ com ->到 C# .net 程序集。 “是的。它基本上是复制粘贴以转换为 C#”。一个项目使用 com (VB6)。另一个.net框架控制台应用程序。另一个是框架API。
我的问题是 API,新的 .dll 出现了 Stackoverflow 异常,我可以在“他们的”项目内部追踪(调试)该异常。我们都用老版本的COM就好了。但转换到新的 .net 程序集会导致 api 出现问题。 api 项目的代码没有更改,只是需要更新的参数。由于新的程序集,我们确实从框架 4.6 升级到了 4.7.2。所以每个人都以同样的方式转换呼叫。
我无法在没有错误的情况下调试 api。它只是执行此操作的一项功能存在一个错误,其他一切都工作正常。我尝试在本地部署到 IIS 并测试它是否是我的运行时环境。我的最后一次尝试是等待将其推送到应用程序服务或虚拟机,看看是否可以解决 stackoverflow 错误。
看来是框架 4.7.2/runtime/C#8.0 的版本导致了 IIS 下的问题。所以当它是一个控制台应用程序时它不会发生,不知道我是否提到过这一点。我实际上在质疑是否有其他项目将其用作 .net 程序集,而不是 com/interop/tlb。但向其他开发者问这个问题就像亵渎。 API项目将来会升级到.Core并推送到应用服务,只是“还没有”。
4.7.2 确实不是为 c#8.0 构建的吗?他们明确将他们的项目的语言版本设置为 8! “c-sharp-version-history”
当然,我因引起 stackoverflow 而受到指责,并且无法找到有关 stackoverflow bug 的版本控制问题的太多事实。
我的单元测试适用于 api,但作为 api 运行则不然。
这是发生 stackoverflow 错误的代码片段:
partial class CActuatorModelStandardBenchSet : CActuatorModelBase, IStandardBenchSetSizingDataAccess
{
static ActuatorStandardBenchSetEntry[] m_objActuatorStandardBenchSet6Entry = new ActuatorStandardBenchSetEntry[76]
{
new ActuatorStandardBenchSetEntry( ACT6, AS70i, 2200, 750, 2000, 8800, 55, 18372, SPR_1R6760, 860, 70, 150),
new ActuatorStandardBenchSetEntry( ACT6, AS70i, 2200, 750, 4000, 8800, 55, 16279, SPR_1R6760, 860, 60, 220),
new ActuatorStandardBenchSetEntry( ACT6, AS70i, 2200, 750, 3750, 8800, 55, 16221, SPR_1R6760, 860, 60, 210),
new ActuatorStandardBenchSetEntry( ACT6, AS70i, 2200, 750, 3000, 8800, 55, 16047, SPR_1R6760, 860, 60, 180),
new ActuatorStandardBenchSetEntry( ACT6, AS70i, 2200, 750, 2750, 8800, 55, 15988, SPR_1R6760, 860, 60, 170),
new ActuatorStandardBenchSetEntry( ACT6, AS70i, 2200, 750, 2250, 8800, 55, 15872, SPR_1R6760, 860, 60, 150),
new ActuatorStandardBenchSetEntry( ACT6, AS70i, 2200, 750, 2000, 8800, 55, 15814, SPR_1R6760, 860, 60, 140),
new ActuatorStandardBenchSetEntry( ACT6, AS70i, 2200, 750, 2125, 8800, 55, 14564, SPR_1R6760, 860, 60, 140)
etc...
等等...这是此类中执行此操作的一个变量,还有 4 个其他变量,其元素最大可达 2000k。
这段代码是不好还是我需要运行正确的运行时? 我确实认为,是的,可能存在循环引用,我只是还没有在他们的代码中找到它。我们只持有程序集(dll)中的一个对象,并且只调用过程,并且它只创建一次。
我第一次来提问!
I have a "third party" dll that went from C com -> C++ com -> to C# .net assembly. "Yes. it was basically a copy paste to convert to c#". One project uses com (VB6). Another .net framework console App. Another is a framework API.
My problem is for the api, the new .dll is getting a Stackoverflow exception that I am able to track down (debug) inside of "thier" project. We all used the old version COM fine. but converting over to the new .net assembly causes problems for the api. The api project's Code didn't change just the params needed updated. We did upgrade from framework 4.6 to 4.7.2 because of the new assembly. So everyone converted the call the same way.
I can't debug the api without the error. It just has the one error for one piece of functionality that does this, everything else works fine. I tried deploying locally to IIS and testing to see if it was my runtime environment. My last try is waiting to push it to app services or VM to see if that resolves the stackoverflow error.
It seems like the version of framework 4.7.2/runtime/C#8.0 is causing the issue under IIS. So it doesn't happen when its a console app, don't know if i mentioned that. I'm actually questioning if any other project is using it as a .net assembly and not still com/interop/tlb. But asking that question to other developers is like sacrileg. The API project will be upgraded to .Core and pushed to app services in the future, just 'not yet'.
Is it true that 4.7.2 doesn't build for c#8.0? They expicility have languageversion set as 8 for thier project! "c-sharp-version-history"
Of course I get blamed for causing the stackoverflow and can't find much facts with versioning issues with stackoverflow bugs.
My unit test work for the api but running it as an api doesn't.
Here is a snippet where the stackoverflow error occurrs:
partial class CActuatorModelStandardBenchSet : CActuatorModelBase, IStandardBenchSetSizingDataAccess
{
static ActuatorStandardBenchSetEntry[] m_objActuatorStandardBenchSet6Entry = new ActuatorStandardBenchSetEntry[76]
{
new ActuatorStandardBenchSetEntry( ACT6, AS70i, 2200, 750, 2000, 8800, 55, 18372, SPR_1R6760, 860, 70, 150),
new ActuatorStandardBenchSetEntry( ACT6, AS70i, 2200, 750, 4000, 8800, 55, 16279, SPR_1R6760, 860, 60, 220),
new ActuatorStandardBenchSetEntry( ACT6, AS70i, 2200, 750, 3750, 8800, 55, 16221, SPR_1R6760, 860, 60, 210),
new ActuatorStandardBenchSetEntry( ACT6, AS70i, 2200, 750, 3000, 8800, 55, 16047, SPR_1R6760, 860, 60, 180),
new ActuatorStandardBenchSetEntry( ACT6, AS70i, 2200, 750, 2750, 8800, 55, 15988, SPR_1R6760, 860, 60, 170),
new ActuatorStandardBenchSetEntry( ACT6, AS70i, 2200, 750, 2250, 8800, 55, 15872, SPR_1R6760, 860, 60, 150),
new ActuatorStandardBenchSetEntry( ACT6, AS70i, 2200, 750, 2000, 8800, 55, 15814, SPR_1R6760, 860, 60, 140),
new ActuatorStandardBenchSetEntry( ACT6, AS70i, 2200, 750, 2125, 8800, 55, 14564, SPR_1R6760, 860, 60, 140)
etc...
etc... this is one variable in this class that does this, there are 4 other variables that have larger elements up to 2000k.
Is this code just bad or do i need to run the correct runtime?
I do think, yes that there maybe a circlular reference I just haven't found it in their code yet. We only hold one object from the assembly (dll) and just call procedures and its only created once.
my first time, asking a question!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论