Recent Discussions
Macos dotnet wacth https not working.
Hello; I wanted to start Asp.net core Angular training. I am a Macos M1 user. I installed the necessary plugins with Vscode and created a webapi. But the api does not work with the dotnet watch command. It says the reason is https certificate problem. launchSettings.json : { "$schema": "http://json.schemastore.org/launchsettings.json", "profiles": { "http": { "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": false, "applicationUrl": "http://localhost:5000;https://localhost:5001", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } } } } applicationUrl also only works when it is http. In the error command: Microsoft.Extensions.Hosting.Internal.Host[11] Hosting failed to start System.InvalidOperationException: Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found or is out of date. To generate a developer certificate run 'dotnet dev-certs https'. To trust the certificate (Windows and macOS only) run 'dotnet dev-certs https --trust'. There is a long error like this. I enter the following commands in the terminal, in order: 1- dotnet dev-certs https 2- dotnet dev-certs https --trust I approve the certificate. When I say 3-dotnet dev-certs https --check, I get the error: No valid certificate found. I found the localhost certificates in Keychain Access and selected the always trust option. But I couldn't find a solution. Also: dotnet dev-certs https --trust Trusting the HTTPS development certificate was requested. If the certificate is not already trusted we will run the following command: 'security add-trusted-cert -p basic -p ssl -k <<login-keychain>> <<certificate>>' This command might prompt you for your password to install the certificate on the keychain. There is an addition process like To undo these changes: 'security remove-trusted-cert <<certificate>>' I didn't know how to do it. Can you help me with this?73Views0likes0Comments.NET Web API CancellationToken don't work with Angular .unsuscribe()?
In Angular, I make API calls by subscribing to observables. When a user cancels a request, the application unsubscribes to the subscription which cancels the request (I can see this in the network tab of the Chrome browser). However, it does not trigger the endpoint and so the cancellation token param in our endpoint is of no use. Is there a way around this? I need the cancellation token to cancel all database request.127Views0likes2CommentsLatest ASP.Net
Hello All, I've been working on a web application developed in ASP.Net and .Net Framework 4 for a few years. Trying to find out the new technologies that replaced asp.net web forms to brush up the skill set, found that ASP.Net Core is the new one. I've worked on ASP.Net MVC framework. Does this core completely replaced asp.net? Can the web forms applications be created in core? What is the latest framework to develop web apps? Thanks73Views0likes1Commentajax and connection to mvc .net
I need to access some c# code from javascript in MVC ,NET (not blazor). I have the below. This is very specific to .NET and MVC stack and not a generic ajax question like another one in stack overfow. I get no error message it just continues to the next statement after the ajax call. There could be 2 possible issues i think. My url: '/Home/CreatePostcodeFromCoordinates', is wrong. Or my C# assembly is not part of the assembly? or something similar. I am not that experienced with Web techs, I come from a DB background but can't be that difficult to get this link working right? Can't see anything else wrong. Also does the return value from C# need to be some special format or a string (as per now) is ok? this could be another reason? Thank you! console.log("just before /Home/CreatePostcodeFromCoordinates"); $.ajax({ type: "POST", url: '/Home/CreatePostcodeFromCoordinates', data: { param1: longitude, param2: latitude }, success: function (response) { console.log('success'); console.log(response); }, error: function (error) { console.error(error); } });Solved96Views0likes1CommentBest design software for personal project
I'm starting to develop a WPF software, with some components like Ribbon Menu and Docking Layouts,but I find an intuitive design, better organized and cleaner, an interface that does not seem to be WinForms. Does anyone know of any components or frameworks that can do this type of design? My cordial greetings.55Views0likes0Commentsreferencing a parameter
Hi all: I have a gridview gvinvitaciones whose columns are: <Columns> <asp:TemplateField HeaderText="Región" SortExpression="tregion"> <EditItemTemplate> <b><asp:label ForeColor="Red" Text="*" runat="server" /></b> <asp:DropDownList ID="ddlpaises_editar" DataSourceID="sqldspaises_editar" AutoPostBack="true" DataTextField="pais" DataValueField="p0" OnSelectedIndexChanged="seleccionar_paises" runat="server" /> <asp:DropDownList ID="ddlregiones_editar" DataSourceID="sqldsregiones_editar" DataTextField="region" DataValueField="r0" runat="server" /> </EditItemTemplate> <ItemTemplate> <asp:Literal text='<%# Eval("tregion")%>' runat="server" /> </ItemTemplate> </asp:TemplateField> </Columns> The datasourceid is objdsinvitaciones And I have <asp:SqlDataSource ID="sqldsregiones_editar" ConnectionString="<%$ ConnectionStrings:Cresolia%>" SelectCommandType="StoredProcedure" SelectCommand="seleccionar_regiones" runat="server"> <SelectParameters> <asp:Parameter Name="p0" /> </SelectParameters> </asp:SqlDataSource> How to set the p0 parameter in rowediting I do Sub Editar1(ByVal s As Object, ByVal e As GridViewEditEventArgs) Handles gvinvitaciones.RowEditing, gvpedidos.RowEditing Dim gr As GridViewRow = s.Rows(e.NewEditIndex) sqldsregiones_editar.SelectParameters("p0").DefaultValue = DirectCast(gr.FindControl("ddlpaises_editar"), DropDownList).SelectedValue End Sub59Views0likes0CommentsUse .NET to determine if a Windows user account is password protected
I would like to take windows account username and just say YES he has password and NO he has no password. I don't want to retrieve a password. Just to use .NET 8 to say YES this account is protected by password, so if user locked his PC no one can access this account withou password.64Views0likes0CommentsEnviar archivo PDF a contacto de WhattsApp con C Sharp.
Hola, una consulta, tengo desarrollada una aplicación de escritorio Windows Forms con C Sharp y me están requiriendo que desde la misma se pueda enviar documentos PDF a contactos de WhttsApp. Estuve buscando información en la web, pero no encontré información certera. Desde ya muchas gracias. Saludos.68Views0likes0CommentsI want to update the version from.Net 6 to 8
Will the below package version will support by .net 8? <PackageReference Include="DK.Configuration.Consul" Version="1.1.0" /> <PackageReference Include="DK.Enterprise.AspNet.Mvc.HealthCheck" Version="0.1.0-rc2" /> <PackageReference Include="DK.Enterprise.DataAccess.Data.Oracle" Version="9.1.0" /> <PackageReference Include="DK.Enterprise.ProblemDetails" Version="1.6.0" /> <PackageReference Include="Dk.NLog.Targets.DkLogging.nlog5" Version="5.3.0" /> <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.10" /> <PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="5.0.0" /> <PackageReference Include="NLog.Extensions.Logging" Version="5.3.11" /> <PackageReference Include="Oracle.EntityFrameworkCore" Version="6.21.61" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" /> <PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.4.0" />338Views0likes2CommentsHow to print on Bluetooth printer in dotnet maui
Dear All Can any one tell mw how can I access Blutooth printer in dotnet maui. Can we use Bluetooth printer as COM/LPT port so that we can send text file to print on that port. Or we should use It as Binary writer to print any graphics or PDF file on it. Thanks13KViews0likes3CommentsMAUI APP does not run, android-API34 issue ?
Hi everyone, i'm facing a problem using dotnet 8.0 and Maui. I read that an android api is automatically associated to a dotnet version. So for .Net 8.0 the android api is 34.0 I installed the Maui workload and created a new project, then i ran(build) it without any modifications and all the necessay packages installed without issues But when i go to the generated bin folder and run windows app it does'nt even show up, For android part i installed the signed-apk in virtual device and here is what i get : I found somewhere that this was the api 34 issue, i tried to install .Net 7.0-API 33 and .Net 9.0-API 35.0 but facing the same problem. What should i do now... please help me THNKS!!!356Views0likes2CommentsOpenstreet maps on azure websites
Hi, I am at the beginning of starting my own project. I come from a database tech background and have not kept up to date with all the Web frameworks. The project will run on azure and I will use visual studio. I need to be able to access opensteet maps for mapping and coordinates. So what I need to do is go to open street maps. Click somewhere on the map and a special tag should come up which I am populating in c# based on coordinates and country. I will to do the same on android, ios. Is xanarin my best option here? So there is MVC, the new .net core, web forms, some other framework. I didn't particularly like the .net core as there seems to be no designer with toolbox and components. Or do I use umbraco framework. I also saw a project called OSMsharp on github. What .net tech should I go for asI have to use openstreetmap and no Google maps, am i limited by this?. Thank you! Panos114Views0likes0CommentsHow to trigger modal in blazer web server using c#?
Hi Team I have a blazer web server, want to understand something regarding my code. The suppose when clicking add operation it triggers modal, currently its not doing so and checked by debuging there are no any js errors. How do i improve this logic so it can work as expected? PAGE "/main" @using OperationApp.Models @using OperationApp.Components @using Blazored.Modal <h1>Operation Manager</h1> <!-- Button to open modal for adding a device --> <button class="btn btn-primary mb-3" @onclick="OpenAddDeviceModal">Add Device</button> <!-- Listing of operations --> @if (operations.Any()) { <ul class="list-group"> @foreach (var operation in operations) { <li class="list-group-item d-flex justify-content-between align-items-center"> <span>@operation.Name</span> <span> <!-- Button to remove the operation --> <button class="btn btn-danger" @onclick="() => RemoveOperation(operation.OperationID)">Remove</button> </span> </li> } </ul> } else { <p>No operations available.</p> } <!-- AddDeviceModal component --> <AddDeviceModal @ref="addDeviceModal" /> @code { private List<Operation> operations = new List<Operation>(); private AddDeviceModal addDeviceModal; private void OpenAddDeviceModal() { addDeviceModal.Open(); // Open the modal } private void RemoveOperation(int operationID) { var operationToRemove = operations.FirstOrDefault(op => op.OperationID == operationID); if (operationToRemove != null) { operations.Remove(operationToRemove); } } }121Views0likes0CommentsCan We add migration file from c#, instead of PackageManagerConsole
Hi, is there any possibilities to add migration file from c# in core project, entity framework code first project. I can able to add the migration file from PackageManagerConsole, but could not able to add from c#104Views0likes1CommentBest way to migrate from .Net Framework to .Net 6
Hello everyone! I have many web projects with ORM and MVC with Net framework. I would like to migrate to .net 6 or higher. I tried Net Upgrade Assistant and also created a new project and did it step by step, but this option is very slow. Does anyone know what is the best way to do this?254Views0likes3CommentsWhat do i use to make a inline editable table for razor page?
Datatable.net edit function costs money, so I'm trying to make my own table with inline editing with Razor page, but I don't know what is the modern way to do it. Razor is not so modern but I don't think I want to use jQuery for it if there's a better way. I read some posts and there are a lot of answers like Ajax, jQuery, fetch API,... and I also found a library called Hydro for Razor that mimics SPA functionality, but I don't know if it's applicable to this task. Can someone point me in a direction?112Views0likes0CommentsHow to create a customer plugin using dotnet 6.0
Hi, I implement a base application ( a standard app), now i want to create a customer plugin inherited from the base app, My goal is to linked between there and implement the new features in the customer plugin without touch the base app. Thanks203Views0likes1Comment