jump to navigation

Real Root URL March 3, 2016

Posted by juanpablo1manrique in SharePoint2013.
Tags:
add a comment

Hola,

Algo muy util … para cuando se trabaja con SharePoint, y sitecollections

string rootURL = SPContext.Current.Site.RootWeb.Url;
Regex regexObj = new Regex(@”^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)”);
var match = regexObj.Match(rootURL);
rootURL = match.Value;

Saludos

Get mail and manager from user profile December 4, 2015

Posted by juanpablo1manrique in SharePoint.
Tags:
add a comment

ServerContext serverContext = ServerContext.GetContext(web.Site);
UserProfileManager myUserProfile = new UserProfileManager(serverContext);
UserProfile currentUserProfile = myUserProfile.GetUserProfile(userName);

string managerUserName = (string)currentUserProfile[“manager”].Value;

string workerEmail = (string)currentUserProfile[“WorkEmail”].Value;

Hemos tenido un pequeño problema para obtener su licencia. Si vuelve al Almacén de SharePoint e intenta adquirir esta aplicación de nuevo, no se le volverá a cobrar. July 7, 2015

Posted by juanpablo1manrique in SharePoint2013.
Tags:
add a comment

El error en español
Hemos tenido un pequeño problema para obtener su licencia. Si vuelve al Almacén de SharePoint e intenta adquirir esta aplicación de nuevo, no se le volverá a cobrar.

el error en Ingles
Everything is fine, but we had a small problem getting your license. Please go back to the SharePoint Store to get this app again and you won’t be charged for it

La solucion, ademas de no usar un usuario farmAdmin ni uno del pool de aplicaciones de sharepoint,

solution23

Unhandled Exception: System.IO.FileNotFoundException: The Web application at http://sdf.com could not be found. Verify that you have typed the URL correctly. June 10, 2015

Posted by juanpablo1manrique in SharePoint.
Tags:
add a comment

Una solucion, es agregar el usuario con el que se esta corriendo el comando, como admin de la base de datos,

Get-SPContentDatabase -identity 3383b594-d55d-488b-8ca4-4f16a695b9d6 | Add-SPShellAdmin -UserName CONTOSO\User1

‘center’ is an unexpected token. The expected token is ‘”‘ or ”’. Line X, position X April 10, 2015

Posted by juanpablo1manrique in SharePoint.
Tags:
add a comment

Hola

Este error me paso ejecutando este código en SharePoint Online:

ClientContext clientContext = new ClientContext(mysiteUrl);
List myList = clientContext.Web.Lists.GetById(new Guid(“XXXX-XXXX-XXX-XXXXX”));

clientContext.Load(myList);

clientContext.ExecuteQuery(); //aqui sale el error

Un mes antes el tema funcionaba perfecto, pero un día cualquiera fallo al revisar el error, inicie la búsqueda con Fiddler, y descubri que llama a una URL,

http://msoid.%5BTenant%5D/FPUrl.xml

Pero esta arrojaba el siguiente error

Error. Page cannot be displayed. Please contact your service provider for more details.

Cuando debería contestar un XML con la inforación de los Tokens de Autenticación,

La solucion:

1. La rápida: crear un registro en el archivo de host

157.56.58.43 msoid.[Tenant]

2. La lenta: Poner el caso de soporte a microsoft para que arregle ese CNAME,

 

Saludos

 

 

always return deferred resolved July 28, 2014

Posted by juanpablo1manrique in SharePoint2013.
Tags: , ,
add a comment

En jquery existen las promesas,

Te prometo que te llevo a miami .. jejeje

ante dudas con el tema
http://joseoncode.com/2011/09/26/a-walkthrough-jquery-deferred-and-promise/

function getPrintingStatus(){
var deferred = $.Deferred();
if {isNecesaryPrint}
{
$.post(
“/echo/json/”,
{
json: JSON.stringify( {status: Math.floor(Math.random()*8+1)} ),
delay: 2
}
).done(function(s){
deferred.resolve(s.status);
}).fail(deferred.reject);
return d.promise();
}
else {
return null;
}
}

Es decir si no es necesario imprimir no me prometa nada, digame que no,

si se envia un null y la capa superiro esperaba un deferred se arroja un error o se estanca el proseso porque la promesa nunca se cumplio, entonces hay que decir que si.

return $.when()

or

var deferred = $.Deferred().resolve();
return deferred.promise();

es decir queda como

function getPrintingStatus(){
var deferred = $.Deferred();
if {isNecesaryPrint}
{
$.post(
“/echo/json/”,
{
json: JSON.stringify( {status: Math.floor(Math.random()*8+1)} ),
delay: 2
}
).done(function(s){
deferred.resolve(s.status);
}).fail(deferred.reject);
return d.promise();
}
else {
return $.when()
}
}

