Calling dispose method on MapServerDcomProxy results in NullReferenceException.
上次发布: August 25, 2014No Product Found
漏洞 ID 编号
NIM046983
已提交
July 22, 2009
上次修改时间
April 2, 2025
适用范围
No Product Found
找到的版本
10.0
编程语言
C#
修正版本
N/A
状态
Fixed
此漏洞已得到修复。 有关详细信息,请参阅“版本修复”和“其他信息”(如果适用)。
解决办法
Supressing Finalize code for this object may be an option to overcome the problemclass GoodMapServerDcomproxy : MapServerDcomProxy { public GoodMapServerDcomproxy(IServerContext context, bool releaseContextOnDispose, DcomProxy proxy) : base(context, releaseContextOnDispose, proxy) { if (proxy == null) { GC.SuppressFinalize(this); } } }Another workaroundChange the unhandled exception policy back to the default behavior that occurs in the .NET Framework 1.1 and in the .NET Framework 1.0. More information regarding this way of supressing error message can be found at http://msdn.microsoft.com/en-us/library/ms228965.aspx. By implementing this workaround, serious programming problems can go undetected, so proceed with caution.To enable this default behavior, add the following code to the Aspnet.config file that is located in the following folder: %WINDIR%\Microsoft.NET\Framework\v2.0.50727<configuration> <runtime> <legacyUnhandledExceptionPolicy enabled="true" /> </runtime></configuration>