我在我的 Asp.Net core 应用程序中配置了 Facebook Login(根据https://learn.microsoft.com/en-us/aspnet/core/security/authentication/social/facebook-logins?view=aspnetcore-2.2) - 有效就像 localost 上的魅力一样。
但是,当我在 Azure 上部署应用程序时,出现此错误(单击 facebook 按钮并从 facebook 重定向到 https://.azurewebsites.net/signin-facebook?code=xxx 后:
System.Exception: An error was encountered while handling the remote login. ---> System.Exception: OAuth token endpoint failure: Status: BadRequest;Headers: Vary: Accept-Encoding
WWW-Authenticate: OAuth "Facebook Platform" "redirect_uri_mismatch" "Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field …Run Code Online (Sandbox Code Playgroud) 我使用 Angular 8(前端)+ asp.net core 2.2(Web api)开发了一个 SaaS Web 应用程序,并且我使用下面的代码来允许 asp.net core 上 StartUp.cs 文件的任何来源。在我部署了 azure 应用程序服务后,除了一页之外一切都很好,当我发送发布请求时,我收到以下错误消息:
错误消息返回到前端控制台:从源“ https://xxxxxxxxx.com ”访问“ https://api.xxxxxxxxx.com/api/stageProducts/addProduct ”处的 XMLHttpRequest已被 CORS 策略阻止:无“访问” -Control-Allow-Origin'标头存在于所请求的资源上。
在 Startup.cs 上
app.UseCors(x => x.AllowAnyOrigin()
.AllowAnyHeader()
.AllowAnyMethod());
Run Code Online (Sandbox Code Playgroud)
你能给些建议么?
azure-web-app-service asp.net-core asp.net-core-webapi asp.net-core-2.2
我尝试在非生产部署槽上的 Azure 应用服务上发布时出现以下错误:
2>开始 Web 部署将应用程序/包发布到https://appservicename-preprod.scm.azurewebsites.net/msdeploy.axd?site=appservicename__preprod ...
2> 添加路径 (appservicename-preprod) 的 ACL 2> 添加路径 (appservicename-preprod) 的 ACL
2>更新文件(appservicename-preprod\bin\Antlr3.Runtime.dll)。
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\v16.0\Web\Microsoft.Web.Publishing.targets(4284,5):错误 ERROR_INSUFFICIENT_ACCESS_TO_SITE_FOLDER:Web 部署任务失败的。(无法对指定目录(“D:\home\site\wwwroot\bin\Antlr3.Runtime.dll”)执行操作(“创建文件”
)。如果服务器管理员未授权此操作,则可能会发生这种情况您正在使用的用户凭据。了解更多信息,请访问:http://go.microsoft.com/fwlink/ ?LinkId=221672#ERROR_INSUFFICIENT_ACCESS_TO_SITE_FOLDER。了解更多信息,请访问:https: //go.microsoft.com/fwlink/ ?LinkId=221672 #ERROR_INSUFFICIENT_ACCESS_TO_SITE_FOLDER。)
2>发布部署失败。
我是托管应用服务的订阅的所有者。如果我尝试通过 FTP 访问,我会看到 wwwroot 为空,但从 Cloud Explorer 上的 VS 的 appservicename/Deployment Slots/appservicename-preprod/Files 下,我可以找到这些文件。如果我尝试在 KUDU Zip Push Deploy 上发布 zip 文件,它会在 50% 处返回错误:[object Object] - 调用 ZipDeploy 时出错。
有什么建议么?
我使用 Pulumi CLI 创建了一个新的 Pulumi Typescript 程序,pulumi new azure-typescript并创建了以下内容index.ts(基于新的azure-native 提供程序):
import * as pulumi from "@pulumi/pulumi";\nimport * as azure from "@pulumi/azure-native";\n\nconst resourceGroup = new azure.resources.ResourceGroup("rg-spring-boot", {location: "West Europe"});\n\nconst appServicePlan = new azure.web.AppServicePlan("sp-spring-boot", {\n location: resourceGroup.location,\n resourceGroupName: resourceGroup.name,\n kind: "Linux",\n sku: {\n name: "B1",\n tier: "Basic",\n },\n});\n\n// Image https://hub.docker.com/r/jonashackt/spring-boot-vuejs\nconst imageName = "jonashackt/spring-boot-vuejs:latest";\n\nconst appServiceSpringBoot = new azure.web.WebApp("spring-boot-vuejs-azure", {\n location: resourceGroup.location,\n resourceGroupName: resourceGroup.name,\n serverFarmId: appServicePlan.id,\n siteConfig: {\n linuxFxVersion: `DOCKER|${imageName}`,\n },\n httpsOnly: true,\n});\nRun Code Online (Sandbox Code Playgroud)\n现在运行 apulumi …
azure azure-resource-manager azure-app-service-plans azure-web-app-service pulumi
我开发了一个.net web api。
我将把它托管在 azure 应用程序服务上。如何通过azure应用程序服务配置基于IP的速率限制?
例如,每个 IP 地址每天最多可以向 api 发出 1000 个请求。
azure azure-app-service-plans azure-web-app-service azure-appservice
我的安装的当前结构

我必须在 azure 中重新启动应用程序网关