简体   繁体   English

Net Core WebApi 2.1 和 Angular 2 应用程序 - IIS 部署

[英]Net Core WebApi 2.1 and Angular 2 app - IIS Deployment

WebApi (outofprocess) [VS2017: Publish] and Angular [build --prod] hosted in IIS on same port:80 on IIS 10. Angular build in wwwroot and webapi in api folders with ApplicationPool with IUSR access to hosting file folder. WebApi (outofprocess) [VS2017: Publish] 和 Angular [build --prod] 托管在 IIS 中的同一端口:IIS 10 上的 80。在 wwwroot 和 webapi 中的 Angular 构建在带有 ApplicationPool 的 api 文件夹中,具有对托管文件夹的 IUSR 访问权限。 The index.html loads correctly. index.html 正确加载。

But the following uri: http://website.com/applicationusers/authenticate [two parameters: username and password] returns the following error: "ERROR TypeError: You provided 'undefined' where a stream was expected. You can provide an Observable, Promise, Array, or Iterable."但是以下 uri: http : //website.com/applicationusers/authenticate [两个参数:用户名和密码] 返回以下错误:“错误类型错误:您提供了预期流的‘未定义’。您可以提供一个 Observable, Promise、Array 或 Iterable。”

I noticed that IIS is not starting/loading dotnet.exe as I do not see it in the task manager.我注意到 IIS 没有启动/加载 dotnet.exe,因为我在任务管理器中没有看到它。

But when I run dotnet.exe website.dll in command prompt, the api loads up at localhost:5000 and when I test it in postman using the following: http://localhost:5000/api/applicationusers/authenticate I get a response.但是当我在命令提示符下运行 dotnet.exe website.dll 时,api 在 localhost:5000 加载,当我使用以下命令在邮递员中测试它时: http://localhost:5000/api/applicationusers/authenticate我得到一个响应.

Is there something I am missing that's causing the issue IIS... appreciate any ideas...有什么我遗漏的东西导致了 IIS 问题......感谢任何想法......

当您尝试从 Angular 应用程序调用 REST 端点进行身份验证时,似乎会生成此错误。尝试在从 Angular 应用程序调用其余端点时添加 promise 或 observable。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 EPERM:不允许操作 - 带有后端 .Net Core 2.1 的 IIS 上的 NPM Angular 7 - EPERM: Operation not permitted - NPM Angular 7 on IIS with backend .Net Core 2.1 在本地 iis 上提供 .net core 和 angular 5 应用程序 - serve .net core and angular 5 app on local iis 如何向.NET Core 2.1 Angular应用添加用户身份验证? - How to add user authentication to .NET Core 2.1 Angular app? .NET 核心 Angular 应用程序在 IIS 上运行 - 不是 IIS Express - .NET Core Angular app running on IIS - NOT IIS Express ASP.NET Core2 WebAPI和角度应用程序未在页面中呈现 - asp.net core2 webapi and angular app not rendering in the page ngularx上带有Asp.Net Core 2.1的Angular5应用程序部署问题 - Angular5 with Asp.Net Core 2.1 application deployment problem on nginx Hosting.Net Core app 和 IIS 下的 Angular app 默认网站 - Hosting .Net Core app and Angular app under IIS Default website .NET Core 中 WebAPI 的 Angular UI,但主要目的仍然是 WebAPI,而不是前端应用程序 - Angular UI for a WebAPI in .NET Core while still the primary purpose is a WebAPI, not a frontend App 将现有的asp.net core 2.1角度应用程序转换为Angular 6和Angular CLI 6 - Convert existing asp.net core 2.1 angular app to Angular 6 and Angular CLI 6 部署到IIS的Angular 6 .net core 2.1.1应用程序中的500错误 - 500 Error in Angular 6 .net core 2.1.1 app deployed to IIS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM