When you execute your Web Api and at Swagger Page you can see Swagger error ‘Failed to load API definition’, you can’t really determine, where the error is. It is in one of the controllers. But do you want to check all of them?
(read more...)When you execute your Web Api and at Swagger Page you can see Swagger error ‘Failed to load API definition’, you can’t really determine, where the error is. It is in one of the controllers. But do you want to check all of them?
(read more...)There's a data type 'uniqueidentifier' in SQL. If you need to feed this field with random value, you can use NEWID(). The 'uniqueidentifier' value in SQL looks like this: '234779E5-996F-45AC-90C3-21631AF4A08D'.
(read more...)In one Web Api Net Core solition I used Microsoft.AspNetCore.Identity.EntityFrameworkCore for Authentication. It’s really comfortable to work with this package because you a free from the implementation of all the methods and don’t spare much time. It also returns the text of errors, for example, that password is to short or special character is required. For me everything was ok, but the customer wanted to see the text in German.
(read more...)There’s a nice online tool for rendering the test data. It’s at the website https://www.mockaroo.com/. I often use it to render fake SQL data. But now I am working on a Net application with EF Core. And obviously, I need test data for webservices and interfaces. Below is the way to quickly insert the test data in the Net solution.
(read more...)It's an extremely nice article about how to implement the Role-based Authorization in Net Core Web API. I won't copy it here because it's written to good. Maybe I will publish to Git a template app later, but now just save for future.
(read more...)How to store credentials? It’s always a question because nobody wants to demonstrate the passwords, neither for the databases, nor for web services or anything else. SharePoint has a built-in tool to store a sensitive data – technical user accounts, databases or any data like this. Here is how to create variables in the secure store.
(read more...)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...)In apps with different Roles and permissions you may need to get information about AD Groups. Here are some snippets which can help you with this part of the task.
(read more...)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...)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...)