Click here to Skip to main content
15,898,732 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionSecuring a Web Project Using ASP.Net Pin
MadDashCoder30-Apr-20 20:01
MadDashCoder30-Apr-20 20:01 
AnswerRe: Securing a Web Project Using ASP.Net Pin
Richard MacCutchan30-Apr-20 21:37
mveRichard MacCutchan30-Apr-20 21:37 
GeneralRe: Securing a Web Project Using ASP.Net Pin
MadDashCoder1-May-20 2:39
MadDashCoder1-May-20 2:39 
GeneralRe: Securing a Web Project Using ASP.Net Pin
Richard MacCutchan1-May-20 4:16
mveRichard MacCutchan1-May-20 4:16 
QuestionGenerate an MVC Project Folder and Files Using Web API 2.2 Pin
Liagapi30-Apr-20 19:42
Liagapi30-Apr-20 19:42 
AnswerRe: Generate an MVC Project Folder and Files Using Web API 2.2 Pin
Richard MacCutchan30-Apr-20 21:36
mveRichard MacCutchan30-Apr-20 21:36 
GeneralRe: Generate an MVC Project Folder and Files Using Web API 2.2 Pin
MadDashCoder1-May-20 2:29
MadDashCoder1-May-20 2:29 
GeneralRe: Generate an MVC Project Folder and Files Using Web API 2.2 Pin
Richard MacCutchan1-May-20 3:23
mveRichard MacCutchan1-May-20 3:23 
GeneralRe: Generate an MVC Project Folder and Files Using Web API 2.2 Pin
Mycroft Holmes1-May-20 12:05
professionalMycroft Holmes1-May-20 12:05 
QuestionC++,Jquery, SQL MVC, produce Excel pie graph? Pin
Member 1464122429-Apr-20 20:47
Member 1464122429-Apr-20 20:47 
GeneralRe: C++,Jquery, SQL MVC, produce Excel pie graph? Pin
Richard MacCutchan29-Apr-20 23:29
mveRichard MacCutchan29-Apr-20 23:29 
GeneralRe: C++,Jquery, SQL MVC, produce Excel pie graph? Pin
Member 1464122429-Apr-20 23:44
Member 1464122429-Apr-20 23:44 
AnswerRe: C++,Jquery, SQL MVC, produce Excel pie graph? Pin
Richard Deeming30-Apr-20 0:26
mveRichard Deeming30-Apr-20 0:26 
GeneralRe: C++,Jquery, SQL MVC, produce Excel pie graph? Pin
Member 1464122430-Apr-20 0:45
Member 1464122430-Apr-20 0:45 
AnswerRe: C++,Jquery, SQL MVC, produce Excel pie graph? Pin
pkfox9-Jun-20 5:33
professionalpkfox9-Jun-20 5:33 
QuestionMVC4 using JWT tokens Pin
Simon_Whale29-Apr-20 0:46
Simon_Whale29-Apr-20 0:46 
AnswerRe: MVC4 using JWT tokens Pin
jkirkerx29-Apr-20 12:46
professionaljkirkerx29-Apr-20 12:46 
GeneralRe: MVC4 using JWT tokens Pin
Simon_Whale29-Apr-20 20:49
Simon_Whale29-Apr-20 20:49 
GeneralRe: MVC4 using JWT tokens Pin
jkirkerx30-Apr-20 7:21
professionaljkirkerx30-Apr-20 7:21 
I think it's possible to do personally, although I haven't done it nor put any day long research into it. Or perhaps at least just start with a piece of JWT, such as picking up the token from the other modern project to background validate in the old MVC4 system so you don't have to sign in again, and then the old system just runs as normal. That is very plausible to do. It's even plausible to me at least, to modify the old system so when you sign in, it writes a JWT token to local storage as well so you don't don't have to sign in to the new system.

JWT tokens stored in local storage have to use the client to read and write them, and I did see some source code concepts to get a view page to store the token in a hidden textbox, and then use Vanilla JavaScript to read that textbox and write it to Local storage. Or the other way around, use Vanilla JavaScript to read that token in Local Storage and write it to a hidden textbox. Then when the view page post back, the token will post as well and can be retrieved.

I pretty sure I can write a hack of AttributeUsageAttribute and call it [Authorize] that I can decorate the controller ActionResult with that will validate a token. Basically a hack of System.Identity but in a smaller package. Store the token in a cookie and can read and write it.

On SPA apps, well Angular at least, you don't have to store the token in Local Storage, but it can be stored in a cookie as well. But the cookie has to be a real single value cookie, and not the asp.net cookie that can store an array of values.
If it ain't broke don't fix it
Discover my world at jkirkerx.com

GeneralRe: MVC4 using JWT tokens Pin
MadMyche30-Apr-20 10:57
professionalMadMyche30-Apr-20 10:57 
QuestionI can not connect to the web service Pin
gr_nik28-Apr-20 1:36
gr_nik28-Apr-20 1:36 
Questionproblem when publishing asp.net core project on a server Pin
ElenaRez18-Apr-20 22:15
ElenaRez18-Apr-20 22:15 
AnswerRe: problem when publishing asp.net core project on a server Pin
Mycroft Holmes19-Apr-20 12:25
professionalMycroft Holmes19-Apr-20 12:25 
AnswerRe: problem when publishing asp.net core project on a server Pin
jkirkerx20-Apr-20 8:07
professionaljkirkerx20-Apr-20 8:07 
QuestionMVC Core 3.1 I need to display multiple images (with transparency) on top of each other as 1 image Pin
clemenslinders13-Apr-20 21:19
clemenslinders13-Apr-20 21:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.