Tag Archives: c#

[Solved] Nginx Certificate Fill Path Error: SSL: error:0200107B:system library:fopen:Unknown error:fopen

When nginx configures the SSL certificate, it starts with an error. The certificate file cannot be found. The error log is as follows:

2021/11/24 15:52:19 [emerg] 4124#3800: cannot load certificate "E:
ginx-1.21.4\ssl\6667030_xxxx.pem": BIO_new_file() failed (SSL: error:0200107B:system library:fopen:Unknown error:fopen('E:
ginx-1.21.4\ssl\6667030_xxxxxx.pem','r') error:2006D002:BIO routines:BIO_new_file:system lib)
2021/11/24 15:53:33 [emerg] 1832#4972: cannot load certificate "E:
ginx-1.21.4\ssl\6667030_xxxx.pem": BIO_new_file() failed (SSL: error:0200107B:system library:fopen:Unknown error:fopen('E:
ginx-1.21.4\ssl\6667030_xxxx.pem','r') error:2006D002:BIO routines:BIO_new_file:system lib)

Solution:

Change the address path of disk e to “\\”, which was written as “ssl_certificate”       E: “\nginx-1.21.4\SSL\6667030_xxxx.PEM”, it keeps reporting errors

 server {
        listen       443 ssl;
        server_name  xxxx;

        ssl_certificate      E:\\nginx-1.21.4\ssl\6667030_xxxx.pem;
        ssl_certificate_key  E:\\nginx-1.21.4\ssl\6667030_xxxx.key;

        ssl_session_cache    shared:SSL:1m;
        ssl_session_timeout  5m;

        ssl_ciphers  HIGH:!aNULL:!MD5;
        ssl_prefer_server_ciphers  on;


		location /api/ {
			client_max_body_size 1000m;
			alias   E:\dev\Server\api/;
            index  index.html index.htm;
        }
		
    }

Unknown SSL protocol error in connection to xxx:443 [How to Solve]

1. Unknown SSL protocol error in connection to XXX: 443

Unknown SSL protocol error in connection to XXX: 443 occurs when Git is used to download from a remote location..

Method 1:

(example):

Set up proxy server:

: Add in .gitconfig

http.proxy=127.0.0.1:8087

http.sslVerify=false

Method 2:

(example):

Type directly on the command line

git config --global http.proxy 127.0.0.1:8087

git config --global http.sslVerify false

Unit Android converts c# class to JSON file and reports an error

Original file connection: unity about the error report of newtonsoft. JSON reference!!!! (resolved)_ Xiaoyan can’t write code blog – CSDN blog

I’m afraid the original article will be deleted once.

1、 Download the newtonsoft.json.dll library

https://www.nuget.org/packages/Newtonsoft.Json/

After downloading, change the downloaded file to a. Zip file and unzip it. After decompression, find the newtonsoft.json.dll file in the directory:… \ newtonsoft. JSON. 13.0.1 \ lib \ netstandard2.0 and copy it to the… \ assets \ plugins \ netstandard2.0 directory of unity.

2、 Modify unit settings

ProjectSetting-> Player-> API compatibility level changed to. Net 4. X

Create a new link.xml file in the assets directory of the unity project:

<linker>
	<assembly fullname="System.Core">
		<type fullname="System.Linq.Expressions.Interpreter.LightLambda" preserve="all" />
	</assembly>
</linker>

[Solved] GP tool Call Error: ERROR 000824: The tool is not licensed.

Error reporting when calling GP tool

Last week, I wrote the code to call the two GP under esri.arcgis.datamanagementtools: createenterpriseodatabase and enableenterprise Geodatabase, that is, to create an enterprise database and convert the database into an enterprise database, but there are always errors. The error contents are as follows:

Executing: EnableEnterpriseGeodatabase
Start Time: Mon Nov 15 14:19:41 2021
Failed to execute. Parameters are not valid.
ERROR 000824: The tool is not licensed.
Failed to execute (EnableEnterpriseGeodatabase).
Failed at Mon Nov 15 14:19:41 2021 (Elapsed Time: 0.00 seconds)

