jump to navigation

deferred Vs Promise January 6, 2018

Posted by juanpablo1manrique in SharePoint.
add a comment

Si lo miras así es más fácil,

Advertisements

vue.js bind src img December 3, 2017

Posted by juanpablo1manrique in SharePoint.
add a comment

Hello,

Today,  I want bind img in <img> tag,

Solution,

<img v-bind:src=”‘data:image/Bmp;base64,’ + obj1.Obj2.propImage” />

Regards,

 

HTTP could not register URL http://+:80/HelloWCF/. Your process does not have access rights to this namespace November 27, 2017

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

Buen día el día

Hoy me ha sucedido este lindo error,

HTTP could not register URL http://+:80/HelloWCF/. Your process does not have access rights to this namespace

Buscando en blogs, muchos hablaban de “run as administrator” el visual studio, otros de agregar tu cuenta al grupo de administradores del equipo, pero esto me dio para pensar es algo de permisos pero donde, que cuenta es la que no tiene permisos para crear un servicio WCF por código, y vuala se me ocurrió lo siguiente,

El applicationPool en el IIS!!!

El application pool corre con una cuenta, IIUSR que casi no tiene privilegios, entonces la mejor práctica en vez de subirle permisos a la cuenta IIUSR, es utilizar otra cuenta del dominio o local que pertenezca a este grupo de administrador y así poder solucionar el inconveniente,

IIS -> poolApplications -> Advanced Settings -> Indentity -> custom Account -> …. local o dl dominio con permisos de administración sobre el equipo,

Saludos,

Open Advanced Shared Item . Time Out September 20, 2017

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

Hello,

In this days I have a problem when I tried to enter at page of advanced shared.

  • In the item click in (…)
  • An other time (…)
  • Share With
  • but Waiting … and waiting … till time out,

in SharePoint Logs you find

Slow Query Duration: 104507.8692

If you have a farm with a upper version of 15.0.4571.1502 Apr 2014

You can run

$db = Get-SPContentDatabase -Identity WSS_CONTENT_etc
$db.repair($true)

You maybe should make backup after,

Regards

SPFederationAuthenticationModule.IsRedirectToLogOnPage: Detected a redirection but the redirect is not to a known signin page: September 15, 2017

Posted by juanpablo1manrique in SharePoint.
add a comment

Deshabilitar el servicio Request Management

get current user ASP.NET Forms August 1, 2017

Posted by juanpablo1manrique in SharePoint.
add a comment

HttpContext.Current.User.Identity.Name

Read CSV file Powershell March 29, 2017

Posted by juanpablo1manrique in SharePoint.
add a comment

 

$unarchivo = “c:/afd.csv”
param ([string]$unarchivo = $(throw “variable vacia”))
import-csv $unarchivo | foreach-object {
$USRPrincipalName = $_.Column1
$OldPrimary = $_.Column2
$NewPrimary = $_.Column3
#el powershell deseado
Set-Mailbox -identity $UserPrincipalName -EmailAddresses @{add=”SMTP:” + “$NewPrimary”}
}

Update Enterprise Keyword Column OnPremise : TaxKeyword March 10, 2017

Posted by juanpablo1manrique in SharePoint.
add a comment

Hola,

Muy buenas,

private static void TestUpdateKeyWords()
 {
 using (SPSite site = new SPSite(urlSite))
 {
 using (SPWeb web = site.OpenWeb("subweb"))
 {
 SPList list = web.Lists.GetList(new Guid("00000-ad33-4d53-91c0-6310ba1baf09"), true);
 SPListItem item = list.GetItemById(228);
 //CheckOut
 item.File.CheckOut();
 //Set Field
 SPField field = list.Fields.GetFieldByInternalName("TaxKeyword");
 var taxKeywordField = (TaxonomyField)field;
 string[] values = { "keyword1","keyword2" };
 var keywords = values.Select(value => EnsureKeyword(taxKeywordField, value)).ToList();
 string strKeyWordsToInsert = GetTermsString(keywords);
 item[taxKeywordField.Id] = strKeyWordsToInsert;
 item.Update();
 //CheckIn
 item.File.CheckIn("Actualizacion datos", SPCheckinType.MajorCheckIn);

}
 }

}

private static Term EnsureKeyword(TaxonomyField taxField, string name)
 {
 int DefaultLanguage = 1033;

TaxonomySession session = new TaxonomySession(taxField.ParentList.ParentWeb.Site);

var termStore = session.TermStores[0];
 var keywords = termStore.KeywordsTermSet.GetAllTerms();
 var result = keywords.Where(k => k.Name == name);

var keyword = result.FirstOrDefault();
 if (keyword != null)
 {
 return keyword;
 }
 keyword = termStore.KeywordsTermSet.CreateTerm(name, DefaultLanguage, Guid.NewGuid());
 return keyword;
 }

private static string GetTermString(Term term)
 {
 return string.Format("-1;#{0}{1}{2}", term.Name, "|", term.Id);
 }

private static string GetTermsString(IEnumerable<Term> terms)
 {
 var termsString = terms.Select(GetTermString).ToList();
 return string.Join(";#", termsString);
 }

 

Para ver la version Online

http://sharepoint.stackexchange.com/questions/108716/setting-value-of-enterprise-keywords-using-csom

 

Saludos,

UnauthorizedAccessException SharePoint _api February 28, 2017

Posted by juanpablo1manrique in SharePoint.
add a comment

Hola amigos,

 

Me ha pasado que

UnauthorizedAccessException “_api/SP.UserProfiles.PeopleManager”

Pense que era permisos de algo pero descubrí que tambien fallaba,

_api/web/lists
_api/search/query?querytext=’SharePoint’
_api/SP.UserProfiles.PeopleManager

 

Pero funcionaba con un usuario administrador,

Al verificar …
site settings->site permissions->permissions level->read->

Integration client features
Use remote interface

Estaban deshabilitadas, que mano de vueltas para habilitar estos dos niveles de permisos,

 

Felices fiestas

 

 

Wait for an array of deferreds January 23, 2017

Posted by juanpablo1manrique in SharePoint.
add a comment

var deferredArray = [];
for(var i = 0; i < data.length; i++)
{
deferredArray.push(processItem(data[i]));
}
$.when.apply($, deferredArray).then(
function () {
deferMayor.resolve(collReturn)
},
function () {
deferMayor.reject(args);
});
);