asp.net: How to use it correctly

Asked 1 years ago, Updated 1 years ago, 79 views

I recently joined the asp.net project. There are many problems with the basic processing.
Is the framework not being used correctly or is MS still a quack?
I would like to receive the wisdom of a master who wants to know the truth.

Below are some things that I am currently concerned about.

  • MVC

It is not a current MVC model, and each has access to a separate page (.aspx).
Isn't MVC the trend of .NET's basic application structure?

  • page transition

The current page transition is in Server.Transfer.
Therefore, the browser recognizes the previous page.
There are many "inconveniences" that need to be overcome with strange patches.
In the first place, what is correct about "page transition" in .NET?

  • Login management or multi-session (?)


because login is managed by ASP session Application side cannot use it for different logins in multiple windows.
"""I want to log in to the service that I have already logged in with a different account from a different window at the same time"""
It's a very common need, but
It's not straightforward to manage it simply in a session.
In the first place, what is correct about login management in .NET?

By the way, this project has a long scale and history, so we can't do anything about the basic structure anymore
I would appreciate it if you could let me know if there is a master of hand-me-downs for my future studies and curiosity.
Or, if you have a concise and concise article, please share it with us.

asp.net

2022-09-30 20:22

3 Answers

It is not a current MVC model, and each has access to a separate page (.aspx).
Isn't MVC the trend of .NET's basic application structure?

Today, we use a framework called ASP.NET Web Forms, which is nearly a decade old.ASP.NET MVC is currently at the development stage of ASP.NET Core MVC, which has been redesigned as a cross-platform.

The current page transition is in Server.Transfer.
Therefore, the browser recognizes the previous page.
There are many "inconveniences" that need to be overcome with strange patches.
In the first place, what is correct about "page transition" in .NET?

You should use Response.Redirect.


because login is managed by ASP session Applications cannot use multiple windows for different logins.

I think this is very common behavior for web applications based on cookie specifications.If you want to manage multiple states, you may need to explicitly pass the parameters through a query string.


2022-09-30 20:22

"""I want to log in to a service that I have already logged in to with a different account from a different window at the same time"" is a very common need, but
Simplified session management is not straightforward.

It's off-topi because it's off-topi.
Since it is common to say that you have one session in one browser, you can use Chrome's user profile to address the need to open with a different account.


2022-09-30 20:22

MVC

ASP.NET's history began with Visual Studio.net 2002, and the concept of AJAX did not exist at that time.ASP.NET MVC begins with Visual Studio 2008.
I understand that the project has a long history, but if it was designed before 2008, it can't be helped.However, it is up to the project to keep it old or to introduce new technologies such as AJAX and MVC.

page transition

The Server.Transfer method is included in the document

Do not check whether the current user is authorized to view the resources provided by the Transfer method.

As mentioned above, it is not recommended to use it regularly for page transitions because it performs special operations such as no permission verification.ASP.NET, like regular HTML, allows page transitions with <a href> and should not be specific.

Login Management or Multi-Session

As others have mentioned, this is a common behavior for the Web.Conversely

"""I want to log in to the service that I have already logged in with a different account from a different window at the same time"""
That's a very common need

If you have any websites that support , etc.For example, stack overflow doesn't apply here, does it? If you can't find a specific example, I suggest you change your perception of "very common needs."

Personally,

Incorrect use of framework

One vote for the .


2022-09-30 20:22

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.