小编Fah*_*san的帖子

'IServiceCollection' 不包含 'AddAWSService' 的定义,并且在 asp.net core 2.2 中没有可访问的扩展方法 'AddAWSService' 错误?

Aws SQS我正在项目中设置asp.net core 2.22。我正在我的文件中添加 aws 配置行Program.cs。这是我的Program.cs文件。

using Amazon.SQS;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;

namespace analytics
{
    public class Startup
    {
        public Startup(IConfiguration configuration)
        {
            Configuration = configuration;
        }

        public IConfiguration Configuration { get; set;}

        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection …
Run Code Online (Sandbox Code Playgroud)

c# amazon-sqs amazon-web-services asp.net-core

4
推荐指数
1
解决办法
7505
查看次数

为什么 api 响应正文未显示在邮递员应用程序生成的文档中?

我正在不断地测试apisusng postman,然后使用app生成 api 文档postman

但问题是文档没有显示api response我在postman console. 这是我大部分时间收到的回复apis

在此处输入图片说明

我怎样才能在我的 api 文档中获得响应正文?

api api-doc postman

3
推荐指数
1
解决办法
2800
查看次数

如何访问 Angular 7 中路由保护子句中的路由参数?

我有一个 Angular 7 应用程序,其中有一条像这样的路线

{ path : 'forgot-password/:resetHash/:email', 
  component : ForgotPasswordComponent, 
  canActivate : [ForgotPasswordPageGuard]},
Run Code Online (Sandbox Code Playgroud)

现在我尝试访问该路由paramsroute-guard但我没有在防护中获取路由参数。这是我的forgotpassword.route.guard.ts

constructor(private _utilityService: UtilitySerivce, private _dataService: DataService, private _const: Constants, private _router: ActivatedRouteSnapshot) {
}

canActivate = (): boolean => {
    console.log('in link expiry guard')
    let userEmail = this._router.paramMap.get('email');
    let isAllow = false;

    console.log('params : ', userEmail)
    userEmail = this._utilityService.decryptMsgByCryptoJs(userEmail);
    console.log('user email : ', userEmail)
    this._dataService.post(this._const.userResetPasswordLinkExpiry, { email: userEmail }).subscribe(resp => {
        if (resp.success) {
            isAllow = true;
        } else { …
Run Code Online (Sandbox Code Playgroud)

typescript angular-routing angular angular-route-guards

2
推荐指数
1
解决办法
3197
查看次数