I am looking to make a change to a web site connected to an SQL server.
as far as I could look at the source files the web page is made in asp with VB (*.aspx, *.aspx.vb, *.ascx, *.ascx.vb - among the file extensions). the issue I am having is that I don't know how was the project created nor which versions were used.
was it a simple web site? or ASP.NET web application? which .netframework version? was it visual studio 2008 or 2010?
the code has no comments anywhere, so it doesn't help me at all.
I tried getting in contact with the previous developer, but he is no longer working in the company. besides the page was created some years ago.
is there a way to recreate the project? anywhere I can look and "guess" which versions I need?
any help is welcome!
Two options.
There is a *.vbproj file among others. This would be a VB.NET VS project file. You can access the project from the VS by opening the project file.
There is no *.vbproj file among others. This would be a VB.NET web site. You can access it by opening it as a "web site" from the VS menu.
The latest version of VS should be able to open any project created with any previous version, in a "worst" case the project would just be converted. I would not be worry about the version of the framework. Plus, if it is a web site, it could be difficult to determine which exact version of VS was used to create it.
Related
We have two ASP.Net projects that we maintain with Visual Studio 2019.
The first project was originally built 10+ years ago and has been upgraded from one Visual Studio version to the next over the years. Everything runs fine.
The second project is a brand new project created with Visual Studio 2019. There are several web forms that we would like to import from the first project to the second project.
The Problem: Those web forms from the first project don't have a "aspx.designer.cs" files - each form only consists of an "aspx" and an "aspx.cs" file. And when they're in that first project everything's fine. They compile and they run fine. If we right-click and go the definition of any of the declarative objects in the "aspx.cs" file a window pops up saying it can't navigate to the symbol - which is fine. Everything works.
BUT... When those web forms are imported to the second project, all of the declarative objects show as being undefined - there's no "aspx.designer.cs" file where they'd normally be defined.
Any thoughts? How can we import and actually use these web forms in the newer project? Do we have to go and manually create that "aspx.designer.cs" file for each web form? There's quite a few of them...
Thanks!
Curt
All these effects are expected. An older/legacy site is represented by the "ASP.NET WebSite" template/structure, while the newer one - the "ASP.NET Web Application".
Check out the following threads to find differences and possible hints for migration (in short - move files as is, correct some #Page directives and code namespaces, switch to the ASPX Design View to re-generate the associated Designer file):
ASP.NET Web Site or ASP.NET Web Application?
Web Application Projects versus Web Site Projects in Visual Studio
I have just downloaded the VS Community 2019 Version 16.3.9 and I can't seem to find the ASP.NET Web Application(.NET Framework) with the C#. It just only starts with the VB script by default. What should I do to get the same thing with C#.
Probably, you did not download the needed tools after installation.
To download necessary tools, launch the Visual Studio Installer (not the IDE), click on modify, there, you will see myriads of tools, just select the ones you need and download. After successful download, open your IDE and choose your desired framework to work on.
Wish you success.
Sorry for adding this as an answer even though it will help you but nevertheless, I should have added it as a comment but I have less than 50 reputations
I'm working as frontend developer in a company which uses asp.net for its website. I usually work on mac and I need to setup my localhost to work on the website, but something's wrong with the project. They provided me the folder with all the files (aspx, aspx.cs, dll etc), and I'm supposed to build my own solution file. Visual Studio for macOS doesn't give me the possibility to create an empty website project (VS for pc does), or maybe I'm selecting the wrong entry. What am I supposed to do?
I tried to select Empty ASP.NET Web project, but It doesn't work, all the vars and methods from aspx pages are not detected in aspx.cs. Same with Web Form. I can't set up anything and the solution is not working.
Everyone at the company uses Windows and they can't help me.
What I have to do to import it in the right way?
I'd like to use VS Code if it's possible. This is the first time with asp.net.
Thanks in advance
The main thing is that ASP.NET Web Forms is obsolete. I guess they stopped to support such type of solution a long time ago, only critical crushes. If you really want to use mac for ASP.NET Web Forms you should install Parallels VM with Windows 10 and Visual Studio on board.
I am following this setup tutorial
https://docs.asp.net/en/latest/tutorials/your-first-aspnet-application.html#create-a-new-asp-net-5-project
And have come across a problem. In the tutorial the instructions are as follows:
Start Visual Studio 2015. From the File menu, select New > Project.
Select the ASP.NET Web Application project template. It appears under
Installed > Templates > Visual C# > Web. Name the project ContosoBooks
and click OK.
This is fine, but in the next step :
In the New ASP.NET Project dialog, select Web Application under
ASP.NET 5 Preview Templates. Also, make sure the Host in the cloud
checkbox is not selected and click OK.
I am seeing no ASP.NET 5 Preview templates!
The only thing I am noticing is that my Authentication states No Authentication but I am signed in so I am not sure what this means or whether or not this is a factor.
The version I have installed of Visual Studio is "Community 2015".
I have already gone through the perquisites as outlined in This Article.
I am hoping that someone with a more thorough knowledge on the topic can help me out as I have not been able to find any threads etc. of the same issue or what could be causing the Templates to be missing.
Asp.net 5 templates no longer exist - they are renamed to Asp.net Core: ASP.NET 5 is dead - Introducing ASP.NET Core 1.0 and .NET Core 1.0
So, when creating your project, instead of picking "ASP.NET Web Application" as it is in the video - you would select "ASP.NET Core Web Application" and then on the next page those 3 templates (Empty, Web API, Web Application) are the same as the video's asp.net 5 preview templates
VS 2015 Preview is going under ASP.net Core web application. If you cant see that one under templates you may go to this site and download .NET Core 1.0 for Visual Studio then install.
I have concluded, by following another stackoverflow question on How to check the ASP.NET version loaded on a system as I noticed that the templates were categorized in the ASP.NET versions (4.6.1 & 5) in the tutorials but mine were not.
So I then checked and my files in C:\Windows\Microsoft.NET\Framework are as follows
Revealing no v5.0 directory. I rectified this and now all of the templates are available
AMENDMENT:
To fix it:
I went to http://www.asp.net/downloads and downloaded ASP.NET MVC 5
I ensured I had Developer Tools checked in the download process.
This issue was now resolved - As I then had the MVC 5 template files. Because I downloaded them, so I had them... and no longer didn't have them.
ALTERNATE FIX:
Furthermore From my research, some people had not included Developer Tools. To resolve: go to old mate 'Add or remove programs' and find your Microsoft Visual Studio 20xx install, 'change' and install Microsoft Web Developer Tools
I have had the same problem but it is actually even better because "The new dialog enables you to change the default authentication options for many of the templates. For example, when you create an ASP.NET Web Forms project you can select any of the following options:
No Authentication
Individual User Accounts (ASP.NET membership or social provider log in)
Organizational Accounts (Active Directory in an internet application)"
check out this >> http://www.asp.net/mvc/mvc5
I recently had this problem and finally fixed it by uninstalling (control panel -> uninstall a program) Microsoft.NET Core and Microsoft Visual C++ redistrutable 2015 (x64 & x86) and then re-installing the asp.net core rc2 (https://www.microsoft.com/net/core#windows or possibly check Tools->Extensions and Updates->Updates inside of Visual Studio).
I uninstalled the Visual C++ redistrutables because I kept getting an error when trying to re-install asp.net core rc2. It kept telling me that it already existed even after I had just uninstalled it and the update was showing in the "Extensions and Updates" section of Visual Studio after trying (but failing) to install the asp.net core rc2 update.
Problem 1 : I am not a web developer, but since people think all developers can do everything, I've been asked to look at a company's internal web site for the purpose of updating it.
Problem 2 : The company does not have the original Visual Studio project for the web site.
Question 1 : Can the files running the web site be used to manually build a working VS project?
Question 2 : Is it better or necessary to rebuild the web site from scratch?
Two are two ways to deploy ASP.NET:
Compile project and deploy aspx pages and dlls (I'm talking about webforms here, not MVC).
Source code (dynamic compilation available starting Framework 2)
In second case you can download all code, create project and add all files there.
If you have only complied version, it's more complex. You can get aspx files, but for code behind you can use for example Reflector or DotPeek.
PS. If you have ASP files, it's classic ASP, you have all source inside ASP (VBScript), so you can get everything and edit in VS or even in notepad.