How to: Create an asp.net Project from Existing Code Files - asp.net

I have a source for an asp.net project (with vb.net behind). Is there a way to easily create a project for it? I know that I can just copy and paste the source into a blank project, but I noticed that e.g. VS 2013 has functionality "Project From Existing Code". But it seems like it cannot create an asp.net project. I wonder if there is something new that I don't know which would let me accomplish this task.
Thanks.

There is a way to do it but like the comments stated if you want to do it fast then just create the empty project and pull the files in.
Here's how you create the project by using the files.
You can go to IIS and create a website
Give the site a name
Use the file directory that your files are in for the physical path.
Choose a port to display the site on
Open up Visual Studios and select File > Open > Web Site
Make sure Local IIS is selected (if not click on Local IIS box)
Select the website name you just created

Related

Create actual physical folders in Visual Studio solution

I would like to follow ASP.NET 5 solution structure from here https://gist.github.com/davidfowl/ed7564297c61fe9ab814
How do you create actual physical folders in Visual Studio 2015 RC solution? How do you create for example "tests" folder, that is physically at the same level as "src" folder created by default with a new ASP.NET 5 website project? And, of course, I would like to be able to place projects into it.
There is a solution:
Create "Solution folder" named "tests". This will create logical folder, but not physical one.
Right click to the solution folder and open a new project dialog. But before you click OK, you have to change a project location to your desired physical folder and VS will create it and place the project inside.
This is not very intuitive, but it works.

How to add project (.sln) into existing asp.net website files

I have tried almost all methods to make new project using exisiting files of asp.net in vs 2010 but i failed to run on new machine.
each time i did this it shows error that "could not load project from d:\path name" etc etc that is my last computer path name
Now what i am looking for , i have a website and all asp.net pages but i am unable to see its working by single click on project exe .
please help me out that how i can make project using existing asp.net files
remember : i have only asp.net pages to laod directly into visual studio but i want project exe so when i click on .sln file i can see site working.
In order for it to work you need to keep in mind you have to use original source code and not pre-compiled code from the server. To import your old files into a .sln file:
Create a New Website/Web Application
Add Existing Item Select item(s)
that you are trying to import into this new solution.
Make sure you dont add any .vbproj or .sln files from the previous project.

asp.net how to hide code in dll files

Is there any way to protect the code written in the cs files? Also for the database?
We designed a website and we're considering publishing it and we have to deliver the project as a college project, but we want to protect the code so we can secure it in case we publish it.
We are already considering publishing the site and then giving them its url but it's our last option.
What can we do in this case besides publishing the site?
Thanks :)
To compile your project into a single dll file, you have to use the Publish Web Site function of Visual Studio. I use Visual Studio Express 2012 (version 11), so if you don't have this version, then there could be slight differences.
Click on the "BUILD" menu, then select Publish Web Site
Create a new Profile if you haven't done so.
Click on 'Connection' on the left side menu of the window, and choose File System to save it on a folder on your computer
Click 'Settings'. Open up File Publish Options and select the following:
Click on the 'Configure' link of the second option in the above screenshot. This will open the following window. Here you can play around with the merge settings. I've tried the 3rd and last option on a test website, and the output was similar. The text (testwebsite) in the textbox is for the name of the DLL file.
Click 'Publish'

Visual studio 2010 creates new project every time I open a web site

I am working for a client who has a number of ASP.NET web sites (as opposed to ASP.NET web applications). Each time I open up one of these websites in VS2010 I have to tell Visual Studio to use IIS Express, and for older websites I have to tell VS2010 that I do not want to convert it to .NET 4.
I can see in the title bar, once the website has been loaded, that a new solution file is created each time, because it displays "[websitename] (NN)", and each time I load the web site NN increases by 1.
It would be handy if I could simply open up the solution file directly, or alternatively change a setting somewhere that tells VS2010 to use the existing solution file for this site.
Does anyone know if this is possible?
Here are the steps required to achieve that:
Add an empty solution by clicking File -> New -> Project -> Other project types -> Visual Studio Solutions
In your solution explorer which should show nothing except the one entry for your empty solution, right click on that solution entry, click Add -> Existing website, then find the existing website in your file system and confirm.
Done.

Making a website/project Portable - Check List

Good evening/morning/after/noon.
I have an ASP.net 3.5 website and I am using vb.net in VWD 2008 Express, I am also using MS SQL Server 2008 Express, I used ajax tabs and a textBox characters counter control developed by https://web.archive.org/web/20211020202742/https://www.4guysfromrolla.com/ The database is attached with MS SQL Server Management Studio Express and the files are stored in the SQL default "Data" folder.
The whole project's code and forms are stored in a folder in my E drive. I need to hand the whole project to another coworker who have to finish it, please describe in steps how can i make my website portable (like i can put it all in a folder that he can carry around in his flash disk).
One more thing, I already finished my side of the project, I need to ship it out to this other programmer.
Can anyone suggest something like a: Checklist or Must Do list to achieve this?
PS: I have had a problem trying to move the project from one server to the other, the project seems to look for the dlls of the AJAX control and the textBox counter where i originally unzipped the folders in which they cam in, which i think was on my desktop, although when i added those controls to the Tools tab, i created a new tab, then i choose the dll from the where i unzipped the controls source code, aint that enough?
Thanks in advance
I use the following folder structure for all my solutions
solution
docs
libs
scripts
sql
src
docs - contains all documentation
libs - contains all non GAC'ed framework dlls that the solution uses. You should copy the dlls in here first then reference them this way they are a relivive reference from the src folder.
scripts - build scripts for designers who don't have VS installed and the build server
sql - all sql scripts for creating your database
src - all source for the solution we break this folder up into the following file/folder structure
solution.sln
project1
project2
website1
website2
etc
Now when you copy the solution folder everything is relative so will work.
I'd advise that you add your project to source control, I'd recommend Subversion/SVN and the TortoiseSVN client

Resources