38,270 questions
0
votes
0
answers
71
views
Object posted to api is Null in .NET 8 client but works in Framework 4.8
I have a client winform application originally targeting .NET framework 4.8 that I have upgraded to .NET 8. The client sends the class to a local server MVC.3 api that saves the entity to the server. ...
0
votes
0
answers
61
views
When I host my site on my PC In IIS server the email send correctly when i host on my Production server the email does not send
I'm experiencing an issue with sending emails using System.Net.Mail.SmtpClient in an ASP.NET Web API project. The emails are supposed to be sent automatically using Hangfire, but I'm encountering an ...
0
votes
0
answers
81
views
Running Task.Factory.StartNew() results in System.Threading.Tasks.Task`1[System.Web.Mvc.ActionResult] showing up on the returned view (ASP.NET MVC3)
Our goal is to get Google Recaptcha V3 working on a single form on an MVC3 .NET4.5 project. However, I'm struggling to make this work due to the async request to Google for the Recaptcha score.
FE is ...
0
votes
2
answers
86
views
ASP.NET MVC 3/4 Razor - public action method not found - how to debug
I'm just working on an existing C# ASP.NET MVC 3/4 application and I am getting an error when trying to call a method.
The call is
@url.Action("Bob", "BobController")
The ...
0
votes
0
answers
60
views
ASP.NET issue facing exception issue
I'm facing 404 error. It is throwing the exception error how tp resolve the exception error. I'm running Login page but it is taking to the error.aspx page in that its showing the exception what steps ...
0
votes
1
answer
121
views
Unable to install ASP.NET MVC 3 using chocolatey
In the past, I have used the following command to install MVC 3 using chocolaty in the dockerfile without issue. For some reason, I started getting the 404 not found message. I think the package ...
0
votes
1
answer
35
views
Why ModelState Isvalid false when working on images
public ActionResult Signup(UserTable u)
{
string fileName = Path.GetFileNameWithoutExtension(u.ImageFile.FileName);
string extension = Path.GetExtension(u.ImageFile.FileName);
fileName ...
0
votes
0
answers
899
views
How to integrate Asp.Net MVC existing application to MAUI Framework
I have an existing Asp.Net MVC web application. I want to integrate my existing MVC web application into the MAUI framework without any new development.
I want to just create wrapping up the code
0
votes
1
answer
316
views
how to make event for button in gridview asp.net vb language?
I have error when i try to click button in gridview that will update selected row
Code and the error in the image
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles ...
0
votes
0
answers
73
views
Can we set custom userid value to User_id column in request table in Azure logs?
I need to set the custom value to the User_id column in the request table of Azure logs.
This is to collect the insights about the users who access and visits my web-application.
I've a working method ...
0
votes
1
answer
44
views
ASP.NET MVC3- turn off caching, but only for "pages", no for static content
For a project of ours, our customer ran a "pen test" across the ASP.NET MVC 3.0 application and found a number of security issues that they want us to fix.
The one that causes the most ...
0
votes
0
answers
71
views
How to call function from one controller to another controller?
I'm using MVC3.
I have a ActionLink in my home page, which will redirect to another dueItem page:
@Html.ActionLink("Due Items", "Reports", "Reports", null, new { @class = ...
2
votes
1
answer
1k
views
How to Block Http Methods in ASP.NET
We have a requirement of disabling the HTTP methods besides POST, GET and Head in an ASPNET Core Web application due as a part of security fixes. How can we disable the HTTP OPTIONS method in ASP.Net ...
0
votes
1
answer
702
views
InvalidOperationException: The view 'UserLogin' was not found, when migrate from asp.net core 2.1 to asp.net core 3.1
I have migrated my asp.net core 2.1 to asp.net core 3.1, but I got this error in my startup code,
An unhandled exception occurred while processing the request.
InvalidOperationException: The view '...
1
vote
1
answer
191
views
What regular expression needed to extract a part from a text to include splitting points too?
heres is the code where I get strings from a textbox:
string txtS = TextBoxS.Text;
than extract some text with regex:
string[] splitS=Regex.Split(txtS, @"\s(we|tomorow)\s");
text: Today we ...
0
votes
1
answer
563
views
The model item passed into the ViewDataDictionary is of type but this ViewDataDictionary instance requires a model item of type 'System.Collections
When I Want to post my Form in Asp.net.Mvc I get this Problem How can i fix that
InvalidOperationException: The model item passed into the ViewDataDictionary is of type 'FormValidation.Models.Entity....
0
votes
1
answer
86
views
How to delete string [] arrays from another string?
First I define my string array and a string from which I want to remove words:
string[] excludeWords = {"word1","word2","word3","word4","word5"}
...
0
votes
1
answer
110
views
Adding namespace to SOAP API response to access elements in the response using XmlNamespaceManager in C#
I am trying to access all elements int this SOAP response, but I am finding it difficult to access the elements inside the response. I am trying to use XmlNamespaceManager, but do not know how to go ...
0
votes
1
answer
1k
views
Cannot signin using HttpContext.SignInAsync
I'm developing an application using ASP.Net Core MVC 3.1 and i am facing a problem where it fails to sign-in. localhost response 401 unauthorized
AccountController
[HttpPost]
public async Task&...
0
votes
1
answer
747
views
how to add where condition in include table in linq
I can use the dynamic model I want to add where condition in the "Tbl_ProductImg" table in this table I want only those record which has "isActive" value 1.
model.Product = db....
0
votes
0
answers
40
views
When Add Migration Get Unable to create an object of type 'SystemDbContext'. ASP CORE 5.0
I create tables in the Domain layer
when I adding Migration from the package manager console
I get errors
Unable to create an object of type 'SystemDbContext'. For the different patterns supported at ...
1
vote
2
answers
1k
views
How to customize button in Telerik form / kendo-form?
I'm new in the Telerik UI. When I want to customize a kendo form in asp.net razor pages. But I to rename button name. But I couldn't find any button field. I follow this link [Telerik Form][1]. I edit ...
0
votes
1
answer
407
views
Model Binding with DisplayFormat on Decimal does not work
asp.net-core-mvc
I have a ViewModel with one decimal property on it:
public class RdoViewModel
{
[DisplayFormat(DataFormatString = "{0:C0}", ApplyFormatInEditMode = true)]
public ...
1
vote
0
answers
915
views
How to implement Single Sign On in ASP.NET MVC application
We have developed 2 applications in ASP.NET MVC. We have used ASP.NET Identity in both applications for user authentication. Both applications use the same database. Also both apps are hosted on Azure ...
1
vote
2
answers
4k
views
Dependency injection for open type generic interface and closed type class
I have a generic interface IViewModelService.cs
public interface IViewModelService<T> where T : class
{
public Task<T> Get(); // returns a view model
}
Which is implemented by two ...