2008-11-20 26 views
8

Anfitrión: GoDaddy alojamiento compartidoOtra excepción de seguridad en GoDaddy después de iniciar sesión intente

Nivel de confianza: Medio

Lo siguiente ocurre después de presentar un usuario válido/pass. La base de datos tiene permisos de lectura/escritura y cuando elimino el requisito de inicio de sesión en una página de administración que actualiza la base de datos como se esperaba.

¿Alguien más ha tenido este problema o sabe cuál es el problema? ¿Alguien?

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 

Respuesta

1

Si está utilizando componentes de terceros, es posible que desee comprobar si los componentes están realizando algún tipo de acción de seguridad. Más o menos un año atrás me encontré con un problema con GoDaddy y SubSonic ORM, que tenía un problema con una línea particular de código que solicitaba un nivel de seguridad. Abrí el código en el reflector, lo miré y lo verifiqué.

Esto puede ser un problema. Si el componente es que le causa dolor, intente descargar el código y eliminar el código sospechoso, recompilarlo y ejecutarlo. Eso es exactamente lo que tuve que hacer con el código SubSonic uno o dos años atrás.

1

¿Ha intentado juguetear con los permisos de los archivos y carpetas de su sitio? Tuve un error en godaddy donde no se pudo escribir un nuevo archivo porque el directorio no tenía permiso de escritura. Podría intentar configurar su raíz completa para leer/escribir para ver si eso soluciona su problema. Para llegar a la configuración de permisos:

  • sesión en GoDaddy
  • Haga clic en "Mi Cuenta de Alojamiento" y "Administrar cuenta" junto a su nombre del sitio
  • Haga clic en "Mis archivos"
  • Marque las casillas junto a los archivos a los que se accede y luego haga clic en el ícono Permisos en la parte superior
1

Actualmente estoy trasladando mi sitio web a GoDaddy y pulse este error. Tengo un Proveedor de Membresía personalizado que usa contraseñas hash basadas en la clave de máquina en el web.config. Así que fue este bloque de código que estaba causando el error:

// 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."); 

Así que el problema estaba tratando de abrir el web.config utilizando WebConfigurationManager.OpenWebConfiguration, que me fijo mediante la sustitución de las líneas OpenWebConfiguration y GetSection con lo siguiente:

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

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

Solución 4 System.Security.SecurityException: solicitud de permiso de tipo 'System.Net.SocketPermission, Sistema, versión = 4.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089' fallidos

siguiente solución de error anterior

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

Obras para mi es godady alojamiento

+0

Gracias, estado golpeando mi cabeza en este error. –

+0

Muchas gracias. Estaba tan frustrado por esto. Amor de Pakistán <3 –

Cuestiones relacionadas