Questions tagged asp.net-core

Explore the latest questions and answers asked by our top developers.

How to keep startdate and enddate same on selecting a single date in datepicker?

I am implementing a single datepicker where I select only one date and pass the same date for both start and end date. I get an error like invalid date, cannot convert from string to date. Pls provide me a solution to correct this error. Is there any way to correct this error without making […]

Failed to start the connection: Error: WebSocket failed to connect

Error: Failed to start the connection: Error: WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are […]

By M K
Published
Categorized as angular, asp.net-core, signalr Tagged , ,

How to open a report window the second time on click on same selected date in Mat-datepicker?

When I select a date(2nd Dec) in mat-datepicker,it opens a report window for that particular date.Once I close that report window and again click on datepicker it has the same date(2nd Dec) selected and when I click on that the report window doesn’t open the second time.So pls let me know how to open the […]

How to use HttpResponseMessage that accepts Status, Data and Total and pass on to Angular

I am trying to consume Web API method in Angular 6 public async Task<HttpResponseMessage> GetUsers(string userId, [FromHeader] string authorization) { HttpResponseMessage httpResponseMessage = new HttpResponseMessage(); try { if (response.StatusCode == ApiStatusCode.Ok) { response.ResponseObject = await _assetLogic.GetUsers(userId, body, authorization); httpResponseMessage.StatusCode = System.Net.HttpStatusCode.OK; httpResponseMessage.Content = new ObjectContent<UserView[]>(response.ResponseObject, new JsonMediaTypeFormatter()); } } catch { httpResponseMessage.StatusCode = ApiStatusCode.InternalError; } […]

By CPK 2011
Published
Categorized as angular, asp.net-core, asp.net-web-api Tagged , ,

How to use elasticsearch in angular to highlight search query for livechat feature

I want to use elasticSearch for LiveChat feature that contains conversations and messages collections. And I want to search a message or participant name in the conversation using elasticsearch (multi collection search in two object model conversation and message), giving me as result the message highlighted and redirecting me to the message position in the […]

By rahma sayadi
Published
Categorized as angular, asp.net-core, elasticsearch Tagged , ,

Hot to pass mat-datepicker value to a variable of type date in asp.net?

When I select a date in datepicker, I need to pass that value to StartDate variable of Input class.I tried passing this.filterMovie but it doesn’t work.Plz let me know how to do it. export class Input { StartDate: Date | string; EndDate: Date | string; } let ds: Input = { StartDate: this.filterMovie, EndDate: moment(this.timezoneDate).format("YYYY-MM-DDT23:59:59.999[Z]") […]

Hot to pass mat-datepicker value to a variable of type date in ASP.NET Core?

When I select a date in datepicker, I need to pass that value to StartDate variable of my Input class. I tried passing this.filterMovie but it doesn’t work. Please let me know how to do it. export class Input { StartDate: Date | string; EndDate: Date | string; } let ds: Input = { StartDate: […]

Problems with appending data to FormData in Angular Net 5 Application

I am developing a angular 11 and net 5 application and trying to implement the file upload functionality. In the end, it turns out I am able to send picture to the server, but am not able to send value of some of my other properties. Here is my code, I will try to shorten […]

By Petar Sardelic
Published
Categorized as angular, asp.net-core Tagged ,

Send concurrent SignalR messages with one connection

How can I send multple SignalR messages in parallel with only one connection? I have the following hub method: public async Task Test() { Console.WriteLine($"Start: {DateTime.Now}"); await Task.Run(() => Task.Delay(1000)); Console.WriteLine($"Stop: {DateTime.Now}"); } In my client I have the following connection: private connection: HubConnection = new HubConnectionBuilder() .withUrl(this.url) .configureLogging(LogLevel.Information) .withAutomaticReconnect([1000, 2000, 3000, 4000, 5000]) .build(); […]

By gartenriese
Published
Categorized as angular, asp.net-core, c#, signalr Tagged , , ,

How to include JavaScript sources in startup.cs of AspNetCore?

Is there an easy way to reference JS sources from a JS project that has "JSProj/src/main.js" , "JSProj/package.json" to run at "AspNetCoreProj/startup.cs"? So that when the asp is run, my controller from "AspNetCoreProj/Controllers/MyController.cs" binds to (launchSettings.json) "applicationUrl": "http://localhost:44709", "sslPort": 46367 AND the front-end JS App is run at, let’s say, http://localhost:8080 at the same time? […]

1 2 3 59

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq