Category Archives: Windows

IIS publishing Net core 3.1 error [How to Solve]

First, confirm that IIS is installed successfully

The above results are shown in the following figure. Turn on or turn off the windows function to turn on the IIS service

3. A file is required for IIS to interface with the core

.Net core Windows Server Hosting , the latest version is dotnet-hosting-2.2.3-win.exe, (click download)

After installation

Change configuration

After that, it will be published, copied and pasted to

Focus, if it fails, open the log file to see the reason

1. My problem is that the XML file is missing. Copy the XML file in the code to the publishing results folder

2. Open the config file and change stdoutlogenabled = “true”

 

[Solved] The printer cannot be connected after Microsoft Win10 patch kb5005565 is updated (0x0000011b)

Win10 latest kb5005565 patch. The patch update brings a bug, mainly the problem of LAN sharing. This bug will affect the access of LAN printers and cause the error code 0x0000011b

 Solution: Open Settings, Applications and Features, Programs and Features, View Installed Updates, find the update corresponding to KB50055xx, right-click to uninstall, and restart your computer after the uninstallation is complete.

  1. Press WIN+R on your keyboard to open the Run window.

  2, type appwiz.cpl and press enter to open.

  3、Click "View Installed Updates" on the left side of the window.

  4. Under the list, find the update you need to uninstall, right click the patch name and select "Uninstall".

  5、A pop-up prompt will appear to determine the uninstallation, click "Yes". Start the uninstallation process, and restart your computer after it is finished.

Windows 10 Run Docker Desktop Error: WSL 2 installation is incomplete

Error reporting description

When we install docker desktop, he will ask us whether we need to use wsl2 (Windows based Linux subsystem). If it is not applicable, we will use Hyper-V virtual machine to run. However, compared with virtual machine, the subsystem has better performance. After we choose to use wsl2, and we also confirm that the windows function shown in the figure below is turned on

After installing docker desktop for windows10 operating system, the following prompt window appears after startup: WSL 2 installation is incomplete

Error reporting solution

According to the error prompt, it is speculated that the wsl2 version we use is old and needs to be updated manually. According to the prompt, we go to Microsoft’s official website to download the latest version of wsl2 and open it normally after installation.

How to Share Files Between Linux and windows

1. Create users, directories and installation packages
yum install samba smbfs
useradd -s /sbin/nologin yunwei
smbpasswd -a yunwei
mkdir -p /date/yunwei
chmod 777 /data/yunwei
2. Configuration file
cp /etc/samba/smb.conf /etc/samba/smb.confbak
vi /etc/samba/smb.conf
[homes]
comment = Home Directories
valid users = %S
browseable = No
writable = yes
create mode = 0664
directory mode = 0775

[yunwei]
comment = yunwei
path = /data/yunwei
public = no
valid users = @yunwei
write list = yunwei
printable = no

3. Start the service
Red Hat Enterprise Linux Server release 6.4 (Santiago)
/etc/init.d/smb start
service smb reload
linux 7
systemctl start smb
systemctl status smb
4. Test the use of
windows => run =>
\\ip\yunwei

[Solved] C# Windows service reports an error when the service is started. The service did not respond to the start or control request in time, error code 1053

There are many reasons:

1. There are bugs in the service program, so write your own test methods to troubleshoot.

2. The service program uses the System.Configuration.ConfigurationManager class library to try to read the configuration items under app.config, etc.

After installing the service, the path found by System.Configuration.ConfigurationManager is no longer the path where the original exe is located, so it cannot be used;

You can also write xml or Json configuration file absolute path to read.

3. The OnStart method takes too long to respond to the logic. It is recommended to make asynchronous calls, such as opening a child thread or using a timer. For example:

 1 System.Timers.Timer _timer = new System.Timers.Timer();
 2 protected override void OnStart(string[] args)
 3         {
 4             try
 5             {
 6                 int _interval = 1000 * 60 * interval;
 7                 _timer.Interval = _interval;
 8                 _timer.AutoReset = true;
 9                 _timer.Elapsed += new System.Timers.ElapsedEventHandler(Time_Elapsed);
10                 _timer.Enabled = true;
11                 WriteLog.SaveInfoLog("服务已启动");
12             }
13             catch (Exception ex)
14             {
15                 WriteLog.SaveExceptionLog(ex.Message);
16             }
17 
18         }
19 private void Time_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
20         {
21             try
22             {
23                 if (!isRun)
 24                  {
 25                      // Call business method 
26                  }
 27              }
 28              catch (Exception ex)
 29              {
 30                  WriteLog.SaveExceptionLog( " Error: " + ex.Message);
 31              }
 32          }

4. Check the .Net FrameWork version.

