访问 API 层
Accessing API layer
我正在尝试访问一个 api 功能,例如我想访问登录功能,但出现以下错误:
"message": "An internal error occurred during your request!",
查看日志文件,有如下日志:
ERROR 2017-10-09 17:01:37,296 [11 ]
nHandling.AbpApiExceptionFilterAttribute - Processing of the HTTP
request resulted in an exception. Please see the HTTP response
returned by the 'Response' property of this exception for details.
System.Web.Http.HttpResponseException: Processing of the HTTP request
resulted in an exception. Please see the HTTP response returned by the
'Response' property of this exception for details.
我正在使用 Postman 进行测试。我的 URL 是 https://localhost:44347/api/Account/Authenticate。我的 header 有 Context-Type 作为 "application/json"
而在我的 Body 我有 loginModel 格式为
{
"tenancyName": "tenantname",
"userNameOrEmailAddress": "admin",
"password": "123qwe"
}
我不确定如何继续进行此操作。有什么想法吗?我也安装了 swagger。
我正在使用 MVC + AngularJS 模板。我没有改变任何东西,只是默认项目。
感谢帮助。
我用 Fiddler 测试过,它工作正常。
注意:请确保您正确键入 Content-Type,在您键入 Context-Type
的问题上
提出POST请求!你可能错过了这个。
我正在尝试访问一个 api 功能,例如我想访问登录功能,但出现以下错误:
"message": "An internal error occurred during your request!",
查看日志文件,有如下日志:
ERROR 2017-10-09 17:01:37,296 [11 ] nHandling.AbpApiExceptionFilterAttribute - Processing of the HTTP request resulted in an exception. Please see the HTTP response returned by the 'Response' property of this exception for details. System.Web.Http.HttpResponseException: Processing of the HTTP request resulted in an exception. Please see the HTTP response returned by the 'Response' property of this exception for details.
我正在使用 Postman 进行测试。我的 URL 是 https://localhost:44347/api/Account/Authenticate。我的 header 有 Context-Type 作为 "application/json"
而在我的 Body 我有 loginModel 格式为
{
"tenancyName": "tenantname",
"userNameOrEmailAddress": "admin",
"password": "123qwe"
}
我不确定如何继续进行此操作。有什么想法吗?我也安装了 swagger。
我正在使用 MVC + AngularJS 模板。我没有改变任何东西,只是默认项目。
感谢帮助。
我用 Fiddler 测试过,它工作正常。
注意:请确保您正确键入 Content-Type,在您键入 Context-Type
的问题上提出POST请求!你可能错过了这个。