2008-11-20 22 views
8

ana bilgisayar çalışırlar. Veritabanı, okuma/yazma izinlerine sahiptir ve veritabanı gereksinimlerini beklendiği gibi güncelleyen bir yönetici sayfasında oturum açma gereksinimini kaldırdığımda.Giriş sonra GoDaddy bir başka güvenlik özel

Bu sorunu başkası ya da sorunun ne olduğunu biliyor mu? Herkes?

Server Error in '/' Application. 
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.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' 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.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.] 
    System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0 
    System.Security.CodeAccessPermission.Demand() +59 
    System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +684 
    System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +114 
    System.Configuration.Internal.InternalConfigHost.StaticOpenStreamForRead(String streamName) +80 
    System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForRead(String streamName, Boolean assertPermissions) +115 
    System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForRead(String streamName) +7 
    System.Configuration.Internal.DelegatingConfigHost.OpenStreamForRead(String streamName) +10 
    System.Configuration.UpdateConfigHost.OpenStreamForRead(String streamName) +42 
    System.Configuration.BaseConfigurationRecord.InitConfigFromFile() +437 


Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433 

cevap

1

de izinler simgesini erişilen alıyorsanız dosyalara sen bileşenler güvenlik eylem bir tür performans olmadığını kontrol etmek isteyebilirsiniz. Bir yıl kadar önce GoDaddy ve SubSonic ORM ile ilgili bir sorunla karşılaştım, bir güvenlik seviyesi talep eden belirli bir kod satırıyla ilgili bir problem yaşadı. Yansıtıcıdaki kodu açtım, bir baktım, doğruladım.

Bu sorun olabilir. , numaralı bileşenden kaynaklanıyorsa, kodun indirilmesini ve şüpheli kodun kaldırılmasını, yeniden derlenmesini ve bununla birlikte çalıştırılmasını denemenize neden oluyor. SubSonic kodu bir veya iki yıl geri yapmak zorunda kaldım.

1

Sitenizdeki dosya ve klasörlerin izinleriyle oynamayı denediniz mi? Dizinde yazma izni olmadığından yeni bir dosyanın yazılmadığı bir hata oluştu. Sorunuzun giderilip giderilmediğini görmek için tüm kökünüzü okuma/yazma olarak ayarlamayı deneyebilirsiniz. Lütfen izin ayarlara ulaşmak için:

  • Girişi GoDaddy için
  • tıklayın "My Hosting Hesap" ve yanındaki kutuları işaretleyin sonraki sitenizin adını
  • tıklayın "My Files"
  • için "Hesabı Yönet" Eğer herhangi bir üçüncü taraf bileşenlerini kullanıyorsanız o zaman üst
1

Şu anda web sitemi GoDaddy'ye taşıyorum ve bu hatayı alıyorum. Web.config dosyasındaki machinekey'e dayanan karma şifreleri kullanan özel bir Üyelik Sağlayıcım var. Yani

// Get encryption and decryption key information from the configuration. 
Configuration cfg = 
    WebConfigurationManager.OpenWebConfiguration(System.Web.Hosting.HostingEnvironment.ApplicationVirtualPath); 
machineKey = (MachineKeySection)cfg.GetSection("system.web/machineKey"); 

if (machineKey.ValidationKey.Contains("AutoGenerate")) 
    if (PasswordFormat != MembershipPasswordFormat.Clear) 
     throw new ProviderException("Hashed or Encrypted passwords are not supported with auto-generated keys."); 

Sorun aşağıdaki OpenWebConfiguration ve GetSection çizgilerini değiştirerek sabit WebConfigurationManager.OpenWebConfiguration kullanılarak web.config açmaya çalışıyordu: Yani hataya neden oldu bu kod bloğu oldu:

machineKey = (MachineKeySection)WebConfigurationManager.GetWebApplicationSection("system.web/machineKey"); 
10

http://www.codeproject.com/Questions/586223/SecurityplusExceptionpluscomingplusinplusaplusrunn

Çözüm 4 System.Security.SecurityException: tip izni isteği 'System.Net.SocketPermission, Sistem, Sürüm = 4.0.0.0, nötr Kültür =, PublicKeyToken = b77a5c561934e089' yukarıdaki hata benim en godady Bu hata hakkında başımı beceriyor,

+0

Teşekkür barındıran

<system.web> <customErrors mode="Off"/> <trust level="Full" /> </system.web> 

İşleri çözümüne aşağıdaki

başarısız oldu. –

+0

Çok Teşekkürler. Bundan dolayı çok sinirliydim. Pakistan'dan Sevgi <3 –

İlgili konular