Tag Archives: to configure

[Solved] .NetCore2.2 Upgrade to 3.1 Error: HTTP Error 500.37 – ANCM Failed to Start Within Startup Time

During the upgrade of an old project from netcore2.2 to 3.1, an Ocelot gateway interface program changes the project file

- <TargetFramework>netcoreapp2.2</TargetFramework> 
+ <TargetFramework>netcoreapp3.1</TargetFramework>

Replace the Services.Addmvc() in your project:

services.AddMvc(options => { options.EnableEndpointRouting = false; });
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_3_0);

The method Configure(IApplicationBuilder app, IWebHostEnvironment env) retains the original app.UseMvc();
The compiler passed, but the runtime page reported an error: HTTP Error 500.37 – ANCM Failed to Start Within Startup Time, searched the web for a solution and gave a way to modify the startupTimeLimit value.

<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  <location>
    <system.webServer>
      <aspNetCore xdt:Transform="SetAttributes(startupTimeLimit)" startupTimeLimit="300">
      </aspNetCore>
    </system.webServer>
  </location>
</configuration>

The run result page is directly inaccessible.

 

Solution:

You only need to add a project node
< AspNetCoreHostingModel> OutOfProcess OK.

  <PropertyGroup>
    <TargetFramework>netcoreapp3.1</TargetFramework>
	<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
  </PropertyGroup>

After doing the above, the project runs normally. In addition, the above services.AddMvc() is not the recommended solution.

AddMvc(); comment out app.UseMvc() in the Configure method; then add the following code.

            //app.UseMvc();
            app.UseRouting();//add
            app.UseEndpoints(endpoints =>//add
            {
                endpoints.MapControllers();
            });

 

[Solved] Wepy build watch Error: ERR! Parse WePY config failed. Are you trying to use

The specific error is
[22:54:56] err! Parse WePY config failed. Are you trying to use WePY 2 to build WePY 1 project?
[22:54:56] ERR! Unexpected type: plugins expect a Array

This is because
the version of wepy used in the current project is 1. X, while the version of wepy on the computer is 2, X

NPM install wepy cli – G command installs version 1. X
NPM install @wepy cli – G command installs version 2. X
the difference is@

Solution:

Locate C:\users\XX\appdata\roaming\NPM\node_Modules folder
delete the @wepy folder, and then execute NPM install wepy cli – G

PHP read ini configuration error syntax error, unexpected ‘=’In

Error information

Warning: syntax error, unexpected '=' in src/web/../conf/config.ini on line 12

reason

[start_url]
site1=https://baidu.net/home.php?mod=space&uid=0000&do=thread&view=333333
site2=https://google.com/forum.php?mo=111

Because start_ The URL contains the URL, which must be quoted before PHP will report an error. However, it is not a problem to read it in Python.

terms of settlement

Add the parameter ini when reading_ SCANNER_ RAW

$file = __DIR__ . "/../conf/config.ini";
$config = parse_ini_file($file, true, INI_SCANNER_RAW);

Git command line configuration and configuration file to solve clone error libressl_ connect: SSL_ ERROR_ SYSCALL in connection to github. com:443

Intro

When clone comes from a GitHub warehouse, an error is reported as follows:

leung@wuyujin coderepo % git clone https://github.com/spring-guides/gs-consuming-web-service.git
Cloning into 'gs-consuming-web-service'...
fatal: unable to access 'https://github.com/spring-guides/gs-consuming-web-service.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 
leung@wuyujin coderepo % git clone https://github.com/spring-guides/gs-consuming-web-service.git
Cloning into 'gs-consuming-web-service'...
fatal: unable to access 'https://github.com/spring-guides/gs-consuming-web-service.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 
leung@wuyujin coderepo % 

Core error: libressl_ connect: SSL_ ERROR_ SYSCALL in connection to github. com:443

It’s about SSL authentication.

to configure

The GIT configuration of the current user will be written in the . Gitconfig configuration file in the current user directory (if there is no new touch ~ /. Gitconfig )
take user wuyujin as an example, the full path of GIT configuration file is:
windows: C:
linux: /home/wuyujin /. Gitconfig
MacBook: /users/wuyujin /. Gitconfig

Git can be configured in two ways:
through the command line setting, the corresponding configuration items will be automatically written to the configuration file (premise: you know how to write the command)
directly modify the configuration file (premise: you know the format/rules of the configuration file)

Command required:

git config --global http.sslVerify false
git config --global https.sslVerify false

The effect is that the configuration file is written as follows:

[http]
        sslVerify = false
[https]
        sslVerify = false

In addition, user. Name user. Email and other parameters can be set (not necessary here).

shell


leung@wuyujin coderepo % git config --global http.sslVerify false
leung@wuyujin coderepo % git config --global https.sslVerify false

leung@wuyujin coderepo % more ~/.gitconfig 

[http]
        sslVerify = false
[https]
        sslVerify = false
leung@wuyujin coderepo % 

Once again, clone, success.

Another possibility

When you clone a warehouse, open a new window clone another window. report errors.

One clone at a time will not report an error.

That is: parallel clone -- & gt; Serial clone