Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

asp.net-mvc

Does FileStreamResult close Stream?

September 2, 2022 by Magenaut

My question is similar to this question:
Does File() In asp.net mvc close the stream?

Categories ASP.NET, Q&A Tags asp.net, asp.net-mvc, c# Leave a comment

ASP.NET MVC Razor render without encoding

September 2, 2022 by Magenaut

Razor encodes string by default. Is there any special syntax for rendering without encoding?

Categories ASP.NET, Q&A Tags .net, asp.net, asp.net-mvc, c#, razor Leave a comment

How to create roles in ASP.NET Core and assign them to users?

September 2, 2022 by Magenaut

I am using the ASP.NET Core default website template and have the authentication selected as “Individual User Accounts”. How can I create roles and assign it to users so that I can use the roles in a controller to filter access?

Categories ASP.NET, Q&A Tags asp.net, asp.net-core, asp.net-identity-3, asp.net-mvc, c# Leave a comment

Write PDF stream to response stream

September 2, 2022 by Magenaut

If I have a pdf file as a Stream, how can I write it to the response output stream?

Categories ASP.NET, Q&A Tags asp.net, asp.net-mvc, c# Leave a comment

How to remove returnurl from url?

September 2, 2022 by Magenaut

I want to remove “returnurl=/blabla” from address bar when a user want to access to a login required page. Because I’m trying to redirect the user to a static page after login to do some selections.

Categories ASP.NET, Q&A Tags asp.net, asp.net-mvc, forms-authentication Leave a comment

You must add a reference to assembly ‘netstandard, Version=2.0.0.0

September 2, 2022 by Magenaut

The project is an ASP.NET MVC Web App targeting the .NET Framework 4.6.1.

Categories ASP.NET, Q&A Tags .net, .net-framework-version, asp.net, asp.net-mvc Leave a comment

Do I need a Global.asax.cs file at all if I’m using an OWIN Startup.cs class and move all configuration there?

September 2, 2022 by Magenaut

Let’s say for example in a brand new ASP.NET MVC 5 application made from the MVC with Individual Accounts template, if I delete the Global.asax.cs class and move it’s configuration code to Startup.cs Configuration() method as follow, what are the downsides?

Categories ASP.NET, Q&A Tags asp.net, asp.net-mvc, asp.net-mvc-5, c#, owin Leave a comment

Get error message if ModelState.IsValid fails?

September 2, 2022 by Magenaut

I have this function in my controller.

Categories ASP.NET, Q&A Tags asp.net, asp.net-mvc, c# Leave a comment

Progress bar for long running server calls in ASP.Net MVC

September 2, 2022 by Magenaut

I just want to create a progress bar while long running server calls. I could not create a ajax post request to the controller while the controller is doing a long running job. I want to create an additional action to get the actual statement of current long running task. I tried to create poll … Read more

Categories ASP.NET, Q&A Tags ajax, asp.net, asp.net-mvc Leave a comment

How do I log a user out when they close their browser or tab in ASP.NET MVC?

September 2, 2022 by Magenaut

I need to sign out a user when the user closed the tab or browser, how do I do that in ASP.NET MVC?

Categories ASP.NET, Q&A Tags asp.net, asp.net-mvc, authentication, c#, form-authentication Leave a comment
Older posts
Newer posts
← Previous Page1 … Page31 Page32 Page33 … Page131 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress