Category: ASP.NET

Debemos crear un fichero BAT (.bat) en la misma ruta de la DLL que queremos firmar. DEL .\SIGNED_LIBRARY.* /F "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\ildasm.exe" .\LIBRARY.dll /output:.\SIGNED_LIBRARY.il "C:\Windows\Microsoft.NET\Framework\v2.0.50727\ilasm.exe" .\SIGNED_LIBRARY.il /dll /key=.\LIBRARY_KEY.snk /output=.\SIGNED_LIBRARY.dll […]
Este fragmento de código nos permite hacer una llamada a un Web Service REST mediante la librería RestSharp. var client = new RestClient("REST_SERVICE_URL"); client.Authenticator = new HttpBasicAuthenticator("USER", "PASSWORD"); var request […]
Podemos convertir strings, chars y arrays entre si de estas formas:   string -> string[] (Todo el string en un solo elemento del Array) string[] myArray = new []{ myString […]
A través de esta función podemos obtener la URL para ver las propiedades de un item de una lista de SharePoint: public static string GetItemPropertiesURL(SPListItem item) { string web = […]
SPSecurity.RunWithElevatedPrivileges(delegate() { using (SPSite site = new SPSite("YOURSITE")) { using (SPWeb web = site.OpenWeb()) { //Obtain the page PublishingPageCollection publishingPages = PublishingWeb.GetPublishingWeb(web).GetPublishingPages(); PublishingPage page = publishingPages.FirstOrDefault(f => f.Uri.AbsoluteUri == "YOURPAGE"); […]
Unpublish and Checkout SharePoint Page: SPSecurity.RunWithElevatedPrivileges(delegate() { using (SPSite site = new SPSite("YOURSITE")) { using (SPWeb web = site.OpenWeb()) { //Obtain the Page PublishingPageCollection publishingPages = PublishingWeb.GetPublishingWeb(web).GetPublishingPages(); PublishingPage page = […]
This is a function in order to create a CAML Query specified for Filters. Once we have the filters, we’ve to create the parameters for the function, following this template: […]
My case: It’s a standard register form created in a SharePoint WebPart (but this error could happen even if you’re not using SharePoint). When I submit the form, sometimes I […]
I’ve never found on my Visual Studio an option to directly add a new WebService file so I looked for a solution and I got this one, I hope it’ll […]
I’ve found an interesting link about how to retrieve some properties of user profiles in SharePoint 2013 by using its client object model, like this: const string serverUrl = "http://serverName/"; […]