Questions tagged [asp.net]
ASP.NET is a web application framework developed by Microsoft to allow programmers to build dynamic web sites and web applications.
19
questions with no upvoted or accepted answers
4
votes
0
answers
834
views
OAuth 2.0 implicit flow implementation
I have been implementing the OAuth 2.0 implicit flow to secure the API I use in an Angular SAP. Please, could you review my code? I am sure there is a lot of stuff to improve in it.
I have separated ...
4
votes
0
answers
4k
views
REST Web API Claims / Identity 'refresh' per request
I intend to expose a ASP.Net REST API for a project. I would like to use the default ASP.Net Identity system to provide the SQL backend. Users are managed in a different project. For my REST API ...
4
votes
0
answers
758
views
Wrapping a GridView with custom controls
My aim is to create a server control which inherits from a GridView and outputs the basic output wrapped in external markup, including other controls. For example, the output will look something like:...
3
votes
0
answers
2k
views
Validating the model outside of the controller in ASP.NET
I wasn't quite sure whether I should do it this way or create a validation service and inject it, but this works:
Controller:
...
3
votes
0
answers
39
views
Prettified GridView: is this JS code concise?
I been writing code for my company for years and there is never any constructive criticism for what I do. I am the only developer here and I would appreciate your opinion on this web page I made. It ...
3
votes
0
answers
5k
views
Hosted service for queuing and running tasks in parallel in ASP.NET Core
I am attempting to construct a background service for an IIS-hosted ASP.NET Core project that basically queues tasks and runs them, and I decided to go with the ...
2
votes
0
answers
1k
views
Ninject binding for Dbcontext
I have an asp.net web API and I am using EF6 to connect to a third party rest API which sells online game codes. We made a deal with the company so clients have to call my rest API in order to get the ...
2
votes
0
answers
137
views
How to optimize code to only pull separate table rows that are necessary
I have a Company Class, and separate normalized Address Class. I did this because the Address table will hold more than just Company Addresses, so I don't want "CompanyAddress", "EmployeeAddress", "...
2
votes
0
answers
1k
views
RESTful API combining three other APIs
I have created a RESTful API that uses three other APIs with Visual Studio 2017 in .NET Core. It is the first time I have ever programmed in .NET so I am sure the code could use a lot of improvements. ...
2
votes
0
answers
50
views
Creating many aspx pages
I just want to ask if its okay to create many aspx pages. What i did was, i made a guitar store website that has 6 brands and each of them have their own webpage. The code is like this:
The aspx.cs ...
2
votes
0
answers
6k
views
Securing Web API using token authentication and allowing external application to post or get data
Implementing OAuthAuthentication with OWIN and Identity to secure Web API and let external application like Chrome Extension to access our self hosted API for getting and posting data through our ...
2
votes
0
answers
271
views
Dynamically created controls in Page_Load()
I have a question regarding creating controls in runtime in ASP.NET 4.0. I'm building a application and in admin.aspx page I have multiple controls (DropDownLists) which are dynamically created with ...
1
vote
0
answers
107
views
Modified PoC for BlogEngine.NET CMS (CVE-2019-6714)
This is a modified exploit proof of concept targeting the BlogEngine.NET content management system (CVE-2019-6714) for the .NET framework. I modified it (from Cobb 2019) to execute payloads via ...
1
vote
0
answers
539
views
Adding multiple child entities to a parent entity when creating the parent entity
I have a form on a page to add a Post (parent), before submitting the form, a user should be able to add 1 or more Sections (children) to the Post.
The form:
...
1
vote
0
answers
86
views
Bookmark controller with IMemoryCache
I'm just doing a small hobby project to solve a little problem I have and I'm using it as a learning exercise for ASP.Net MVC 5, .Net Core 2 and Bootstrap.
I'm using a nuget package that handles ...
1
vote
0
answers
156
views
Helper class for ASP.net to return data from SQL server
My goal is to create a class that I can call from my webpages like this. Similar to a data access layer?
...
1
vote
0
answers
2k
views
ValidationAttribute to validate a string against a JSON schema
This is my implementation of an .NET ValidationAttribute to validate a string against a JSON schema. The JSON schema file is stored within the application as an ...
1
vote
0
answers
1k
views
Unit of work using session for NHibernate for WebApi and MVC
My goal was to use the NHibernate Session and to create a UnitOfWork class that I could use thoughout my project.
My goals are:
Calling Commit should commit everything including un-flushed state (...
0
votes
0
answers
23
views
General setup for ASP.net REST webapi
I am currently building a REST webapi. Right now I am wondering if this design is in the right direction.
Firstly, I am using entity framework. I like to call the items in the database DbItems. The ...