jump to navigation

foreach a generic list returned in a method by reflection October 3, 2019

Posted by juanpablo1manrique in SharePoint.
add a comment

Un ejemplo bastante útil,

La definición del método en el .dll original

 

public List<CarroEntity> ObtenerCarros()
{
List<CarroEntity> list = new List<CarroEntity>();
list.Add(new CarroEntity() { Color = "Azul", Marca = "Mazda", Placa = "DSF450" });
list.Add(new CarroEntity() { Color = "Amarillo", Marca = "Renault", Placa = "ESF245" });
list.Add(new CarroEntity() { Color = "Verde", Marca = "Mercedes", Placa = "KLS435" });
list.Add(new CarroEntity() { Color = "GrisPlata", Marca = "BMW", Placa = "NBD645" });
list.Add(new CarroEntity() { Color = "Negro", Marca = "Mazda", Placa = "BGT845" });
list.Add(new CarroEntity() { Color = "Blanco", Marca = "Mazda", Placa = "BHT545" });
return list;

}

Llamar este método por reflection

 

Assembly asm = Assembly.LoadFrom(@"D:\MyCode\MyCode\JUAN.WinWPF\JUAN.Carros\bin\Debug\JUAN.Carros.dll");
Type t = asm.GetType("JUAN.Carros.CarrosBL"); 
var methodInfo = t.GetMethod("ObtenerCarros");
if (methodInfo == null)
{
throw new Exception("No such method exists.");
}
var objBLInstance = Activator.CreateInstance(t, null);
System.Collections.IEnumerable instances = (System.Collections.IEnumerable)methodInfo.Invoke(objBLInstance, null);

Type tEntity = asm.GetType("JUAN.Carros.CarroEntity");
var property = tEntity.GetProperty("Placa");
foreach (object obj in instances)
{
Console.WriteLine(property.GetValue(obj));
}
Console.ReadLine();

 

Saludos

Advertisements

Direcciones IP Especiales August 6, 2019

Posted by juanpablo1manrique in SharePoint.
add a comment

View the structure of the GAC folder July 31, 2019

Posted by juanpablo1manrique in SharePoint.
add a comment

start > run > cmd
type : “cd\windows\assembly”
type: “attrib -r -h -s desktop.ini”
type: “ren desktop.ini desktop.bak”

Anonymous authentication fails and redirects to login July 9, 2019

Posted by juanpablo1manrique in SharePoint.
add a comment

Anonymous authentication fails and redirects to login (SHP2013, SHP2019)

 

302 http://  [mi sitio]

302 http://  [mi sitio]/_layouts/15/Authenticate.aspx?Source=/

200 http://  [mi sitio]/paginas/[Custom.aspx]?redirectURL=/_layouts/15/Authenticate.aspx?Source=/

 

Alguien por error le puso este chulo, loco,

 

A required component for using a geolocation field is not installed. Either go to the list settings page to delete this field or contact your administrator June 28, 2019

Posted by juanpablo1manrique in SharePoint.
add a comment

Solo funciona con el instalador de SQL 2008 R2

Se ingresa a descargar…

https://www.microsoft.com/en-us/download/details.aspx?id=26728

y le dices…

1033\x64\SQLSysClrTypes.msi

 

 

 

AADSTS65001: The user or administrator has not consented to use the application with ID named Send an interactive authorization request for this user and resource. May 10, 2019

Posted by juanpablo1manrique in SharePoint.
add a comment

Este error se presenta porque no se ha terminado el registro de la aplicación en azure,

Este ultimo paso es el que no incluye la documentación

 

Saludos,

Can’t Open Enterprise Calendars Project Server January 8, 2019

Posted by juanpablo1manrique in SharePoint.
Tags:
add a comment

Con este error,

Project Cannot open the file
– check that the file name and path are correct
– check that the file format is recognized be project
Project files saved in a version earlier than Microsoft Project 2000 can’t be openen

If your file is from an earlier version, open it in that version, click Save as (File menu), and save in MPX format. Open the MPX file in the current version of Project. When you use this method, project data is imported, but formatting is lost.


Solucion,

  • Agregar el sitio del pwa http://midominio en el listado de trusted sites, en el explorador IE 9 o IE 10, que es el único que abre,
  • Tener la granja actualizada con un CU superior a Abril 2018,
  • Asegurarse de tener el sitio de PWA registrado en el Project Profesional que esta por defecto

 

CRM: AuthenticationParameters: Object reference not set to an instance of an object October 16, 2018

Posted by juanpablo1manrique in SharePoint.
Tags:
add a comment

Este código me estaba arrojando un error,

AuthenticationParameters ap = await AuthenticationParameters.CreateFromResourceUrlAsync(
new Uri(serviceUrl + “api/data/”));

return ap.Authority;

El error que arrojaba era del tipo

Object reference not set to an instance of an object

Para solucionarlo fue necesario agregar la siguiente línea en el web.config

<httpRuntime targetFramework=”4.6″ />

La dirección URL Documents/filemy.doc no es valida. Puede que haga referencia a una carpeta o un archivo que no existe, o una carpeta o un archivo válido que no está en el sitio web actual. July 12, 2018

Posted by juanpablo1manrique in SharePoint.
add a comment

Este error sale en SharePoint Online,

La causa fue una columna calculada que tenia un formato incorrecto.

The URL <file name> is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.

Otra posible solución es esta

https://support.microsoft.com/en-us/help/2796640/the-url-file-name-is-invalid-error-message-when-you-upload-a-file-to-a

Salu2

The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.1 Client was not authenticated March 27, 2018

Posted by juanpablo1manrique in SharePoint.
add a comment

I have the same problem,

I resolved using

SmtpClient smtpClient = new SmtpClient(smtpServer, 25);

I discovered that the transactions try to go by the por 854,

smtpServer:854