我的 API 使用不记名令牌进行身份验证,控制器使用 Authorize 属性。
每当我使用邮递员查询 API 时。由于某种原因,它会在每个请求中发送一个 ARRAffinity cookie 以及不记名令牌。
但是,当我在没有 cookie 的情况下使用 fiddler 调用相同的 API 端点时。它随机失败并返回 401。是的,一些请求会随机获得 200 成功,而另一些则会失败并返回 401。
但是,当我通过 fidler 传递 ARRAffinity cookie 时。它可以正常工作,不会出现任何故障。
有没有办法阻止 Web Api 或 azure 生成 ARRAffinity cookie。我只想使用不记名而不是cookie。
我有两个 asp.net core 应用程序,它们都通过 github 集成直接部署到各自的 azure 网站。一个站点有自定义域,而另一个站点则没有。
\n\n当最初在两个站点上配置集成时,它们最初失败并出现与空间相关的警告。所以我将网站扩展为基本网站(1 个小网站)。我不知道\n为什么我需要这样做,因为这两个应用程序都远远小于 1G,我相信共享网络应用程序有一个限制。(我本地硬盘上的两个站点分别是117M和120M)
\n\n因此,我有两个网站共享相同的服务计划,即每月 \xc2\xa341,而不是让一个网站免费,另一个网站每月共享 \xc2\xa37(因为它需要自定义域) )
\n\n如果我尝试缩小服务计划,则会出现以下错误。(按预期进行编辑)
\n\n{\n"authorization": null,\n"caller": null,\n"channels": null,\n"claims": {},\n"correlationId": null,\n"description": "Failed to update App Service plan defaultserviceplan: {\\"Code\\":\\"Conflict\\",\\"Message\\":\\"Storage usage quota exceeded. Cannot update or delete a server farm.\\",\\"Target\\":null,\\"Details\\":[{\\"Message\\":\\"Storage usage quota exceeded. Cannot update or delete a server farm.\\"},{\\"Code\\":\\"Conflict\\"},{\\"ErrorEntity\\":{\\"ExtendedCode\\":\\"11006\\",\\"MessageTemplate\\":\\"Storage usage quota exceeded. Cannot update or delete a server farm.\\",\\"Parameters\\":[],\\"InnerErrors\\":[],\\"Code\\":\\"Conflict\\",\\"Message\\":\\"Storage usage quota exceeded. Cannot update or delete a server farm.\\"}}],\\"Innererror\\":null}",\n"eventDataId": null,\n"eventName": null,\n"eventSource": null,\n"category": null,\n"eventTimestamp": "Wed Jun …Run Code Online (Sandbox Code Playgroud) 我已经使用 Dropbox 在 azure 上使用 MySQL 部署了我的 nodeJs RESTFull API。在控制台上,我看到了应用程序开始列出并且数据库已连接的日志。因此,这些行来自我使用 console.log() 记录的代码;当我请求我的 API/资源时,我从服务器收到 500 ERROR 消息。我搜索了很多来解决这个问题,但我无法解决这个问题。
我正在使用来自 git hub web.config 的web.config 示例
最后一件事是从 azure 记录的
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>IIS Detailed Error - 500.1001 - Internal Server Error</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana,Arial,Helvetica,sans-serif;}
code{margin:0;color:#006600;font-size:1.1em;font-weight:bold;}
.config_source code{font-size:.8em;color:#000000;}
pre{margin:0;font-size:1.4em;word-wrap:break-word;}
ul,ol{margin:10px 0 10px 5px;}
ul.first,ol.first{margin-top:5px;}
fieldset{padding:0 15px 10px 15px;word-break:break-all;}
.summary-container fieldset{padding-bottom:5px;margin-top:4px;}
legend.no-expand-all{padding:2px 15px 4px 10px;margin:0 0 0 -12px;}
legend{color:#333333;;margin:4px 0 8px -12px;_margin-top:0px; …Run Code Online (Sandbox Code Playgroud) 我无法找到从 azure Web 应用/应用服务中删除主机名的方法。
我尝试使用以下方法过滤我们不需要的主机,但没有删除任何内容。
Set-AzureWebsite -Name "<<name>>" -HostNames $hosts
Run Code Online (Sandbox Code Playgroud)
和
Set-AzureRmWebApp -Name "<<name>>" -ResourceGroupName "<<name>>" -HostNames $hosts
Run Code Online (Sandbox Code Playgroud)
我有大约 200 个主机需要删除,但是,我似乎找不到自动执行此操作的方法。
我目前正在使用 Visual Studio 2017 并尝试将调试器附加到我的 Web 应用程序。我已经部署了我的应用程序,并通过 VS 附加了调试器。我还在 azure 门户上确保远程调试器已打开。我还访问了https://xxxxxxxx.scm.azurewebsites.net/并检查了流程并且w3wp可用。从无法在 VS2015 中开始调试 Azure Web 应用程序和远程调试 - Web App Azure它向我表明它可能是一个端口被阻止。所以我继续设置我的防火墙出站以允许来自UDP 3702 TCP 4020 TCP 40214022 和端口的连接 ,但问题仍然存在。我无法连接到我的连接目标。
我试着xxxxxxxxx.azurewebsites.net:4022和xxxxxxxxx.azurewebsites.net
我完全没有来自网络的想法和建议。如果其他人有提示,那就太好了。
我们正在使用 Terraform 将 Web 应用程序部署到 Azure,并希望不再使用 web.config 进行配置设置。我相信我们可以在部署时使用资源app_settings参数来实现这些azurerm_app_service,但尝试找到如何正确格式化它的示例。
我使用过 Nodejs 并尝试截取给定 URL 的屏幕截图。它在本地运行完美,但部署到 Azure 后在创建 puppeteer 时出现问题。
代码
exports.getScreenShot = async function (req, res) {
const requesturl = req.param('url');
if (!requesturl) {
return res.send(400, 'Missing url');
}
const parsedUrl = url.parse(requesturl);
if (!parsedUrl.protocol) {
return res.send(400, 'Invalid url, missing protocol');
}
if (!parsedUrl.hostname) {
return res.send(400, 'Invalid url, missing hostname');
}
const options = {
'width': req.param('width'),
'height': req.param('height'),
'delay': req.param('delay'),
'userAgent': req.param('userAgent'),
'full': (req.param('full') === 'true')
};
options.width = options.width || 1024;
options.height = options.height || 768; …Run Code Online (Sandbox Code Playgroud) screenshot node.js azure-web-app-service puppeteer takesscreenshot
我们正在将 React Web App 从 Windows 应用服务迁移到 Linux 应用服务。我们有一个自定义 web.config 来处理路由,这样当用户手动访问我们的路由之一时,他们就不会遇到 404。此修复不适用于 Linux 应用服务。
我们遇到了 404,我们需要它来工作,因为我们有用户应该能够到达的自定义路由。如果他们路由到默认的 index.html,该站点就可以工作,但自定义路由则不行。我们已尝试创建新的 Windows 应用服务,迁移工作正常。关于如何让自定义路由在 Linux 应用服务中工作的任何想法?
这是我们当前使用的 web.config:
<?xml version="1.0"?>
<configuration>
<system.webServer>
<staticContent>
<remove fileExtension=".woff" />
<remove fileExtension=".woff2" />
<remove fileExtension=".otf" />
<remove fileExtension=".ttf" />
<remove fileExtension=".eot" />
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
<mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
<mimeMap fileExtension=".otf" mimeType="application/font-otf" />
<mimeMap fileExtension=".ttf" mimeType="application/font-ttf" />
<mimeMap fileExtension=".eot" mimeType="application/font-eot" />
<clientCache cacheControlMode="DisableCache" />
</staticContent>
<rewrite>
<rules>
<rule name="React Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" …Run Code Online (Sandbox Code Playgroud) 我有一个在 Azure Web 应用程序上运行的应用程序,该应用程序跨多个实例横向扩展。因为我们是自托管 SignalR(我知道,我知道...),所以我们必须设置 ARR Affinity 令牌。
我不确定在以下情况下如何使用 ARR Affinity 设置请求路由:
我只是自己测试一下,但我无法弄清楚如何可靠地执行测试,因为据我所知,没有确定的方法来查看您所在的服务器实例。对这些问题的任何答案或有关如何执行此测试的建议表示赞赏。
我遇到了这个错误,我看到很多人在 GitHub 上使用 Azure 的自动部署管道功能时也遇到了同样的错误。我已经通过直接在 Azure 门户上的部署管道将我的 GitHub 存储库链接到我的应用服务。一切似乎都运行良好,但在 GitHub Actions 页面上,我看到了以下错误:
Failed to fetch credentials from Publish Profile. For more details on how to set publish profile credentials refer https://aka.ms/create-secrets-for-GitHub-workflows
Run Code Online (Sandbox Code Playgroud)
和
Deployment Failed with Error: Error: Publish profile does not contain kudu URL
Run Code Online (Sandbox Code Playgroud)
因此,在这里我将正式发布此错误的解决方案,供其他遇到此问题的人使用。
azure ×9
asp.net ×2
node.js ×2
kudu ×1
powershell ×1
puppeteer ×1
react-router ×1
reactjs ×1
screenshot ×1