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 […]
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 […]