Category "asp.net"

Foreign key created in shadow and appending random 1 to column name - ASP:NET EF Core

When I migrate my new models and data I get the following error for multiple foreign keys: The foreign key property 'InsurancePolicy.InsuranceSubjectID1' was c

Adding Google authentication to ASP.NET with Angular Visual Studio template

I have a project that I created with the ASP.NET with Angular Visual Studio template with the individual accounts authentication type. I then added Google authe

When refreshing a page developed by nextjs error occurred

I have developed a project by nexjs which their backed is IIS and all these are working properly. I have an URL address like this : dastshafa.ir/product/2/

ASP.NET 4.8 Feature unavailable in IIS 8.5 (Windows Server 2012 R2)

Windows Server 2012 R2, IIS 8.5, .NET 4.8 is installed (verified via the Registry, see screen-shot). On my Windows 10 machine, I see the option to select the AS

How to troubleshoot ASP.NET app never loading in IIS

I have an ASP.NET app (.NET Framework) deployed to an ec2 instance running Windows Server and IIS. The app never loads in my browser - it just spins forever. Th

Spaces disappear

I have a simple html that goes to a asp script to save the data in a text file but all the spaces disappear. I have tried a lot. I have tried to do a URL coding

How to dynamically change background-color in ASP.NET MVC core?

I had an idea of changing a background color of a div when I click a button. I added a string in my 'Subject' model class as so: [NotMapped] public string Colo

ASP.net Core: There is already an open DataReader associated with this Connection which must be closed first

I have an ASP.Net Core application, and I'm using Microsoft identity, I'm trying to add a page to manage users roles, in the action result i defined a variable

Issues connecting SQLedge to asp.net projects on m1 mac

Back Story: So I've been recently developing some c# sharp projects using a m1 Mac and a sql image (sqledge) hosted in a docker container. When trying to connec

"WriteLinesToFile" task was not given a value for the required parameter "File"

Error MSB4044 The "WriteLinesToFile" task was not given a value for the required parameter "File". BlazorTutorial.Client C:\Program Files\dotnet\sdk\5.0.

.NET 6 problem: Bearer error="invalid_token" error_description="The signature is invalid" in SwaggerUI

I am currently trying to make authenticator when a specific user logs in and gets the weathercontroller information. It says that the jwt token is invalid. So I

How do I get the userId to save in the database while submitting the form?

I'm a beginner and well i'm doing a form which is capable to send information to the database but I needed one more thing to be sent and it is the Id from the u

DateTime from view to control to Mapper

i'm trying to pass A DateTime data type to a controller that will call a Mapper to pass it into a db. Additionally the DateTime is taken from a db at first. db

How to register Quartz.Net jobs dynamically in .Net core

I am using Quartz.Net 3.2.0 with a .net core application and here is my requirement. Users can alter the schedule from UI, they can select the report they want

OutputParameters must contain a property called 'BusinessEntityCollection' of type Microsoft.Xrm.Sdk.EntityCollection for SDK message RetrieveMultiple

Creating a plugin for virtual entity, while trying to parse an EntityCollection to PluginExecutionContext in Microsoft.Xrm.Sdk it fails with message Error "mess

Sort dynamic model with orderby

I am combining 2 tables that I transferred to the dynamic model into 1 table in the cshtml part. And I want to sort that table by a column(OrderBy). How can I d

Insert null value into SQL Server database

I have this code public void insertAssignment(long mediaEvent_ID, long mediaBranch_ID, int? isPremiere, int? isNew, int? isLastChance, int? isPrevShown, int

Retaining HTML Markup when using XML .InnerText

I have HTML markup being read from an XmlDocument using InnerText as below. However, once read into the string "content"; string content = Convert.ToString(XmlD

Encoding issue when saving files with javascript?

i've been trying all day to setup a function that creates a file from plaintext or a stream in a razor page. i create csv plaintext in a backend and send it to

'ZipArchiveEntry' does not contain the definition of 'ExtractToFile'

Using ASP.NET Framework 4.7.1, I am trying to compress a file but Visual Studio is showing that ZipArchiveEntry does not contain the definition of ExtractToFile