Saludos

The certificate that was used has a trust chain that cannot be verified. Replace the certificate or change the certificateValidationMode April 11, 2014

Posted by juanpablo1manrique in Windows 2008, Windows 2012.
Tags: ,
add a comment

El Error

 

The X.509 certificate CN=ADFS Signing – myadfs.mydomain.loc is not in the trusted people store. The X.509 certificate CN=ADFS Signing – myadfs.mydomain.loc chain building failed. The certificate that was used has a trust chain that cannot be verified. Replace the certificate or change the certificateValidationMode. A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.

Este error se presenta por la falta de

<certificateValidation certificateValidationMode=”None” />

Y que la dirección
<add thumbprint=”4D8781tttytyttC83DD8B7088C769287″ name=”https://myadfs.mydomain.loc/adfs/services/trust&#8221; />

estaba http y no https

 

 

Salud2

 

Calentando SharePoint – Warm Up December 3, 2013

Posted by juanpablo1manrique in SharePoint.
Tags:
add a comment

A muchos les a pasado que por la manana SharePoint siempre en el primer request amance super lento. Se puede crear una rutina en power shell que llamada desde el task manager de uno de los WFE de SharePoint, realice una actividad de calentamiento de SharePoint.

Se crea un archivo Calentamiento.ps1 y se agregan las siguientes lineas
$webclient = New-Object System.Net.WebClient
$webclient.Credentials = [System.Net.CredentialCache]::DefaultCredentials
$webclient.DownloadString(http://mymadrugonsharepointsite)

Se crea la tarea programada a eso de las 7:30am y listo

Saludos

Open HTML, FLASH, PDF files in SharePoint Library try Download July 15, 2013

Posted by juanpablo1manrique in SharePoint, SharePoint2013.
Tags:
2 comments

Hola
En estos días tuve el impedimento de poder desplegar archivos HTML, PDF, FLASH desde una librería de SharePoint, al dar click sobre un archivo HTML que estaba en una librería, me lo intentaba descargar en vez de abrirlo de una vez,

Untitled2
Una de las soluciones fue ir al central administrator y en los settings del webApplication decirle “permissive”, pero la idea no era darle “permissive” ya que esto abría un poco la seguridad del web application, así que seguí buscando y encontré la función AllowedInlineDownloadedMimeTypes (Realmente es un vector), el cual permite agregar los tipos de application que quiero que se desplieguen sobre SharePoint, el script completo quedo de la siguiente manera.

$webApp=Get-SPWebApplication http://webapplicationurl:90
$webApp.BrowserFileHandling = “strict”
$webApp.AllowedInlineDownloadedMimeTypes.Add(“application/octet-stream”)
$webApp.AllowedInlineDownloadedMimeTypes.Add(“text/html”)
$webApp.AllowedInlineDownloadedMimeTypes.Add(“application/pdf”)
$webApp.AllowedInlineDownloadedMimeTypes.Add(“application/x-shockwave-flash”)
$webApp.Update()

Para poder ver que tipo de application que quiero desplegar, me recomendaron RESTClient de Firefox el cual me dice que tipo de application es el que necesito

https://addons.mozilla.org/en-us/firefox/addon/restclient/Untitled1

PD. los archivo de tipo “application/octet-stream” igualmente no se abren en modo permissive sino que toca, colocarlo strict y agregar el tipo de application correspondiente.

Happy SharePoint,

Error: var logoImg = documentGetElementsByName – MoveSiteTitle February 24, 2013

Posted by juanpablo1manrique in SharePoint, SharePoint Development.
Tags: ,
3 comments

Hola Amigos

Ahora que ingresamos al mundo cross-browser, con sharepoint 2013, encontrmos que sharepoint 2010 todavia tiene algunos incovenientes, uno de ellos se me present en estos días al estar trabajando con el SharePoint recien instalado y con el Master.Page v4 que trae sharepoint por defecto, en Chrome en el momento de hacer debug se evidenciaba error en estas 2 líneas.

PlaceHolderPageTitleInTitleArea

solucion medio temporal:

En SharePoint designer se busca el PlaceHolder:PlaceHolderPageTitleInTitleArea  al abrir el master page se le dice a que visible = false

<asp:ContentPlaceHolder id=”PlaceHolderPageTitleInTitleArea” runat=”server” Visible=”false” />

Esto ya no renderiza este molesto código en sharepoint

Se intento bajar el ultimo Cumulative Update de Diciembre 2012 http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=2596957

Pero esto no soluciono el problema

Asi que este place holder quedo con la propiedad visible=”false”, esta solución no me convence del todo así que seguire investigando sobre el tema, cualquier sugerencia con gusto sera recibida.

SHPludos