5. Check whether the service name in the serviceInstaller control property of ProjectInstaller is consistent with the started service name.

[Solved] Windows Variable packing error: Property ‘XXX‘ does not exist on type ‘Window‘

Scenario:

In the h5 of the app, the app injected a global window object to interact with the page in the webview, and an error was reported when it was packaged.

Solution:

method one:

(window as any).xxx

Change window.jigsaw.init(()); directly in the component to (window as any).jigsaw.init(());

Method Two:

declare global {
interface Window {xxx: any;}
}

window.xxx = window.xxx|| {};
Method three:

interface MyWindow extends Window {
xxx(): void;
}

declare var window: MyWindow;

[Solved] Python celery Run on Windows Error: (ModuleNotFoundError: No module named ‘grp’)

This article mainly introduces the reason and solution of the error report when using celery to run on Windows in Python: mport grp ModuleNotFoundError: No module named’grp’.

Run the command:

celery -A tasks worker --loglevel=INFO

Error message:

File "d:\cjavapy\celery-demo\venv\lib\site-packages\celery\platforms.py", 
line 9, in import grp ModuleNotFoundError: No module named 'grp'

problem causes:

Using the PyPi package django-celery-beat, it will install the latest version of the required package celery instead of installing a compatible version (when I publish this content, that is, May 25, 2021, at this time v5.1.0), it seems to be compatible with django-celery-beatVersion 2.2.0 (the latest) and Windows operating system have compatibility issues.

Related instructions : https://docs.celeryproject.org/en/stable/changelog.html#id2

Solution:

pip uninstall celery
pip install celery==5.0.5

The Chrome browser cannot remember the password and does not prompt to save the password win10 [How to Solve]

The Chrome browser cannot remember the password and does not prompt to save the password. Solution (win10): Go
to the C:\Users\your username\AppData\Local\Google\Chrome\User Data\Default directory to
delete Login Data and Login Data-journal Two files, restart the browser

[Solved] Windows Django Error: A server error occurred. Please contact the administrator.

This is because the get function is used in the view function to get data that does not exist
For example, there is no data in the database with the name hello1, use the following statement to access
message = Message.objects.get(name='hello1')

will report an error message = Message.objects.get(name='boddy1')

Solution.
 See the following figure:

Click the link in the box above to automatically enter line 323 of the debug.py file, and modify line 321 as shown in the figure below:

Run again:

In this case, the error message is normal, the query data does not exist

This problem does not exist in MAC and Linux, where the encoding has been set to utf8 by default.

Missing processing of api-ms-win-crt-process – | 1-1-0.dll [How to Solve]

After installing Python 3.6, I found that the prompt api-ms-win-crt-process-l1-1-0.dll is missing

The Windows Universal C Runtime library (Universal C Runtime) is installed to the system via Windows Update update with the number KB2999226 (10.0.10240.16390) or KB3118401 (10.0.10586.9) with the following components.

api-ms-win-core-file-l1-2-0.dll

api-ms-win-core-file-l2-1-0.dll

api-ms-win-core-localization-l1-2-0.dll

api-ms-win-core-processthreads-l1-1-1.dll

api-ms-win-core-synch-l1-2-0.dll

api-ms-win-core-timezone-l1-1-0.dll

api-ms-win-core-xstate-l2-1-0.dll

api-ms-win-crt-conio-l1-1-0.dll

api-ms-win-crt-convert-l1-1-0.dll

api-ms-win-crt-environment-l1-1-0.dll

api-ms-win-crt-filesystem-l1-1-0.dll

api-ms-win-crt-heap-l1-1-0.dll

api-ms-win-crt-locale-l1-1-0.dll

api-ms-win-crt-math-l1-1-0.dll

api-ms-win-crt-multibyte-l1-1-0.dll

api-ms-win-crt-private-l1-1-0.dll

api-ms-win-crt-process-l1-1-0.dll

api-ms-win-crt-runtime-l1-1-0.dll

api-ms-win-crt-stdio-l1-1-0.dll

api-ms-win-crt-string-l1-1-0.dll

api-ms-win-crt-time-l1-1-0.dll

api-ms-win-crt-utility-l1-1-0.dll

api-ms-win-eventing-provider-l1-1-0.dll((KB3118401 does not contain this file)

ucrtbase.dll

The corresponding .dll file cannot be found in C:\window\system\ or C:\window\SysWOW64\. There are some individual .dll files available for download on the Internet, but none of them work after trying. The correct way is to download the corresponding update from micorsoft official website and then install it. After reboot OK.

KB2999226, KB3118401 update download.

KB2999226 Microsoft download link https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows

KB3118401 Microsoft download link https://support.microsoft.com/en-us/help/3118401/update-for-universal-c-runtime-in-windows