All Questions
822
questions
72
votes
11
answers
130k
views
The NPM script 'start' exited without indicating that the Angular CLI was listening for requests
I'm attempting to start an .NET Core 2/Angular 6 SPA. I created an Angular 5 Application using "dotnet new angular" then proceeded to upgrade using this guide from angular.io. Once I ...
49
votes
12
answers
50k
views
Trouble with CORS Policy and .NET Core 3.1
I'm not sure what I'm missing, but can't seem to get my CORS Policy working with .NET Core 3.1 and Angular 8 client-side.
Startup.cs:
public void ConfigureServices(IServiceCollection ...
40
votes
8
answers
15k
views
Securing a SPA by authorization server before first load
I am using the 'new' project templates for angular SPA applications in dotnet core 2.1 as written in the article Use the Angular project template with ASP.NET Core.
But this article doesn't mention ...
27
votes
1
answer
1k
views
dotnet core + Angular Universal + docker => Prerendering failed because of error: Error: Cannot find module
We have a project developed using Dotnet core, Angular Universal. We use the prerender feature of Asp.net Core SPA services. In the local environment, the application works both on Windows, Linux. ...
16
votes
8
answers
12k
views
angular4 document and window are undefined
I am using dot net core with angular 4 and webpack config.
When I am trying to get the window or document in a component or service, I am getting this error:
ReferenceError: document is not defined
...
13
votes
2
answers
13k
views
How does spa.UseAngularCliServer() middleware serve a webpage?
I create a .Net Core 2.1 Angular application with Visual Studio 2017 (ver. 15.7.2)
I wonder how spa.UseAngularCliServer() serves a page in development mode.
In debug mode, there is no "dist" folder ...
13
votes
1
answer
11k
views
How to resolve "error : rzc discover exited with code 150"
My dotnet SDK version is 3.0.100. I am trying to run an angular web application which is wrap with dotnet core framework in macOS. But whenever I try to build the project, It gives me the following ...
12
votes
2
answers
10k
views
Cache busting index.html in a .Net Core Angular 5 website
I am creating a website using .Net core and angular 5. I created the project using the latest .Net core angular template (using dotnet new angular with .Net core 2.1 installed).
This project uses the ...
12
votes
3
answers
10k
views
Data path "" should NOT have additional properties(allowedCommonJsDependencies)
I am using Angular v10 and I have a problem when startingmy .net core / Angular app.
Ive been trying to search for a solution / even upgrading everything to the latest version and it still does not ...
10
votes
3
answers
7k
views
How to properly set up a new Angular 6 project
On my way to learning Angular, I have come across two different ways of creating a new Angular project.
The first is using the Angular CLI command:
ng new app-name-here
The second is using the ...
10
votes
3
answers
7k
views
Store Swagger UI Tokens Permanently after Browser Refresh or Computer Restart
Is there any method to hardcode tokens into Swagger UI permanently in Local computer or Dev Environment ?
We are testing Net Core Apis and also running them through Angular 8: developing, rebuilding,...
10
votes
1
answer
12k
views
Returning single string value from API in angular
I have an API in .Net Core and I am using it in angular 5 app
Below is My API
[Route("api/[controller]")]
public class CommonController : Controller
{
private readonly IConfiguration ...
10
votes
1
answer
12k
views
.Net Core Cookie Authentication Not Working When hosted in IIS
When running the application standalone (just kestrel server running on a specified port in my case :3001) I can login (creating an auth cookie) and use my session without issue to make subsequent ...
10
votes
1
answer
2k
views
UseSpaPrerendering being deprecated from .net core 3.0 onwards, what is the alternative?
UseSpaPrerendering being deprecated from .net core 3.0 onwards, what is the alternative for server-side rendering?
How to migrate to .net core 3.0, If I'm using SSR in 2.1
There is no documentation ...
9
votes
2
answers
7k
views
Angular 4: Date pipe, UTC Time to local time: How to tell Angular the current time zone?
We are using Angular 4 together with a MVC Application written in .net core.
The data is received using a SignalR Service, the hub is written in C#. The database provides a Datetime2(7) Field (T-SQL), ...
8
votes
2
answers
7k
views
Desktop application with .net, angular and electron
I am trying to create an electron desktop app with angular as frontend and .net as backend.
I created a sample angular project in .netcore 2.0 from VS 2017 and followed the steps mentioned here
I'm ...
8
votes
3
answers
5k
views
Angular + NET Core "Http failure response for (unknown url): 0 Unknown Error"
I am trying to send a GET request from my angular app to my .NET Core WebAPI backend. Both are running on localhost. Angular is running on port 4200, WebAPI is running on port 5001. When I make the ...
8
votes
3
answers
5k
views
Error on Typescript instruction: "Breakpoints set but not yet bound" in VS2017
I create a project with "dotnet new angular". When a breakpoint is set on a Typescript instruction, it shows as a open red circle when run. The error message is "The breakpoint will not currently be ...
7
votes
3
answers
8k
views
Configuring Dockerfile for an ASP.NET Core 2.1 Angular Project
I'm a complete newbie on Docker and currently trying to create an ASP.NET Core 2.1 with Angular project. I'm using a Linux Container on Docker for Windows and my IDE is VS2017 community edition.
...
7
votes
6
answers
6k
views
Displaying Custom Server Side Error Message in Angular and .Net Core API
I have some rest API written in C# and the API is called from Angular (I am using version Angular 8). The call is fine and it is working fine. However, in case of any exception, I cannot display the ...
7
votes
2
answers
2k
views
How to decode JWE token in Angular
I have this problem, I created a JWE in .net core using EncryptingCredentials by this way:
var key = Encoding.ASCII.GetBytes(Configuration["Core:JwtSecret"]);
var encryptionkey = Encoding....
7
votes
2
answers
12k
views
Angular 7. NullInjectorError: No provider for HttpClient! Even when app.module has HttpClientModule. How to fix it?
I am using Angular 7, and I am trying to use a service that uses HttpClient to call an API link from my APIController in my .Net Core MVC application. Whenever I tried to test in the cmd window after ...
7
votes
3
answers
7k
views
Base URL in Angular App with .Net core
I have developed few angular app with .NET Core , but every time Angular app is separate and .NET Core API is separate .
Now I am developing Angular app using inbuilt Angular template which include ...
7
votes
1
answer
4k
views
ADFS 2016 - CORS issue for OpenID Connect Discovery Endpoint
I'm trying to set up our Angular SPA + .ASPNET Core API with ADFS (on premises) to get rid of windows authentication. Ultimately the goal would be:
Angular SPA - > Redirects user to ADFS and receives ...
7
votes
3
answers
2k
views
Questions on .NET Core 3.1 & Angular SSR spa.UseSpaPrerendering alternative
I created this post to get some insights from the community.
A little while ago with the release of .NET Core 3.0 the usage of the well-known and widely used spa.UseSpaPrerendering has been marked as ...
7
votes
1
answer
2k
views
How to resolve a false fail when generating angular bundles for SPA in .NET Core?
When I execute the application I'm getting two red fails as shown below. Usually, when there's an error with types or otherwise.
fail: Microsoft.AspNetCore.SpaServices[0]
- Generating browser ...
7
votes
0
answers
1k
views
add Angular SPA into existing .net Core MVC Application
First I have visited many stackover flow question & answers regarding similar questions, such as this article. So I hope no Genius will mark this as broad or No Direct Question, and let someone ...
6
votes
5
answers
44k
views
how to solve The NPM script 'start' exited without indicating that the Angular CLI
i am facing this error please help me this when i publish my app in IIS with angularjs please help me how to solve this error iam using .net core 2.1 and angularjs . In visual studio working fine I ...
6
votes
4
answers
8k
views
Logging out from Identity Server 4 won't log out from Client
I have a similar issue to https://github.com/IdentityServer/IdentityServer4/issues/3153
I'm using the Asp Net Identity and the EF Core combined sample, everything works correctly, database, seeding, ...
6
votes
1
answer
3k
views
Should Angular client store user roles in local storage?
In my Angular app, based on the logged in user, I would like to grant or limit functionality by showing/hiding different menu items or allowing/disallowing certain routes.
Currently on successful ...
6
votes
1
answer
1k
views
Model binding stopped working after migrating from .NET Core 2.2 to 3.0-preview-9
I have an Angular front-end app and an ASP.NET Core back-end app. Everything was fine until I decided to migrate from ASP.NET Core 2.2 to 3.0-preview-9.
For example, I have a DTO class:
public class ...
6
votes
1
answer
5k
views
Since upgrading to Angular 9 Signalr doesn't work
I have an angular application that uses signalR. It is hosted in a .NET core 3.1 application. Since upgrading to Angular 9, signalR no longer works. Everything was working fine in Angular 8. Since ...
6
votes
1
answer
2k
views
XSRF-TOKEN not added to cookies by Angular (Client side) when .NET core API returns a response with an XSRF-TOKEN
I am using Angular10 and .NET core 2.2. I have configured Startup.cs to return a response with an XSRF-TOKEN. The backend is returning it but Angular doesn't pass it on to the browser's cookies.
...
6
votes
2
answers
2k
views
API with dotnet/angular spa app cannot be reached inside docker container but can be reached outside docker container
When I run my .net core3/angular spa application on my local machine everything works. But when I try to put everything in docker-compose while having 2 services one for front-end and one for API only ...
5
votes
1
answer
6k
views
Attach IFormFile to mail without saving the file
Is it possible to add IFormFile files to email attachments in .net core? I am getting files from angular using formdata.
for (let file of this.files) {
this.formData.append("Files", file....
5
votes
2
answers
8k
views
download PDF file using angular 2 and .Net core webapi
I am trying to download PDF (and later word,excel and image) file using angular 2 with .Net core web api. I have pasted some code sample here which downloads the file but when I try to open the ...
5
votes
2
answers
2k
views
The difference between ASP .NET Core with Angular template and Standalone Typescript Angular Project
In Visual Studio (I'm working with Visual Studio 2022) you can create two kinds of Angular projects.
ASP .NET Core with Angular
Standalone Typescript Angular Project
What is the difference between ...
5
votes
4
answers
4k
views
Specify base URL for Angular ClientApp served from ASP.NET Core WebApi
I've created an ASP.NET Core project which serves an Angular app using services.AddSpaStaticFiles(), app.UseSpaStaticFiles(), app.UseSpa(), etc.
But it serves the application directly from http://...
5
votes
1
answer
652
views
Angular 6 - Multiple file input in single form group
I'm setting up an uploader for my Web Application
which consists of 2 file input elements wherein
the first file input will get the image and store it to the list of images variable
and the second ...
5
votes
1
answer
1k
views
NxWorkspace applied to existing .Net Core API with Multiple Angular Clients
I'm doing a spike on the NxWorkspace and its implementation within an existing .Net Core solution where we have multiple Angular applications that could benefit from the NxWorkspace. I understand how ...
5
votes
1
answer
1k
views
Atata selenium web driver can't find controls by id on angular app
I have been struggling to set up a simple automated test on an angular (5) app using atata as the framework which simply wraps the selenium web driver to do its tests. For the life of me I can't get ...
5
votes
1
answer
729
views
Mark component as clientside only in angular universal
Using the ASPNet Angular SPA Template I'm attempting to import NGX-Charts but they don't work with server side pre-rendering. So I'm trying to make them render client side only by importing the NGX ...
5
votes
3
answers
1k
views
Can't call controller method on dotnet core api: no middleware to handle the request
I'm facing an issue with my dotnet core api with angular.
I simply made a login form and a UserController to handle login requests with jwt but whenever i hit the "Login" button and call the ...
5
votes
1
answer
1k
views
Enable SSR for Angular 6 with .NET core 2
I have created a website using Angular 6 as my front-end and .Net Core 2.0 as my back-end. I do not have SSR enabled and so far everything works fine.
Now, I am trying to enable SSR by following the ...
5
votes
1
answer
997
views
External Provider Login in ASP Core, Identity Server 4 and Angular 2
I have an ASP Core App setup with Identity Server 4 that provides token based authentication for an Angular 2 SPA.
To Login, username and password is sent via a Http Post to the "/connect" endpoint ...
4
votes
2
answers
3k
views
Bootstrap NavBar not working in .Net Core Angular SPA template
I've installed the dotnet SPA templates using:
dotnet new --install Microsoft.AspNetCore.SpaTemplates::*
Then I created a new Angular application using:
dotnet new angular
Upon restoring packages, ...
4
votes
2
answers
2k
views
How to POST list of object with Angular form-data to .Net Core Web API
I want to post a list of object to .Net core web API from angular 9 application, Here i am using form-data because i need to post image with data and this is working for me but now a list of object ...
4
votes
2
answers
2k
views
Unable to call gRPC service from Angular client
I am trying to call a gRPC service from Angular application.
If I host the server locally and call it from Anuglar application then it works.
const client = new HelloWorldServiceClient("http:...
4
votes
1
answer
712
views
How to bundle .NetCore API + Angular Front end
I have a public-facing angular frontend which hits a .NetCore back end. The two projects are bundled together using webpack. The problem is, I need Server Side Rendering enabled and Microsoft has ...
4
votes
1
answer
1k
views
SignalR CORS issue with Angular and .NET Core
I know there are a lot of questions and answeres regarding this topic out there, but nothing matched my specific issue.
I am using the following versions
Angular 10.0.14
@aspnet/signalr 1.0.27
ASP....