c#




Determine with C# if a user exists in the SharePoint group or in the included AD Group

SharePoint 2016 Logo

Class to determine if a user is in the SharePoint group or is in the AD Group, which is added to the SharePoint group. So, the admin access to a custom SharePoint module is that everybody, who exists in the admin group, has more data. The admin group is a SharePoint group, which contains SPUsers (from domain) and Domain groups, which contain AD Users. Actual for SharePoint 2016, 2019.

(read more...)

8 steps to add SVC service to SharePoint on-premises solution programmatically

SharePoint 2016 Logo

When you make a SharePoint 2019 on-premises solution, you can make not only SPFX solutions, but also old-school WSP-solutions. It allows you not only to use SharePoint API, but also to use your own API services. With SharePoint 2019 you can use WCF service. For example, it’s a good way when you develop an application which uses the external database. This works also for SharePoint 2013 and SharePoint 2016.

(read more...)

Add the application as a service at Windows Server

You can add the service with PowerShell. New-Service and Get-service are available in PowerShell 5, for 'Remove-Service' PowerShell >= 6 required. Otherwise you can use 'sc.exe DELETE MyMegaServiceApplication'. You should execute it with as an administrator. Not any application you can start a service. As a .Net developer, I usually create .Net solutions, in this case you should create application based on 'worker service' template in VS 2022 or any other IDE.

(read more...)

Create list item and add data to SharePoint 2019 lists via REST C#

SharePoint 2016 Logo

Once I tried to make the application to migrate a custom data source from SharePoint 2010 to SharePoint 2019 on-premise. To make it easier, I decided to make to separate solutions – the first one to export the data from SharePoint 2010 from the list to JSON and attachments to local folder(CSOM for SharePoint 2010 sucks) and the utility to import data to SharePoint 2019 via REST.

(read more...)

C# Convert Char to Int

Once again I decided to make a new task from LeetCode and finally my process had been stopped. I could not convert Char to Int. I even spent some time for research, but I could not find any solution. Then I open the documentation and started to read.

(read more...)

MarkiMarta.com. Notes of web-specialist
Since 2009
18+