ورود

View Full Version : سوال: مشکل در فراخوانی Registry در IIS



Iran58
سه شنبه 04 تیر 1398, 17:14 عصر
سلام
من کد زیر را نوشته ام

RegistryKey key = Registry.CurrentUser.CreateSubKey("SOFTWARE\\Person");
Line 20: string[] strSplitkey = AESAlgorithm.DecryptText(key.GetValue("CountRun")
Line 21: .ToString())

و به درستی کارمیکند وقتی برنامه را پابلیش میکنم ودر iis سیستم خودم قرار میدهم هنگام اجرا
خطا زیر را می دهد برای رفع مشکل باید چکار کنم

Server Error in '/' Application.Object reference not set to an instance of an object.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

باتشکر

مهدی کرامتی
سه شنبه 11 تیر 1398, 14:44 عصر
یک Application Pool جدا برای سایت مورد نظر تعریف کنید، و در بخش Advanced Setting از Pool مورد نظر، Identity را به LocalSystem تغییر دهید.