在极少数情况下,以下代码会在应用程序池被回收后立即返回损坏的字符串。没有抛出或捕获异常。一旦它开始发生,它将继续失败,直到IIS重新启动。
try {
foreach (string resourceName in System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceNames())
if (resourceName.Contains(LicenseResourceName))
return System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName);
throw new Exception(" \"" + LicenseResourceName + "\" not found in .GetManifestResourceNames()");
} catch (Exception ex) {
var logger = new Logging.SqlLogger(System.Reflection.MethodBase.GetCurrentMethod());
logger.Error("AsposeLicense Error " + ex);
}