angular - 角度 9 + .net 核心 3 net::ERR_CONNECTION_REFUSED
问题描述
我,尝试编写一个简单的 CRUD 应用程序,并收到错误:net::ERR_CONNECTION_REFUSED 尝试调用服务器:
getPersons(): Observable<Array<Person>> {
return this.httpService.get<Array<Person>>(this.serverUrl + '/GetAllPersons',{headers: this.Headers});
Headers: any = { withCredentials: true, responseType: 'json', headers: { 'Content-Type': 'application/json' } };
服务器中的断点不会停止在:
[HttpGet]
[Route("GetAllPersons")]
public IEnumerable<Person> GetAllPersons()
{
try
{
IEnumerable<Person> personArray = this.GetAllRecordsFromDB();
return personArray;
}
catch (Exception)
{
throw new Exception();
}
}
谢谢
解决方案
推荐阅读
- angular - 使用 Angular 将 cdkDrag 动态分配给 div
- slurm - SLURM - 连接 slurm 流套接字时出错 - 连接被拒绝
- synchronization - Vulkan - 如何表明在没有同步的情况下执行两个命令会产生损坏的数据?
- vulkan - VkDescriptorBufferInfo 范围为 x,大于此设备的 maxStorageBufferRange
- ios - 如何在 Swift 中直接将 Dictionary 转换为 Codable 实例?
- javascript - 使用 Webpack 调试 JavaScript
- jquery - ChartJS 版本 3 如何向饼图工具提示添加百分比
- phantomjs - 使用 phantomjs 从 post call html 响应中获取 svg
- package - 将清单文件上传到 Office 商店的问题
- gitversion - 将版本传递到分支