[英]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.