Last post Nov 02, 2020 08:30 PM by bruce (sqlwork.com)
Nov 02, 2020 03:26 PM|bank5|LINK
One of our websites is a large, old web forms (VB) website project so there are no project or solution files and it gets compiled on the fly. We don't have the resources to rebuild the entire thing, but we would like to add some features and start rebuilding
parts using ASP.NET Core (C#) or ASP.NET 4.X Web Pages. Is it possible to add a newer ASP.NET web application to a website project like this? Hopefully it's possible, if not, maybe we could use iFrames?
Nov 02, 2020 04:26 PM|bruce (sqlwork.com)|LINK
while you can mix MVC (net 4.*) you can not mix core. you will need a separate project and website for the asp.net core code.
if you decide to create a .net core site, you can either use iframes, separate pages or proxy one site from the other. One issue with using .net core, is that you can not easily share session, and authentication may be an issue.
note: while its possible to add MVC (4.*) code to a .net website, you would be better first converting the website to a web application. see:
also if the site is really old (.net 2.0) you will need to upgrade some the webform .aspx code to the newer 4.* syntax.
Nov 02, 2020 07:45 PM|bank5|LINK
Thanks Bruce. Based on your feedback I'm leaning towards 4.X and not core. The site has been upgraded to the newer 4.* syntax but because of its size, I think it would be a big undertaking converting the website to a web application. For example, there
are a bunch of classes that get dynamically compiled in the App_Code folder. I'm not sure the best way to handle those if I convert everything to a web application.
Because of complexities like these I'm thinking iframes could be the simplest route to start with.
Nov 02, 2020 08:30 PM|bruce (sqlwork.com)|LINK
I've converted large website projects to web applications. It only takes a day or two. The appcode folder is simple. just create a new folder (say AppHelpers), add the files.
when I convert, I create the new project. then add the appcode files, and compile. then I do the global.asax file. then add batch of aspx files. and right click convert.
the biggest issue is aspx files that don't convert/compile. they probably don't work in the old site also, but you need to check.