IIS 访问虚拟目录文件 报错: 401 - Unauthorized: Access is denied due to invalid credentials.

部署运行你感兴趣的模型镜像

IIS 添加了虚拟目录,但是通过url访问文件时 报401无权限,下面是排查步骤。

一,请检查虚拟目录的凭据是否设置正确。

注意的是 这个凭据需要 【站点的服务器】与【虚拟目录的服务器】 的凭据+密码都是一致的才有用。

二,检查虚拟目录的访问权限
请确保配置的凭据有权限访问这个虚拟目录文件夹。


 

三,检查站点的 web.config 文件是否有 modules 的配置

如果有的话 需要把 runAllManagedModulesForAllRequests="true" 这个属性删掉才能正常访问虚拟目录。

这个是我目前发现不能访问虚拟目录时的解决步骤。可能还有其他问题导致不能访问,欢迎补充。

您可能感兴趣的与本文相关的镜像

Llama Factory

Llama Factory

模型微调
LLama-Factory

LLaMA Factory 是一个简单易用且高效的大型语言模型(Large Language Model)训练与微调平台。通过 LLaMA Factory,可以在无需编写任何代码的前提下,在本地完成上百种预训练模型的微调

[root@yfw szrengjing.com]# curl -v -X POST \ > http://localhost:9090/plugins/restapi/v1/users \ > -H "Authorization: Bearer chatapi_2025_secure!" \ > -H "Content-Type: application/json" \ > -d '{"username":"testlocal","password":"123456","name":"Test","email":"t@t.com"}' Note: Unnecessary use of -X or --request, POST is already inferred. * Trying ::1... * TCP_NODELAY set * Connected to localhost (::1) port 9090 (#0) > POST /plugins/restapi/v1/users HTTP/1.1 > Host: localhost:9090 > User-Agent: curl/7.61.1 > Accept: */* > Authorization: Bearer chatapi_2025_secure! > Content-Type: application/json > Content-Length: 76 > * upload completely sent off: 76 out of 76 bytes < HTTP/1.1 401 Unauthorized < Date: Sun, 16 Nov 2025 08:13:23 GMT < Content-Security-Policy: default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; base-uri 'self'; form-action 'self'; img-src 'self' igniterealtime.org; < X-Frame-Options: SAMEORIGIN < Set-Cookie: JSESSIONID=node017ufxspxvb0btszib7gs0ml9i53.node0; Path=/; HttpOnly < Access-Control-Allow-Origin: * < Access-Control-Allow-Headers: origin, content-type, accept, authorization < Access-Control-Allow-Credentials: true < Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS, HEAD < Cache-Control: must-revalidate,no-cache,no-store < Content-Type: text/html;charset=iso-8859-1 < Content-Length: 402 < <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/> <title>Error 401 Unauthorized</title> </head> <body><h2>HTTP ERROR 401 Unauthorized</h2> <table> <tr><th>URI:</th><td>/plugins/restapi/v1/users</td></tr> <tr><th>STATUS:</th><td>401</td></tr> <tr><th>MESSAGE:</th><td>Unauthorized</td></tr> <tr><th>SERVLET:</th><td>PluginServlet</td></tr> </table> </body> </html> * Connection #0 to host localhost left intact [root@yfw szrengjing.com]#
最新发布
11-17
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值