How can I run a classic asp site (not asp.net) from within VS2010? - visual-studio-2010

I am just putting together a quick non-cms site. Even though it's non-cms I would still like to use includes with it. Is there an easy way for me to run a classic ASP file in VS2010 without having to install/configure IIS?

I was able to create a new web site project and configure it to use IIS Express. I added the .asp files to the project and it served them correctly.

Related

Azure Web Site not updating via Visual Studio Web Deploy

This may be a basic question, but I've searched for a little while and couldn't find anything specific to this.
I bought a domain and created the web app in Azure for hosting, and set up the DNS so that it's linked to the Azure Web App. Using Visual Studio 15, I opened the website via the FTP connection settings found in Azure, and was able to create files, edit the html, css, etc. Going forward, I wanted to use Web Deploy with Visual Studio to push new builds of the code up to the web site. I downloaded the publish profile from Azure, and imported it into a new visual studio project. I also copied all the previous files over(it wasn't alot). I got the correct Web Deploy settings and successfully published the solution to the Web App in Azure. However, it never updates the code with my new changes. When I look at the site in Firebug it still has the same files/code that it had when I edited it via FTP.
Any idea what I'm doing wrong?
I followed your steps and everything published perfectly for me. Did you try to simply refresh the file list to make sure Visual Studio is seeing all your files? Are they included in your project?
Also, when you go to publish, on the 4th step labeled preview, try to hit "start preview" and see if it detects any changes.
Also, could you tell me a bit more about your project? Is it a website project folder, mvc solution, etc?
You could try to clean the website to make sure your new files are getting deployed.
Clean Windows Azure Website

How to precompile ASP.NET 4.0 to a Single DLL with VS 2010

I recently upgraded from VS 2003 where I was working on a ASP.NET 2.0 website to VS 2010 where I have migrated to ASP.NET 4.0. So far it has been a big headache to get my site compiling with the new version. One problem was that my aspx.cs pages could not find the shared code libraries in my project. I solved this by moving my shared code to the App_Code folder (if there's a different/better way to do it please let me know).
Another issue that I am finding confusing is with pre-compilation. With VS 2003 I could click the build project button and it would precompile my site into a myweb.dll and myweb.pdb files. Now I'm having trouble doing the same in VS 2010. When I build the site in VS 2010 the dll is not created. I did manage to find an option to "Publish" the site which takes forever (like 2 minutes) and involves duplicating the site to another folder. This would have been acceptable but instead of making the single DLL file, it makes a bunch of files: App_code.compiled, app_code.dll, App_code.pdb, App_global.asax.compiled, App_global.asax.dll, App_global.asax.pdb, App_Web_lrpcway1.dll, App_Web_lrpcway1.compiled, App_Web_lrpcway1.pdb.
The application works - I can deploy it with all these files. However, I'd really like someone to explain what are the extra files and if there is a better way how to do it.
Thanks
This is the difference between a website and a web application.
You can convert your website to a web application to have it
behave more like you are used to.
The files in appCode are compiled when required to run and thus
does not provide dll.s in the bin/debug folder, but they should
be created when the application actually runs (but it is not
put in the same location).
Here is a nice write up about it Link
You can use the ASP.NET Merge Tool to combine all of the little DLLs into one big one.
http://msdn.microsoft.com/en-us/library/bb397866.aspx

Sharepoint 2010: Web parts inside web templates

I created a site in Sharepoint 2010 and exported it using "Save as template". That created a .wsp which I imported into Visual Studio 2010 and created a solution. That solution contains a web template (which is just an onet.xml file) among all the site pages and assets. So far, so good.
Now, I developed some web parts and added them to the project. Then I compiled and packaged everything, created a site in Sharepoint by selecting "Select template later", uploaded the .wsp into the site, and activated it. At that point all the webparts are created, and also the web template. So I go to the home page, and create the site with that template. But when the site is create from the template, all the web parts are deleted and replaced by Sharepoint basic web parts (Content editor, page viewer, ...).
Is there a way to include the web parts in the web template? I'm sure it's possible editing the onet.xml, but I'm not sure how.
Thanks in advance
Have you tried manually setting up your web part page after the deployment? Then you can export the site as a template and then look at the resulting onet.xml file. That should give you some clues about the changes you need to make.

can i use visual studio 2008 for a regular asp project

i have taken over an asp project from a friend and he was basically just using notepad++ to develop. I would like to use visual studio 2008 but there is no project file or solution file at this point, just a bunch of asp pages and some images, css
the other trick is that he will still be developing for a bit but doesn't want to use VS.
what is the best way to "upgrade" this so i can use VS ide features and he can still use notepad++ without any issue?
EDIT: Thanks for the responses. One additional request. We will ultimately be looking at migrating this to an ASP.net mvc site. Would that change any of the answers below or should i start from scratch when that happens in terms of vs projects solutions?
Yes. We are currently using it that way to support a legacy .asp application. We have a project in one of the solutions for the .asp pages.
edit:
In response to your edit I wouldn't see a need to change anything when migrating to MVC. You'll be adding new project(s) to your solution containing the .asp code. If anything, having it all in one place might make your life a little easier during the transition. Our ASP.net site(s) are in the same solution as the .asp project.
edit (part deux):
Using Notepad++ should present no issues. The edits would be to the .asp files (and .css, etc), not to the VS .proj file. I often use UE to edit the .asp files if I don't need to open the IDE. Assuming you're using a source repository of some sort...
Just create a blank solution (New Project > Other Project Types > Blank Solution) and then include all of the .asp files and any other relevant files.
You can just do File > Open > Web Site... and point VS at the folder containing the files. That should let you just edit the files. I say should as I don't have a classic ASP site to test this on.
When you start the MVC app, I'd start that one from scratch with a new project and then use your existing asp pages as starting points for your views.

Web Application within a Web Site in Visual Studio?

Visual Studio allows you to make "Web Sites" and "Web Applications", but, inside a project, can you have one within the other?
Say I have my website "www.mysite.com" and I have an application called "BudgetCalculator". One the production server, this is supposed to be located at:
www.mysite.com/BudgetCalculator
And the BudgetCalculator app contains links back to other parts of the website, like "/page1" and "/page2".
However in Visual Studio, when they're listed as two different projects, they're on the same level. When I fire up the debugger for the BudgetCalculator app, those links aren't going to point back to the main website, like they should.
Is there a way around this?
One solution would be to stop using the built-in .NET Web Server.
Use IIS, create one site, and make your Web App a Virtual Directory inside of the Web Site.
A project cannot host/contain another project in Visual Studio.
You can however create a project that sites in the directory of another higher level project when you create it, however they may not be directly linked, so you couldn't debug them both at the same time.

Resources