小编Dav*_*idT的帖子

Asp.net Core + IIS 8.5:找不到视图"索引"

在IIS 8.5,Asp.net核心上部署应用程序

3个应用程序,前端,API和登录(在同一站点上);

所有3个都在VS2015的IIS Express中完美地工作;

前端(只有html/AngularJS)和API在IIS 8.5上运行良好

但是对于Login(IdentityServer4):

InvalidOperationException: The view 'Index' was not found. The following locations were searched:
 - ~/UI/Home/Views/Index.cshtml
 - ~/UI/SharedViews/Index.cshtml
Run Code Online (Sandbox Code Playgroud)

我明白'〜/'是指批准;

我的VS2015结构:
Visual Studio 2015项目结构

经测试/检查:

  • Program.cs中的.UseContentRoot(Directory.GetCurrentDirectory())
  • 服务器上IIS_IUSRS用户帐户的所有权限
  • CustomViewLocationExpander:

    public class CustomViewLocationExpander : IViewLocationExpander {
    
       public IEnumerable<string> ExpandViewLocations(ViewLocationExpanderContext context, IEnumerable<string> viewLocations){
           yield return "~/UI/{1}/Views/{0}.cshtml";
           yield return "~/UI/SharedViews/{0}.cshtml";
       }
    
       public void PopulateValues(ViewLocationExpanderContext context)
       {
       }
    }
    
    Run Code Online (Sandbox Code Playgroud)

我可以在'wwwroot'上免费访问所有内容js/images/css

我对这一点毫无头绪.

asp.net view iis-8.5 asp.net-core-mvc

5
推荐指数
1
解决办法
2338
查看次数

“ Stripe .net” Webhook的签名在Stripe-Signature标头中不存在。“

我正在使用NuGet的Stripe.net SDK。我总是得到

Webhook的签名在Stripe-Signature标头中不存在。

StripeEventUtility.ConstructEvent方法中的异常。

[HttpPost]
public void Test([FromBody] JObject incoming)
{
    var stripeEvent = StripeEventUtility.ConstructEvent(incoming.ToString(), Request.Headers["Stripe-Signature"], Constants.STRIPE_LISTENER_KEY);
}
Run Code Online (Sandbox Code Playgroud)

WebHook密钥正确,请求标题包含“ Stripe-Signature”密钥。

我正确地从Webhook测试器实用程序接收了传入的数据(在Visual Studio中使用nGrok)。

secureCompare方法似乎是罪魁祸首=> StripeEventUtility.cs

我试图操纵从Stripe传入的数据(Jobject,字符串,序列化...)。有效负载签名可能会引起一些问题。

有人遇到过同样的问题吗?

c# asp.net webhooks stripe-payments

5
推荐指数
2
解决办法
1181
查看次数