When I manually execute the tool by using the tool in the toolbox provided by ArcGIS, the execution is successful. The execution parameters are as like as two peas, but the code execution is not a problem. Later, it was found that it was an authorization problem. The following permission initialization code was added to the code constructor or loading event. The problem was solved perfectly.

ESRI.ArcGIS.RuntimeManager.BindLicense(ESRI.ArcGIS.ProductCode.EngineOrDesktop, ESRI.ArcGIS.LicenseLevel.GeodatabaseUpdate);

Viewpoint: Tran: 2009 ch: 0 error: – 1073446906

When the c# OPC client accesses the OPC server, there are errors in OPC writing
these errors are the errors I have experienced. Record them

environment

PLC: S7-200 PC access smart
DLL: register and reference opcdaauto.dll
Language: c#
implementation function: read and write PLC through OPC

System error

Tran:2009 CH:0 Error:-1073446906

resolvent

PLC forgot to power on, just power on 😂

How to Solve Internal Server Error: /swagger/v1/swagger.json

Sometimes, when running swagger, it will cause“   Internal Server Error /swagger/v1/swagger.json  ” Wrong.

Here are my solutions:

1. First look at the console and check the reason. The reason is: ambiguous HTTP method for action, which is translated as “ambiguous HTTP operation method”. It is estimated that a brother did not indicate the HTTP method when submitting the code.

2. Search all public methods in the controller. In the search result window, press ↓ on the keyboard   and   ↑   Button to quickly switch to search. Finally, it is found that the method is written in public and changed to private.

Conclusion:

Ambiguous HTTP method for action, translated as “ambiguous HTTP operation method”.

There may be no HTTP method written, such as [httpget], [httppost], add to the method.

It may also be caused by writing some methods that should have been private to public.

About error CSC in c# vs: error cs0006: metadata file could not be found

About error CSC in c# vs: error cs0006: metadata file could not be found

Moving a project around in different solutions, the legendary CSC: error cs0006 finally appeared.

When compiling, it is always prompted that an item that does not exist in the reference cannot find the metadata file.

No matter how you delete a project, deleting a reference cannot be generated.

Solution:

Step 1: find your own xxx.csproj project file

Step 2: Rename: add suffix . TXT

Step 3:

Open the csproj project file, find the item containing the reference item in question, and delete the item as a whole.

Error 1 fatal error LNK1220: ‘/PGD‘ requires ‘/LTCG:[PGINSTRUMENT|PGOPTIMIZE]‘ specification

VS2008 compilation of an MFC project pop-up error, looking for a long time, did not find the problem.

  resolvent,

According to the official article:/PGD (specify database for profile guided optimizations) | Microsoft docs

  It says how to solve this problem,

  Setup steps,

1. Open the project property setting (right click on the solution project and select properties),

2. Select link = & gt; Optimization=> Profile Guided Database

3. Select & lt; inherit from parent or project defaults>, Click apply and confirm. Then compile and solve the problem.

[Solved] Error: Another program is already listening on a port that one of our HTTP servers is configured to

Question

    1. Step 1 run
supervisord  -c /etc/supervisor/supervisord.conf

Error

Error: Another program is already listening on a port that one of our HTTP servers is configured to

Solution:

ps -ef | grep supervisord

Turn off the 8079 process

kill -s SIGTERM 8079  

Solution results

supervisord  -c /etc/supervisor/supervisord.conf

No error is the best case, indicating that the process is started successfully

c# Newtonsoft.Json.JsonReaderException: ‘Error reading JArray from JsonReader. Path ‘‘, line 0

When the data queried by c# datatable is converted to JSON object, the following error is reported.

Newtonsoft.Json.JsonReaderException: 'Error reading JArray from JsonReader. Path '', line 0, position 0.

The reason for this problem is that the queried data set directly becomes a string, and then an error is reported when it is empty
solution: add judgment

		if (jsonStr.Length > 0)
                {
                    JArray jArray = JArray.Parse(jsonStr);
                    JProperty Data = new JProperty("Data", jArray);
                    ZzjDataObj.Add(Data);
                }
                else
                {
                    JArray jArray = new JArray();
                    JProperty Data = new JProperty("Data", jArray);
                    ZzjDataObj.Add(Data);
                }