tagged [asp.net]
How to add ASP.Net identity to Asp.Net Core when webApi template is selected?
How to add ASP.Net identity to Asp.Net Core when webApi template is selected? I have created a .NET Core project with WebApi template selected includes no authentication. I want to add ASP.NET identit...
- Modified
- 16 Mar at 14:52
How to reduce password reset token length in Asp.Net Identity?
How to reduce password reset token length in Asp.Net Identity? I am using Asp.Net Identity for generate a password reset token. above code is giving me a token with large length. Is it possible to gen...
- Modified
- 29 Jun at 04:56
Specify a format for "asp-for" HTML Tag (ASP.NET Core)
Specify a format for "asp-for" HTML Tag (ASP.NET Core) In an ASP.NET Core project I have to display a (readonly) date in a specific format (say "dd/mm/yyyy HH:MM") How can I do it, knowin
- Modified
- 19 Jul at 17:19
Get image from wwwroot/images in ASP.Net Core
Get image from wwwroot/images in ASP.Net Core I have an image in wwwroot/img folder and want to use it in my server side code. How can I get the path to this image in code? The code is like this:
- Modified
- 15 Sep at 11:51
Is it possible to override the required attribute on a property in a model?
Is it possible to override the required attribute on a property in a model? I'm curious to find out if it is possible to override the [Required] attribute that has been set on a model. I'm sure there ...
- Modified
- 17 Jun at 08:42
Can anyone explain CreatedAtRoute() to me?
Can anyone explain CreatedAtRoute() to me? From the template for Web API 2, a post method is always like this: I don't understand this `CreatedAtRoute()` method. Can anyone explain it to me?
- Modified
- 25 Aug at 16:7
Redirect to login when unauthorized in ASP.NET Core
Redirect to login when unauthorized in ASP.NET Core In the previous ASP.NET MVC, there was an option to redirect to the login action, if the user was not authenticated. I need the same thing with ASP....
- Modified
- 24 Oct at 12:50
Timeout a Web Api request?
Timeout a Web Api request? Like MVC WebApi runs on the asynchronous ASP.NET pipeline, meaning [execution timeout is unsupported](http://forums.asp.net/t/1963799.aspx?MVC%205%20Request%20Timeout). In M...
- Modified
- 25 Jun at 14:24
How to call function on timer ASP.NET MVC
How to call function on timer ASP.NET MVC I need to call function on timer (lets say onTickTack() function) and reload some info in ASP.NET MVC project. I know that there are several ways to do that, ...
- Modified
- 2 Dec at 13:9
How do I check EntityValidationErrors when validation fails?
How do I check EntityValidationErrors when validation fails? I get this message when I try to edit a property in MVC 4 database first project. I'm using the MVC default edit page. > "Validation failed...
- Modified
- 24 Apr at 20:22
Return HTML from ASP.NET Web API
Return HTML from ASP.NET Web API How to return HTML from ASP.NET MVC Web API controller? I tried the code below but got compile error since Response.Write is not defined:
- Modified
- 27 Apr at 11:39
'HttpPostedFileBase' in Asp.Net Core 2.0
'HttpPostedFileBase' in Asp.Net Core 2.0 I'm recently working on a ReactJS app that's calling an API (developed with .NET Core 2.0). My question is how to use `HttpPostedFileBase` in an .NET Core 2.0 ...
- Modified
- 26 Apr at 23:23
Iterate through dynamic form object
Iterate through dynamic form object Using mvc i get values like this to avoid class declarations and router changes. I like to iterate through all values and check them for null or empty.
- Modified
- 13 Apr at 15:40
The operation could not be completed. invalid pointer - Visual Studio 2015 Update 3
The operation could not be completed. invalid pointer - Visual Studio 2015 Update 3 [](https://i.stack.imgur.com/HIEcu.jpg) Getting this error when opening `.cshtml` file: > The operation could not be...
- Modified
- 27 Feb at 10:19
HttpRuntime.AppDomainAppPath equivalent in ASP.NET Core
HttpRuntime.AppDomainAppPath equivalent in ASP.NET Core What is the equivalent of `HttpRuntime.AppDomainAppPath` in .NET Core? I moved a project from ASP.NET to core, and a few Libraries are not inclu...
- Modified
- 11 May at 13:17
InvalidOperationException on File return
InvalidOperationException on File return am running into some weird issue when i try to return a file to be downloaded, so this is my code but the problem it return this error am not sure what i have ...
- Modified
- 5 Dec at 11:22
How to add Web API to an existing ASP.NET MVC (5) Web Application project?
How to add Web API to an existing ASP.NET MVC (5) Web Application project? Assuming you forgot to tick the Web API checkbox (add it to the project) when making a new MVC (5) project, what do you need ...
- Modified
- 23 May at 12:2
Injection of IUrlHelper in ASP.NET Core
Injection of IUrlHelper in ASP.NET Core In , `IUrlHelper` could be injected in services (with `services.AddMvc()` in startup class) This doesn't work anymore in . Does anybody know how to do it in as ...
- Modified
- 19 Oct at 13:0
How to get current user, and how to use User class in MVC5?
How to get current user, and how to use User class in MVC5? - - `User``Items``Id``Item``User``List` I'm using "Individual User Accounts" from the MVC template. Tried these: - [How do I get the current...
- Modified
- 23 May at 12:26
ASP.NET MVC Core WebAPI project not returning html
ASP.NET MVC Core WebAPI project not returning html Here is my controller i am sending my html ``` public class MyModuleController : Controller { // GET: api/values [HttpGet] pub...
- Modified
- 24 Nov at 07:5
Remove "api" prefix from Web API url
Remove "api" prefix from Web API url I've got an API controller By default it is mapped to URL `mysite/api/My/Method`, and I'd like it to have URL without "api" prefix: `mysite/My/Method` Setting cont...
- Modified
- 12 Jun at 11:27
How can i configure JSON format indents in ASP.NET Core Web API
How can i configure JSON format indents in ASP.NET Core Web API How can i configure ASP.NET Core Web Api controller to return pretty formatted json for `Development` enviroment only? By default it ret...
- Modified
- 21 Jan at 14:38
ASP.NET MVC - Uploading an image to Amazon S3
ASP.NET MVC - Uploading an image to Amazon S3 I have my image from Request.Files[0]. Now, how do I upload this image to S3? I see that in the AWS .NET API you have to specify ContentBody when putting ...
- Modified
- 23 Sep at 18:55
Passing object in RedirectToAction
Passing object in RedirectToAction I want to pass object in RedirectToAction. This is my code: where searchJob is instance of SearchJob. But I don't get data on SearchJob action method. Instead I get ...
- Modified
- 29 Sep at 13:14
Passing dynamic javascript values using Url.action()
Passing dynamic javascript values using Url.action() Could anyone please tell how to pass dynamic values using Url.action(). Something Like, firstname, username is not getting reffered inside the Url....
- Modified
- 7 Aug at 12:5