C# TC Identification Verification Application: Hello, in this article, we will create a sample application for TC identification verification using C# and the TC Identification Number Verification service provided by the General Directorate of Population and Citizenship Affairs through an XML web service. You can find detailed information about online queries and web services at the following address:
https://tckimlik.nvi.gov.tr/Home
Step-by-step example application:
Please follow the steps in order.
Let’s start by creating a Windows Forms application named “TCKimlikDogrulama” (TCIdentificationVerification).
After creating our project, let’s create a sample form that will send our information for verification to the web service.
Once the form is created, we need to add the web service as a reference to our project. You can examine the web service at the following address:
https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx
Solution Explorer:
To be able to use the web service within the project, right-click on the “References” section in the Solution Explorer and select “Add Service Reference…”
In the opened window, enter the address of the service’s WSDL file (https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx?WSDL) in the “Address” field, use “Kimlik” as the namespace, and click the “GO” button to list the service under the “Services” section.
Service reference:
After these steps, click the “OK” button to complete adding the service reference to the project. Now, let’s add the code scripts that will make requests to the web service and retrieve the result.
Everything is ready!
ATTENTION: The name-surname information to be sent for verification must be written entirely in capital letters. Otherwise, the verification will return an unsuccessful response.
This content is included in the Technology & Software category.