miércoles, 23 de mayo de 2018

This program is blocked by group policy. For more information, contact your system administrator

Este error me salio al subir un sitio web en un servidor de hosting GodDaddy

Server Error in '/' Application.

This program is blocked by group policy. For more information, contact your system administrator

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.ComponentModel.Win32Exception: This program is blocked by group policy. For more information, contact your system administrator

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.

Solucion:


1. Agregue nivel de confianza al sistema. Web
<system.web>
    compilation debug="true" targetFramework="4.5.2"/>
    <httpRuntime targetFramework="4.5.2"/>
    <trust level="Full"/>             <!-- Just add this to the webconfig -->
 </system.web>

2. Elimine los compiladores en system.codecom
<system.codedom>
    <compilers>
      <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" />
      <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
    </compilers>
  </system.codedom>
debe quedar así:
<system.codedom>
              <!-- All is removed between the 2 tags-->
 </system.codedom>

martes, 22 de mayo de 2018

System.InvalidOperationException: 'No se puede convertir un valor nulo en un tipo de valor.' C#


System.InvalidOperationException: 'No se puede convertir un valor nulo en un tipo de valor.'



Asigne un valor a un tipo que acepta valores NULL tal como lo haría para un tipo de valor normal, por ejemplo int? x = 100; o double? d = 14.108. A un tipo que acepta valores NULL también se le puede asignar el valor null: int? x = null.

Ejemplo

  public class Data
    {
        public int id { get; set; }
        public string name { get; set; }
        public string symbol { get; set; }
        public string website_slug { get; set; }
        public int? rank { get; set; }
        public double? circulating_supply { get; set; }
        public double? total_supply { get; set; }
        public double? max_supply { get; set; }
        public Quotes quotes { get; set; }
        public int last_updated { get; set; }
    }

viernes, 18 de mayo de 2018

Tabla SAP email Usuario

Tablas

USR21 - Asignación nombre usuario - clave dirección
ADR6 - Direcciones correo electrónico (Gestión Central Direcciones)

Campo referencia PERSNUMBER



miércoles, 16 de mayo de 2018

Reiniciar Iniciar Detener Servicio IIS

A veces es necesario reiniciar el IIS para que tome algún parámetro de configuración:

1- Modo Gráfico

 Vamos al Administrador de Internet Information Services (IIS)
Seleccionamos el servidor damos click secundario y damos click en Detener

2- Modo Comando
Abrimos un cmd,de preferencia como administrador y lanzamos las siguientes variantes según nuestra necesidad.
Reiniciar
C:\Users[NAMEUSER]> iisreset
Iniciar
C:\Users[NAMEUSER]\> iisreset /start
Detener
C:\Users[NAMEUSER]\> iisreset /stop

Como Asignar Impresora por Default a Usuario SAP

1. En el menú principal del sistema -> Valores Predeterminados -> Datos Propios

2. Ir a la pestaña de Valores fijos y seleccionar impresora en Disp.Salida.

Al momento de imprimir en cualquier transacción aparecerá por default la impresora seleccionada.

viernes, 13 de abril de 2018

404.2 The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server

    Paso 1:  abre IIS y haz clic en el nombre del servidor  
    Paso 2. Haz doble clic en "Restricciones de ISAPI y CGI" 
    Paso 3. Haga clic derecho en ASP.NET v4.0.30319 y seleccione "permitir"



The remote server returned an error: (413) Request Entity Too Large.


He implementado un pequeño conjunto de servicios REST usando WCF. Uno de los servicios recibe una gran cantidad de datos. Cuando lo llamo (esto es cuando lo ejecuto desde Visual Studio, todavía no lo he implementado en un servidor de producción) recibo el error: 

El servidor remoto devolvió un error: 
"The remote server returned an error: (413) Request Entity Too Large. "

He estado leyendo un poco en internet y me doy cuenta de que esto se debe a que el servidor predeterminado que se ejecuta está configurado para rechazar solicitudes grandes para ayudar a prevenir ataques de DOS. Eso tiene sentido, pero necesito aumentar el tamaño para hacer frente a mi solicitud. Esto finalmente irá a una intranet para que los ataques de DOS no sean una gran preocupación. De todos modos, por lo que he leído en la red, terminé añadiendo lo siguiente a mi Web.Config:


Code:

<bindings>
      <basicHttpBinding>
        <binding maxReceivedMessageSize="2147483647" 
                 maxBufferSize="2147483647"
                 maxBufferPoolSize="2147483647">
          <readerQuotas maxDepth="32"
                        maxArrayLength="2147483647"
                        maxStringContentLength="2147483647"/>
        </binding>
      </basicHttpBinding>
</bindings>