3 ASP.net MVC web uygulaması yazdım ve hepsi ISP'mle paylaşılan barındırma sunucularında konuşlandırıldım.log4net ASP.Net MVC web uygulamasında Güvenlik İstisnası atıyor
Tüm 3 uygulama yapılandırma ve ayarlarda çok benzer. 1. uygulama, 2. ve 3. gruplardan farklı bir sunucuya dağıtılmıştır. 1. uygulama bana hata vermiyor. rastgele:
2. ve 3. uygulamalar biraz aşağıdaki SecurityExceptiontükürmek
alt text http://i46.tinypic.com/24p9pac.jpg
İstisna Metin:
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Configuration.ConfigurationPermission, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SecurityException: Request for the permission of type 'System.Configuration.ConfigurationPermission, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed.]
System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security.CodeAccessPermission.Demand() +58
System.Configuration.BaseConfigurationRecord.CheckPermissionAllowed(String configKey, Boolean requirePermission, Boolean isTrustedWithoutAptca) +99
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082
Web.config dosyasını dağıttıktan veya düzenledikten sonra sayfayı ilk defa vurduğumda yukarıdaki hatayı alıyorum. Ancak, sonraki sayfada yeniden yükleme yapamıyorum. 2 web sitesi günün geri kalanı için yine iyi olacak, ama ertesi sabah tekrar aynı hatayı alıyorum.
Web.config dosyasını düzenledikten sonra, bir derlemeyi zorlamakta olduğumu farz ettiğim hatalar sürekli olarak görünüyor mu?
LütfenYardım edin. Problemin ne olduğundan emin değilim. IIS'deki güvenlik ayarları ile ilgili olduğu gibi geliyor. 3 web uygulamasının tamamı, hata vermeyen 1. web uygulamasının tamamen farklı bir sunucuda olması dışında çok benzer bir şekilde kurulup dağıtılmaktadır.
Mükemmel ucu nerede kökenli tam olarak nerede dev kaynak istisna aldı ve orada andan itibaren yanlış olduğunu anladım Güven düzeyini Orta'ya ayarlamak, böylece yerel makinede hata ayıklamayı etkinleştirmek. Teşekkürler! – Adventure