ASP.NET Community Standup - Porting your ASP.NET Web Forms application to .NET 7 in minutes

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] foreign [Music] foreign [Music] [Music] foreign [Applause] [Music] thank you [Music] foreign [Music] T Community standup so I'm joined today by Michael ketting and uh Michael where are you joining us from yeah hello John yeah I'm here from Vienna in Austria so it's already uh past 7 P.M on my side but I'm fresh and happy to be here oh good okay I'm always as we're seeing all the comments come in it's so fun to see everyone joining from all around the world it's it's amazing um well we are going to be talking today you're going to be showing us how to quickly port a web forms application to.net core that's right I'm excited about that um we will start as always with a few community links um and we've got those links and I'm sharing those in the comments and there's also a handy Banner for that there so that's where those links are at and so I am mostly going to be sharing let me see first of all we have this amazing video that came out this uh past week this is Steve Sanderson and he talks about this new prototype called Blazer United and this is really amazing in that it it um it's this crazy prototype as only Steve can do which is basically kind of merging and solving some of the problems we've had in the past where you have to make choices you have to decide am I going to do um racer components in razor Pages or am I going to do a Razer or a Blazer web assembly or Blazer server side and so this uh this prototype is kind of merging those things together so I am quite excited about that I recommend watching this video it's kind of a teaser and we're going to have him on the show I believe it's February 14th and we're going to be looking at at that so so stand by for that one um so this is um something I'm excited to share the um the static web app team has this uh this Roundup blog and so I'm sharing this uh and this is kind of some of the updates that they share every month which is neat uh part of the reason I'm sharing it though is that there is in this um events area we've started a new thing so we actually have been doing the uh.net community standups for a long time and the Azure Community the Azure developer Community has started some as well so this is Microsoft Azure developer YouTube channel and we've got um static web apps and we've got a bunch of other teams joining up from the Azure developer community so that's a great great resource too all right uh some just kind of General things as far as migrating so Michael's going to be showing us the hard case I think of moving to uh to moving web forms if you are moving uh MVC we had some questions on this when we tweeted about it and MVC we actually have some some tooling built using yard so yarp is this yet another product reverse proxy and there's actually tooling built into visual studio now in this extension that will kind of migrate some stuff over for you so pretty pretty nice experience what's nice about this too is it doesn't incremental migration so with incremental migration you've got a reverse proxy and you basically set that up and it it sends all your traffic back to your legacy application and then you can start porting over little bits of of it at a time and I've actually used it on a website at work and it it worked I couldn't believe it almost um so so that's exciting to see again that's for um for some specific cases um they have their incremental migration this is for mostly focus and MPC and API um and then they also have some some migration tooling for other things they're working on like for instance um xamarin demawi Etc and there's an entire ebook focused on porting uh existing asp.netapps to.net6 and then you know once you're there from six to seven is pretty pretty quick but this um there's a lot of stuff that this goes into including like the architectural differences um so you know difference in the app startup and difference and a lot of different cases um so um so this is a really helpful ebook and that is included in the links one other thing only kind of related but just as we're talking about migrating um Legacy applications to core this is something that the team published recently this is for Windows forms not web forms Windows forms but this is a pretty pretty great walk through that shows using the patterns so this in this application they take um or or this uh this guide they say you know first of all take your application and use mvvm pattern and then you can use that to Port your your windows forms application um and it's a lot easier if you're using a kind of custom or a standard pattern first so this this guide they're using uh mvvm and then they're also using the community toolkit so um you know this is It's a a relatively Advanced guide but it does walk through a scenario and most of the um the things that we've been sharing with this lately have been based on real world examples where we're helping customers go through something so I'm gonna stop sharing and I will turn it over to you Michael so should I go ahead and share your screen yeah that's okay all right let's do that God so yeah I'm going to be talking today today about uh Hobbies core forms uh what it is I'm going to tell you in a moment uh I will help you reporting your spirit and platforms application 2.net seven in seven minutes um I have thanked myself uh or rather than checked what actually the total change that was and it might be a bit hyperbole because uh it could be less than seven minutes but up at seven and seven minutes sounds really great so it's seven minutes um yeah John also mentioned uh that he'd like to do some introductory talk with me first so I've also got discovered in the presentation I become so a bit about me um some reasons why you are all here why actually core forms is something you might be interested in how you're going to be working uh with core funds and some closing words of course yeah so the fun part of the talk about about me and John if you have any more deeper questions Etc please feel free to jump in I've just hit a couple of talking points sure so um I'm a software architect uh in Vienna and Austria with the company Rubicon it I've joined way back when in 2004 fresh after University my first job and I'm still here um and um yes that's very impressive yeah thanks we have uh quite a few people who are here some people who are even longer with the company or with a group of people who founded the company it's it's probably going to be not quite throughout the years yet for the real hardcore members but it's getting close to this uh for the people who know each other and I'm going to talk about what we call it in a moment a few words yeah so what I'm doing is basically I'm the lead uh for the development of the remotion framework which is a full stack framework and it goes back way way way back uh 2.net 1.1 I think we already were on 1.1 when I started so it's not 1.0 but yeah way way way back when and the framework and I we grew up together in the job so um it's also open source on GitHub and there's a couple of fun things I have on the next page about this um yeah is there anything else I should mention talk about uh uh no that makes sense but yeah remotion sounds familiar it's been a while since I've since I've liked but yeah so that's going to come on the next page then all right so okay Rubicon itself is uh it's an Austrian based software company uh we also have offices in Berlin and in Berlin what we're doing is custom solution development and we build products software products in the public and private sector so our customers I mean you can if you're interested can check all this stuff out on their home pages the Swiss government for instance with 3000 users is running on a records management system we have developed we do a lot of um finding stuff that's uh when you are losing uh things and that's also pretty hard in our in Austria in several departments Department of interior Etc uh and also the really fun stuff for the open source talks um one thing is we have a spin-off signed path that basically is uh been created to solve the problem of how to securely sign code because with code signing you always have the problem where do you secure your private key so it doesn't fall into that uh yeah into your hands and signpath is taking care of securing the key and establishing a workflow and authentication mechanisms and double checks and cards so only the authorized system is able to submit signing requests and why is it interesting also for open source and not just for companies well when you're in GitHub uh we have a program that open source projects uh get their signing for free for instance GitHub extensions is part of this and several others so there's yeah if anybody has applications that are deployed on the desktop and not just on the server well server signing is also important but even more important is the desktop signing uh they should check this out and uh as I said open source it's uh there's a free program so uh it's more spread the word and the other thing is also now not yet 10 years ago Microsoft contacted us about our link provider we have uh with a link um let's see the full lingo it's promotion.link which takes care of processing uh the c-sharp what does the sharp compiler generates the expression trees and gives you a meta model that looks more like direction is sharp and that worked great for writing link providers so identity framework core team contacted us and we did the link infrastructure based on the link with them during the first two iterations of Entity framework core later on most of the third party dependencies move to in-house dependencies with Microsoft so it's no longer integrated but it was a fun ride back in 2014 I think it was yeah wow and got to know a couple of uh great guys at Microsoft via email and probably some talks nice yeah um good that's about uh me and our company and I think we are now yeah to the question why actually core forms and uh John already want me uh some of you guys might be checking in on uh your mobile phones so I've tried to keep the text really large and we have a few things the slides it's not always going to be this large but why do we do core forms because asp.net web forms is not available on.net that's the simple answer there is of course a bit of a long answer and that's um back in yeah so 15 to 20 years ago line of business applications the staff companies are building in-house and spending years and years and years of work on this with smaller and larger teams some may even build products but this um well a lot of people back in the 2000s said hey cool asp.net web forms now we no longer have to build our applications uh using ASP to active server pages or use uh use Perl to build our applications we have a great framework and a great software stack and it feels like winforms development and it's the best thing ever and it was a great time um until it wasn't because oh yeah these days um yeah.net framework is not uh the newest thing along anymore on the Block and then going to a circuit back to this um yeah those applications one thing we have is they called behind and with the model is you'll learn how to build applications while you build applications so um um yeah code behind and business logic uh it's pretty much intertwined and you move from one page to the next it's all you can't really uh politic part without rewriting everything and if you want to rewrite it well the history evolved over decades so most of the truth is usually in the code with these applications and what do you do when you have millions of lines of code and tens of person years of development effort and tens of person years well I've tried to stay on the conservative side um but if you take a 10 people team and let them work for 10 years yeah so what do you do when you need to Port this to a different website on a different runtime hmm well Big Bang migration is um something you also see during public meetings um quite a lot um and everybody always suggested um yeah people try it do they try it successfully experience tells you you need money in Sleepless Nights to be successful because yeah a million lines of codes doesn't rewrite itself in a date and yes uh if you sit there and rewrite your application over the next two years what do you do with the business requirements that come in during this time do we have a moving Target what stuff can you cup etc etc so that's the big problem and that's also something uh the Microsoft migration donut migration is trying to solve of course so the other option is you just don't do it you stick with web forms because Microsoft said hey as long as.net framework is available not web forms will be available and dotnet framework is part of Windows and it's not in discontinued in server 2022 and I don't know what Microsoft is planning but I would be surprised if it's going to be discontinued in what will be the next one 25 27. oh yeah yeah so um and those servers are going to run for the next 10 years anyway so well it keeps getting pushed out right yeah you're going to be safe until uh 2040. and actually 2038 is the isn't 2038 the Linux Epoch ending so you're going to be safe till the end of the world anyway so all is good um except developers they like to play with shiny things I remember when I saw the cool new syntax in c-sharp and then read okay not supported of that framework yeah you can use it in.net framework but we yeah it works we are not sure if we are officially supporting it um all these things and the other thing is and that's not going to be solved before forms but it's still a factor web forms isn't really attracting the next generation of software developers who are fresh of the University it doesn't look this cool and you need to give them something else because if you say hey cool work with the software version that's 10 years old work with a programming language that's 10 years old you're not going to get okay yeah yeah I know I hear what you're saying though sorry you it's hard to hire people and say yeah you get to work with 20 year old technology yeah so um the next one is what is what else can we do uh why don't we just use webforms on.net I mean I've scored the forums I've scored GitHub people backed Microsoft to do something to bring webforms to.net um and developers at Microsoft were very wise and said we do not want to do this because web forms isn't related into the future and it's um technology that's gotten a little bit Rusty over the years and there's many really cool shiny things out there and web forms isn't part of this so uh that's a completely understandable Journey of course some people we are Developers and yeah why don't we just use webforms on.net because it's really cool to use web forms on.net now I mean as you're going into this I mean from talking to the team as they were developing like web forms was built using system.web.dll which was not factored in a way that could be really Advanced well and then also there were dependencies from my understanding with the controls that really kind of assumed they were running on Windows and that also so I'm I'm very curious to hear yeah suspense so uh so back then in the early uh 2019 my colleagues and I we started to ask the question why can't we use web forms on.net because there's we know out there there is this line of business applications people have this need everybody is always talking about it how can we help the world how can we make things better and well it's now 2023 and we have an answer and that's you can use web forms on.net and we that's Rubicon we are calling it core forms so the question is is this the solution um I'm going to show you in a moment then with uh the wingtip toys application I dug out from the internet archive Microsoft published a very interesting sample back in the early 2010s uh it's no longer even heavy little Microsoft download page just on the internet archive um but it is a well it's a more so more involved application than just uh putting together item application with one or two pages so I use this then yeah so now we are going to try and get this to run uh what do I start with yeah what do you do when you want to get this to run the first thing is always a good idea try to update your dependencies you have your domain layer hopefully um you may want to update this to the latest version and the city schema I've didn't put it in the slides it's in the this game on the home page uh you need to get away from uh link to SQL because link to SQL is also a technology that's not available on net and we figure out this Entity framework that's still maintained by Microsoft uh actually The Entity framework not enter the framework is available.net and.net core so it's a perfect way to migrate there you can do it step by step first update your your or mapper and then do the rest if you're using an hibernate for instance um I think they probably had a dual targeted version or a still.net standard I didn't check it right now um so that's always a good idea just make sure you're on the latest stuff and you only have your web dependencies left there's also BTF uh WCF uh with uh quad uh WCF away Library so you got on this front and yeah you can really go a long way then and that's the really hard part you have to update your CS project file and your web config and then your launcher application.net yes yes um you update two files and then you can launch there's a bit of stuff of course you need to check out some the authentication mechanisms you may want to update your login infrastructure Etc uh but your business logic it will just launch so uh just let me check what you have next year we are now off to the demo so the correct question is um should I do it step by step or should I do just launch first and then do step by step is there any consensus on the audience what you should do first yeah let us know do you want to see you can answer in the comments give us your thumbs up or whatever there's a slight delay in the comments um well while they're responding and also let us know anything you'd like to see in more detail in the comments um Michael one small thing in the lower left corner there's a thing where it says sharing and hide you can click the hide oh yeah that is okay yeah foreign all right so all right we have people want to see migrate step by step we we do see some okay some people are saying let's see it crash first and then let's then let's see it migrate it's just it's to see already migrated version yeah uh I'm going to uh the probably the easiest ways to just uh go to the skit history it's also uploaded on the uh website then so everywhere you can check the migration steps but it's easier for the talk if uh we just step to the history then so okay let's scratch it let's crash and burn it first do we have wing tip toys and wingted toys core I hit Ctrl F5 um it starts it's running well the planes are still in the air this is the good old-fashioned wingtip toys from 2010s right yeah yeah so I haven't uh tried every single last feature in there um yeah I'm sorry to say it did not burn yet so and it didn't crash I'm just shutting it down so uh what did I do what did I do um the first thing is uh uh just let me check their realistic it changes with ticket history history there it is few branches already should be it so um yeah and we can also is this actually a good idea to do it like this yeah um yeah the first thing of course is uh sorry that's where is where did it go the articulator so uh um I thought I did this but apparently it did not I have I do this sometimes and then I'll have to reset no it's I did it at a different insta uh Visual Studio instance and uh I forget that I didn't private here my bad um I write Scott hanselman's uh talking points of course on how to do a tech presentation and then I did the rookie mistake so anyway um I have a question by the way um which I think would be useful right up front is this Windows only or is this yeah uh right now we have Windows only um if there is a business case in doing a Linux we are open to it Okay so yeah it is I've committed the link to a sample application basically just what's in the zip file uh actually the entire application is it a large enough for everyone it's a little small but we're not really looking at code right now so I think yeah the code is the code is large and I can also check out the zoom if you need um yeah I did a readme um you can check this then out on GitHub anyway um I share the link in the comments too to the GitHub I upgraded to.net framework 4.8 um yeah some white space formatting Etc a compiler warning that's got introduced sometime during the upgrade from.net 4.5 to 4.8 um upgraded myself party dependencies uh as much as possible are you see each other's Entity framework and then there's also like claims so that's always an issue that I talk when I talk to people about updating is the identity and authentication have changed over the years quite a bit yeah um and um right now it's updated this this thing everything that's Central in the application uh the stuff you put in your Gilbert assax uh the authentication Stuff Etc once the application runs you should tear it out and replace it with modern stuff that's natively supported on sp.net MVC because it's much easier to have an authentication that's really natively integrated with your platform and not um the old stuff that's well a bit smelling out and the one thing I didn't upgrade is mainly for convenience I didn't upgrade the bootstrap because I did not want to check out the breaking changes between bootstrap version 3 and 4 and then five so I just left it there yeah but um right I've run into that recently too bootstrap has changed kind of significantly from three to five it's changed to use modern web standards which is nice but it's it takes a bit of work yeah so right now that's just everything I did on the uh wingtip application itself while it's still full framework then I created my blank asp.net core application um I've already deleted some of the sample data that's uh provided because it needed chocolate error and the index page the default settings Etc you get this when you say Visual Studio at new asp.net project and then I dumped everything from the windows link tips when clip twice application over into printed toys here the only thing I left out was the release and debug config because there wasn't anything in there anyway uh but if you check the Repository there isn't going to be a difference so that's the good thing when putting things on GitHub it's okay of checking if there's somebody trying to play with SIM cards but that's just a vintage application so and now we are going to get to the more interesting Parts okay I disable technical usings uh because uh the full framework application of course didn't know anything about this notable reference types uh got disabled we did enable a bit of notable reference types for core forms actually because I also like to play with algorithm reference types but for the initial migration it's just generating compiler warnings nobody needs um and now yeah the first thing I did is edit in the transform the packages config file over into the Cs project file there is uh the way of uh well the asp.net applicate the Web projects can't be automatically migrated and yeah it's just copy and paste data lines doing some search engine replace and your golden so if I want to count this that's probably been 30 seconds a minute not sure easy the next thing is I switched.net 7.7 Windows because earlier question right now we are still Windows dependent um the quick and direct the answer is it's not because of IIs it's because of well quite more than a handful of native calls esp.net is doing like creating system mutexes and opening file handles and stuff like that um that was built probably in 1998 1999 and survives today so that's what's holding us on Windows um but if there is enough interest in getting to Linux after you've gotten to Windows that's something you should come and talk to us about um the next thing is oh yeah I disabled the warnings uh that a nuget package only has.net framework dependencies and no.net core dependencies uh because we are not going to be able to get rid of them right now and it's just annoying to get a warning for each of these packages then we install core forms and yeah it's just um basically it's this block here the most interesting part is perhaps the microsoft.net compilers toolset I hope this font size is large enough I use a 20 point font with the uh yeah the video Studio likes that looks good so is the microsoft.net compilers tool set because we are using Roslyn uh instead of the original cotton compiler and you just have to plug this line in and it's all good then because we have um a couple of dependencies that are relying on uh system web system web extensions Etc we also need the core forms web NET Framework Bridge I've also done uh for a lot of uh those later comments uh more in-depth explanation directly in the commit messages so you get more details aside from what we have on the official talks then um yeah but basically when you are migrating an application you probably will always be needing the framework page um then and this can be altered uh if you want um but for the basic experience it's the easiest way we went ahead and made sure that the binary layout is identical to what was on a topic framework so it's just a bin folder without the debug and release folder without the framework Target version um because it's yeah it makes things easier then we switched over the web config to the app config file because uh as you might remember the dot net core web applications they are just uh executables that get launched and execute the person.net use the config pattern or the web config yeah so and here what it is for convenience sake because platforms uh still looking for a web config file too we made sure that the physical app config file is also known as the web config file um you can just plug a separate web config file in there too there's actually use cases where you have app config and web config separate uh with totally different content that's when you're hosting it are mounted in IIs um yeah and uh switch to Target framework to 5.0 for the compilation 5.0 that's actually it's just a marker it should it needs to be higher than 4.8 so Microsoft uh so the source code detects this and says okay everything is fine no I haven't seen that yeah um you need to register the tech prefixes uh manually for the assemblies so the system can find them those are the tech prefixes that originally have been in the machine config um yeah and then you can drop the target framework from the runtime there are a lot of these things is of course it's not important that just uh did it step by step so I can talk about it and here you can also see the explanation part um yeah because the runtime is no longer the one who decides which uh Target is happening that's uh the process around it um for convenience sake I switched off the custom errors because I want to know what's happening when something is going wrong seeing a lot of old memories in here yeah that's not a production setting please you should do the cleaner handling of course in the end but if you're just demoing it it's the easiest way um and then uh we are ready at the point where we integrate our core forms in the startup logic um the first thing you need to do is well first thing it's uh you tell it's the virtual path and the physical path where things are you can do things like uh for later on Virtual path is slash Legacy then for instance and things like that um yeah you need to register of course your service and uh you need to tell it that it should just uh map everything to that can be matched asp.net uh it's Legacy asp.net we didn't call it core forms um made it to make more explicit what is meant um yeah so that's uh what you changed in the file in the program file so since it's all just running through through custom middleware basically then at this point can you like use other a in other modern ASP net core middleware as well okay that's actually what the line 35 here is um I've also got some demos where we have razor pages in there um because the big idea is um first thing is you get it to run on the mid core and then you have your I don't know 100 200 300 espx pages uh which are hopefully interconnected but uh not dependent on each other in binary detail and you can just say okay I'm going to build a new feature I'm going to switch this aspx page and move it to raise up okay so you're basically doing the same list they hope as the donut migration with the approx and stuff like that you're just doing it in process so you have one cohesive application with one application tag with this entire domain targeting.net and not some parts targeting.net framework the other parts targeting.net you can even do session sharing I'm going to get to this in a moment um which we think makes the migration process much more easier and much more sustainable because your developers they will be working uh with the new runtime they will be working with the new language features they're just going to have to maintain some SPX Pages along with it but um yeah so you can do that incremental migration exactly and it's not just uh by still maintaining full framework applications inside it but doing it all in the shiny new world yeah so we had a few questions come in I'd like to jump to real quick so so one is uh Victor asking would this work in a Windows Docker container I don't see why not uh you only you don't even need IIs okay all right um Bob is asking does this compile the aspx forms at compile time since they can't do it at runtime oh it's actually it's compiling at runtime okay all right uh the only thing we don't have is uh the recopy detection when you're live changing your aspects files okay wow yeah I'm having to shift gears and think back six or eight years now to think about this okay this one I know you've already answered some of this the advantages of migration but I'm thinking so some of it is like you want to use the new features you want your developers you want to be able to hire developers with modern skills and and that sort of thing what about things like performance or you know are there other advantages that you get um well uh the first thing of course is the innate performance uh improvements from.net I've checked my unit tests and by now random in the same application in full framework versus.net the unit tests running 20 faster so there is some inner performance Advantage there uh what they didn't do is switch esp.net infrastructure from a lot of string handling is what they're doing right now to read all these to the spans to the span model Etc so that's all still in there we didn't optimize uh the code base of uh web forms we just made sure it's running uh partly of course also to preserve the existing Behavior because when you try to optimize something you might break apis you might break Behavior well you might need to break apis you hopefully don't break Behavior but it's always a bit of a well there is a ton of code in there and every bit of code that we don't touch is some code that's not broken so there is not really an intentional need to go and optimize and make sure that the SPX page only consumes half the amount of uh memory during a page lifecycle um that's not really a cold right now okay um there are some questions about asmx and ascx um so asmx um that's that's the wet service is yeah they work okay and then um this one here let me see a question about can it support virtual directories for ascx files uh virtual director is I'm not sure I understand the question completely it's maybe going to mapping in ACX files from another location [Music] there are yeah so with um it's not a it's common there's a virtual file system there's the virtual um oh no so this is separate right this is virtual iOS direct I haven't used my is for quite a while that actually brings up another question too is um does this rely on IIs or is this no okay uh we are running completely outside of IIs we can uh basically what I did you tested up front we adjust an end point and middleware inside of uh classic ESP MVC asp.net core application so we have the same constraints as is.net core as long as we're on Windows right now but um yeah everything else you can do with it um what I didn't uh we had to cut out some of the web config stuff so you cannot do location based configs you have to do these things with the native asp.net score infrastructure you have to do authorization based on their Roots uh you want to do and not uh by pasting a web config file in a folder and telling it okay they are use x Epsilon needs to have write permissions and stuff like that you need to do this upfront that's also about the movie authentication over to uh esp.core and then you get everything of these things out of the box okay um see question so I think this is kind of answered already but the question could could you integrate this with like Azure ad and I think you're talking about that somewhat well it's it's yeah actually ID I mean Sid it's just uh the authentication provider so everything you can plug into esp.net score for authentication that's just working and if the question is can you host it on Azure itself you can also the docker container you can host it like any M esp.net NPC uh asp.net core application I do not see why not I've actually thought about should I get this sampler up on the demo page uh on azure but then yeah well the correct time ran out and also I figured I don't want to talk uh my Azure account yeah okay bye everybody account um by putting up a demo page and uh have half the internet uh loads the reference application of this right now so okay um wow okay I think that's the I think we've gone through most of the questions there um okay so so as you talk through it there's the the steps you showed it's basically update your packages update your configuration and then there's some some odd like I'm assuming there's going to be some odd random things that you'll fix in the application that are depending on I didn't right now find it I mean I'm we're going to get to this just in a second anyway uh the one thing is um to try license uh I've mentioned at the start I think hope uh it's just because we talked about this John up front um it's not open source it's actually a product we do have a trial license um for this available that's simply committed you just tell the system yes I'm using a trial license and not commercially and if I want to use it commercially in production then I'm going to purchase a license [Music] um because we figure out okay the real goal is we want to help those who have to stay on web forms for quite a while that's not the simple small two SPX Page open source project that's the line of business application with uh tens of person years of investment and um yeah with those customers there's of course always the option of a Business Partnership and just paid licenses um so you can easily try it there's the trial license and um when you figure out hey hey cool this works fast um you say okay let's talk business okay yeah they'll probably say you know a thing like we I think we get a little spoiled with dot net core being open source and you know having having a lot of free and open source stuff but this is a significant amount of work to convert this over and then a thing that I think about too is like we want your company to stay around and continue to you know evolve and and maintain this this product too so that's that's good that's true yeah and it's also usually a lot cheaper than uh rewriting your big business application okay a lot safer so um as far as changing concerns um figured out hey cool I missed uh one assembly that's pretty deeply hidden in the dotnet framework ecosystem so I just had to comment up the Google authentication it's an assembly object there is two files and two classes in there you're going to bring it over but it wasn't done for the demo right now um so I'll just also disable technical authentication everything is fine um and okay what else did I do yeah I had to add some uh dependencies uh to make sure the compiler knows what it's doing session State um HTTP module for session state has to be enabled um manually due to the changes with the machine config Etc if you don't do this you'll get another accounts exception when accessing the session um but it's right there in the migration step so okay um yeah okay that's sorry one other question I I don't want to miss this one so how how does the licensing work is it per server per developer um it's uh right now it's uh talk to us uh this we set this up right now is the alpha stage it's uh we almost um the point where we wanted to wait for today's talk and uh going to make the art uh the risk in a date version in the next couple of probably one or two weeks and um the license itself is right now it's a come and talk to us uh we were really interested and that's also something you can shout out in the comments please um in getting uh to know our customers and coming up with the licensing model that works because as opposed to television controls for instance uh who everybody is purchasing um when they are building a small application and they have the candle UI staff some of it is open source and etc etc um we're expecting most customers will come to us and say hey we are a big company uh really big company and we have a line of business applications we are a government entity and then we have a line of business application and um we'd like to preserve our millions of dollars worth of investment and um yeah what can we do about licensing and once we know just which Direction our customers are going to take uh we can better discuss uh according fair price so right now we don't have a public pricing model for this it's really an Enterprise scenario for us right now and um yeah is this something is this something that you've worked with already with some Enterprises like to to implement um I've thought the moment about it and uh no I shouldn't uh be talking about this right now uh there were of course some contacts um we also had contacts and uh before this talk and that's how it all came together with Microsoft itself yeah yeah uh so so and I should say that actually that's how that's how this came together was you were we talked to you about a.net conf presentation and we figured that this made more sense as a community stand up but you were um you were recommended To Us by uh Daniel Roth and David Fowler and several other people as um hey this is a great solution for people on web forms like you said like we've got Enterprises I I I'm kind of heartbroken sometimes I'll talk at a conference and I'll show all these new features and that net core and then I'll talk to people and they'll say I've got a thousand web forms like I I don't know what to do how do we update you know exactly and if you're one of those guys come and talk to us and uh your future might change cool okay good so yeah the rest is just um uh small detail is not part of the application the one thing I want to change uh show you right now is uh bendiga can go back to the presentation that do a couple of uh more information stuff uh probably here is the right point so up to here can I compare this to commits here um that's it I've we have the changes here for the I didn't want to do the big file yeah yeah here's the project file itself of course um we have renamed the web config to app config um with a couple of changes you see in there but I mean that's the conflict file and you need to change it uh to what you need um we have of course changed the originally generated program CS from the.net core application um and yeah okay I've added the soldier from the generated application and I've uh out commented the Google authentication part and that was it actually during the migration I was surprised that I had to change that little bit of code uh that view uh code because I was expecting a little bit more resistance but no it turned out pretty well so that's what you have to do to get up and running in an initial scenario so people are joking a little bit that this took a little more than seven minutes but I bet if you weren't explaining it and if you were going at full speed I bet you could have gotten through the entire migration in seven minutes yeah that's what I forgot to I mean that's always the question do we want to talk about it uh do we just yeah to look at the difference now this is this is really I mean the amount of the amount of work here because so many things change like as people are asking you know talking about I mean with web config and the handlers and the ascx and ASM X and you know like the compilation and the differences in the authentication I mean there's just so many changes you know no it's uh you can use most of the HTTP modules the hdb handlers themselves anyway a lot of the web config you don't have to change the world it's just uh the stuff you do in the web config and stuff you do in the global Asics the stuff you do with HTTP modules um maybe even the stuff you do with your custom rest handlers it would be sensible to migrate those some upfront some as soon as possible um simply because uh the more you are on with these bits on the native part uh the easier it is to integrate with uh pure native asp.net core application parts and most line of business applications they have their thousand platforms and they have one config file one Global Asics you can migrate those that's not where the big investment is going to be because if your big investment is the authentication infrastructure uh your line of business application with a thousand Pages you probably have other problems that the Thousand Pages yeah yeah so but okay yeah and you know what you're doing um really really fast there okay so let's switch back to the talking points and I mean it's uh already an hour now so we can cut out some demos Etc um I'll leave it to you John if you want to skip some of the details uh later on uh because you you know better how much time you should take and uh when interest is going to taper off yeah probably about another I'd say 10 minutes okay then we are doing a quick um yeah that's just a recap of uh the highlights we did I'm going to skip those um session management I also got the democrit um prepared but I'm just going to talk about it right now you can check out the demo online um yeah we we do provide the native asp.net session for web forms out of the box we just have to register the session module and that's it now if you want to migrate your application and you want to start to use this.net core application path tool you might be interested in doing some object sharing between your web forms application and your asp.net core application because the SB looked at core application is just using a key value pair in springform um and if you have for a black context for instance it's uh in the session you might want to access it it's not really pure uh it has the onsides and you should get away from this of course but it might be beneficial in the first run to not go pure with the session just go pure with the infrastructure so you can actually share your session data from asp.net with asp.net core um and for this uh we have a new session middleware it's actually available also standalone but why would you build an asp.net core application from the scratch and then use a Fed session um you have to register it um with that session at the memorization objective yeah important um that's it as I said it's uh in the demo we are going to skip right now I mean I if you have a demo you want to oh okay you can take a little more time I don't want to take a moment for this um because this is also something that's quite cool uh contrary five so that's actually forked from our internal testing Parts because it's uh there's nothing bad to it um yeah here we have the uh test page and here we have the web forms test page I'm going to align those side by side come on do we want to do a not okay let's do it this way [Music] um I'm going into the object test page I'm going to here into the test page right now there are two different identities uh once I start with esp.net core setting the session for instance of the user has logged in and I refresh here uh the session IDs are shared and when I increment my counter here and refresh here okay yeah here we are going from three to four to five to six the refreshing here we are six increment increment yeah so the session data is shared it also takes care of session locking uh all these funny semantics uh read write session enable that uh read write session logging Etc that's all in there um so that's a quick and throughout the demo of the session that's a big deal too when I talk to people that are doing incremental migration it's like great yeah I can get it running but to be able to share State between is especially because web forms applications really generally do depend on session quite a bit right yeah I've read the migration the Donald migration guide and it's okay we serious the session State and uh push the CLS session State between asp.net and the asp.net core okay my session is uh over 100 megabytes I do not want to serialize these different very neat requests so yeah and I did share the migration guide and that does include some of the recommendations on that but it's hard and we argued about it internally in the team we're like do we want to tell them to do this I don't know you know there's like yeah so here is a way you can do it um but for the sake of the application you want to get to a thinner session model of course but it's there um the other thing is authentication sharing there's no demo here um the important part is if you have authentication this means your user submits credentials to the application typically the application sends back a cookie that's the forms of indication cooker for instance that identifies the user during subsequent requests and the infrastructure takes the information from this cookie and Constructor principle object uh when the user request gets to the server now um we have asp.net platforms and we have asp.net core they each have a session cookies and authentication cookie system um wouldn't it be great if you do only have to log in once into your application I'm not sure I think you're in the donut version The Donut migration version there is already infrastructure to use authentication sharing it was added in one of the in the version 3 or 4 I think it was there from the start I'm blank I'm not remembering yeah anyway so we said okay the default version of course is you have separate authentication domains you'd have to have two logins Etc um but you can just switch it over to shared you can even say okay um the user principle is handled by usb.net core uh sp.net platforms is using this uh principle only in read only form then if you try to write it you get an exception and you can make sure all the authentication is handled outside of web forms and yeah that's what you have to do in the startup code sorry the slides slipped in the startup code you just have to switch the option from the default to shared and that's it okay well um yeah third party control libraries there's also a very quick demo uh that's just going to take a moment because that's also something that people are always asking about yeah debugging I've used Stellar examples because we're using it um sorry that's my bad uh oh that's the wrong one Center startup project powder should be here it is if you know telecontrollers this might remind you of something and yeah so we have delay controls for instance just up and running and the only magic you need for this is the.net framework Bridge I've already mentioned it before it also helps to sell party libraries uh as I said uh we cannot uh make a in a guarantees of course that the third party library is going to work um the basic reasoning is unless the other library is doing something really if it it should work um outside of the talk for later on or the uh the home page we have documentation what makes the application uh third-party libraries work uh spoiler alert it has to do with uh properly handling the thread report exception because um dotnet is no longer able to automatically referral threat about exceptions and they have a capture all block anywhere in the code where the state handling of facebook.net is throwing thread report exceptions then you have a problem Taylor isn't doing it there is no reason any control Library should be doing this uh outside of putting exception handling in a place where we wouldn't expect it um but you have to check and here towards either you just try it and see if everything is working or you'll come talk to us and we check out with you if the third party level is going to work um but there's a question if you've tested with syncfusion uh no right now we've trusted tested with Hillary um but as I said that's something you can just write with the trial version um and you can also contact us on the core forms of that homepage uh with small details we are also thinking about making it easy for people to just self-check for this and if it's a hit we might even get the complete Library developers themselves on board um who knows what the future is going to bring um and now we are going to be closing yo the one important message is application.net you have seen it uh there was not much it's more it's not quite uh zero code switch but it's as good as you can get I guess um we have a product home page [Music] with coreforms.net I've also sent uh the link to John yeah and I'm sharing them in the chat just ask for a sample uh there's more on GitHub course is core from swept and they're related assemblies for trial and demo use uh and okay top we have um the docs uh the page is empty tonight we are going to be publishing uh the content uh tomorrow and uh there will be more updates in the future um I also have to check about making parts of the slides probably available um yeah we have the demos um let's help you get started and here is a yeah thanks for joining uh if you want to reach us for call forms directly it's core forms it will become you um that's also where the submission form is going that's on the performance.net homepage when you have questions and again the GitHub page where we also have on the docs page the discussion enabled so if there's questions you can uh about code it's at the missing documentation documentation dishes Etc uh you can contact us there too yes okay wow that's a lot of information this is a huge phenomenal uh achievement I'm I and a lot of people watching are pretty impressed that you were able to pull this off so that's that's really cool yeah thank you very much I appreciate you staying up and uh doing a late evening a nighttime presentation for us too not a problem I mean it's winter right now so it's actually dark outside but this summer it would still be well quite quite quite light outside okay well so I've I've sent the links out in the chat and I'll get those included in the um description on YouTube as well and um and I'm excited about this project well let us know as it progresses too yeah great thank you okay well thanks a bunch everyone for watching and um thank you Michael thank you for having me okay have a good night everyone or a good day [Music] foreign [Music] [Music]
Info
Channel: dotnet
Views: 23,941
Rating: undefined out of 5
Keywords:
Id: T90OXlEKlsQ
Channel Id: undefined
Length: 73min 50sec (4430 seconds)
Published: Tue Jan 31 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.