简体   繁体   English

权限错误 C:\WINDOWS\system32\config\systemprofile\.EasyOCR in IIS app which uses Python EXE

[英]Permission Error C:\WINDOWS\system32\config\systemprofile\.EasyOCR in IIS app which uses Python EXE

I am not sure from where this issue occurs.我不确定这个问题是从哪里发生的。

I have a python script which uses EasyOCR and has been compiled to an exe.我有一个 python 脚本,它使用 EasyOCR 并已编译为 exe。 I am using this exe as a process in my asp.NET C# web api to make some OCR validation.我在我的 asp.NET C# web api 中使用这个 exe 作为一个进程来进行一些 OCR 验证。 When running the exe from command line or running via API from visual studio there is no issue but after I added this API to my local IIS and send a POST request to my API I got the following response from exe.从命令行运行 exe 或从 visual studio 通过 API 运行时没有问题,但是在我将此 API 添加到本地 IIS 并将 POST 请求发送到我的 API 后,我从 exe 收到了以下响应。

[WinError 5] Access is denied: 'C:\WINDOWS\system32\config\systemprofile\.EasyOCR' [WinError 5] 访问被拒绝:'C:\WINDOWS\system32\config\systemprofile\.EasyOCR'

When I checked the directory there is no folder like this, I tried to create this folder in there but got the same response.当我检查目录时没有这样的文件夹,我试图在那里创建这个文件夹但得到了相同的响应。

Any help would be appreciated.任何帮助,将不胜感激。

Regards问候

According to this error message, it is usually because the current permissions are insufficient.根据这个错误提示,一般是因为当前权限不足。 You can try to execute the program as administrator, or as already mentioned, give permissions to the corresponding application pool.您可以尝试以管理员身份执行该程序,或者如前所述,将权限授予相应的应用程序池。 Like this:像这样:

在此处输入图像描述

Or you could try deploy your site on other on other disk (not the system disk).或者您可以尝试将您的站点部署到其他磁盘(不是系统磁盘)上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误系统调用生成 C:\\Windows\\system32\\cmd.exe - error syscall spawn C:\Windows\system32\cmd.exe 无法打开自我C:\\ Windows \\ system32 \\ file.exe或存档C:\\ Windows \\ system32 \\ file.pkg - Cannot open self C:\Windows\system32\file.exe or archive C:\Windows\system32\file.pkg 在64位Windows上的C:\\ Windows \\ System32中的py2exe - py2exe in C:\Windows\System32 on 64-bit Windows 权限被拒绝访问r“C:\\ Windows \\ System32 \\ Drivers \\ etc \\ hosts” - Permission denied to access r”C:\Windows\System32\Drivers\etc\hosts” 在 python 中执行 os.rmdir("C:\Windows\System32") 会发生什么? - What will happen on executing os.rmdir("C:\Windows\System32") in python? PermissionError: [Errno 13] Permission denied: 'C:/Windows/System32/drivers/etc/host 请帮忙解决这个错误 - PermissionError: [Errno 13] Permission denied: 'C:/Windows/System32/drivers/etc/host please help to solve this erorr Python无法在C:\\ Windows \\ System32 \\ oobe \\ Info \\ backgrounds中打开文件 - Python can't open a file in C:\Windows\System32\oobe\Info\backgrounds 缺少'C:\\ Windows \\ system32 \\ python27.zip'文件 - Missing 'C:\Windows\system32\python27.zip' file 如何使用python在c:/windows/system32文件夹中创建文件 - How to create a file in c:/windows/system32 folder using python dll与c:\\ windows \\ system32不同的目录 - dll in a different directory than c:\windows\system32
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM