how to Create Setup of Web application in asp.net? - asp.net

How to Create Web Application Set up in asp.net ?
I have a web site in a Visual studio.I want to create a single web setup project which should install the web site.So how to create a single web setup project which supports multiple web application installation?

You can use Installshield to do that. When you go to add new project you will see that option under Other Project Types --> Setup and Deployment
http://learn.flexerasoftware.com/content/IS-EVAL-InstallShield-Limited-Edition-Visual-Studio?lang=1033&ver=prem

There are many 3rd party tools that can perform this for you (We use Anthill Pro to deploy between our various environments).
I've used the full version of InstallShield in the past but there was a bit of a learning curve to get it right.
The free alternative is to use the Web Setup Project template in Visual Studio (This uses the 'lite' version of InstallShield I believe). You can also check out this link, which describes many different options for you to deploy your website. Extract from the last link:
Visual Studio, ASP.NET, and IIS provide tools that can help you with
the process of deploying your web application or web site. Some of the
Visual Studio tools work only with web application projects, while
others work only with web site projects. (All MVC projects are web
application projects.)
Hopefully this walkthrough should provide you a good starting point should you choose to go down the Visual Studio route.

Related

How to run an ASP.NET Framework project from a script?

I am trying to simplify some of the start-of-day tasks that me and the other developers must do at my company. In order to get our local dev environments running, we have to go through a series of steps: starting VMs, APIs, and other web servers. My goal is to write a script to automate all of this.
The only part that is giving me difficulty is one step in particular where we must start a gateway API project written in .NET Framework before starting the other microservice APIs written in .NET Core. The .NET Core APIs can easily be started via a script which we already use, but I was hoping to make the .NET Framework project part of this script too, which must come first before the other .NET Core APIs. Currently we open the .NET Framework project in Visual Studio, press Run, then run the script to start the other .NET Core APIs.
Does anyone have any pointers on how I can automate starting the .NET Framework project?
I assume you're using IIS Express for debugging, which means you have to open Visual Studio and start debugging for your website to start.
I suggest you install full IIS (not Express) on your machine. It has the benefits of:
You can still debug in Visual Studio
The application will always respond to requests, whether Visual Studio is running or not.
To do this:
In the Start Menu search for and open 'Programs and Features'
Click 'Turn Windows features on or off' on the left
Select 'Internet Information Services' in the list, with all the features you want (pretty much everything under 'World Wide Web Services' and at least 'IIS Management Console' under 'Web Management Tools')
I assume from there you know how to setup the website in IIS Manager. Do it the same as you would on a production server. Just point the site (or virtual folder) to where your code is.
In your Visual Studio project:
Open Project -> [Project Name] Properties...
Click 'Web' on the left
Under 'Servers', select "Local IIS" from the dropdown
Make sure the 'Project Url' matches where you set it up in IIS
There is also a "Create Virtual Folder" button there in Visual Studio that can help you set up the site, if you prefer.

Visual Studio - deploy existing website/webAPI to Azure

In my VS(2015) solution, I have a ASP.Net website and a WebAPI project. For normal development, I want to use IIS on local machine for dev/test. However, I also want the option to be able to deploy the same sites to Azure on demand.
I know I can 'Convert' an existing project to Azure project from VS. But then it'll become a cloud project only. I don't want to convert it to cloud project.
Is there a way I can use my existing projects in VS and deploy/publish them to Azure?
Thanks
You don't need to "convert" your project to an Azure project, you can simply create a publishing profile in Visual Studio and push the build to Azure.
The Microsoft documentation explains how to do this, follow the steps from the "Publish to Azure" section onwards.

How to automate deployment of Web Application in Visual Studio 2010?

I have been trying to use WebDeploy in Visual Studio 2010 to deploy our Web Application but it deploy the whole code as it is. Is there an option somewhere like before "Allow this site to be updateable" for WebDeploy?
EDIT:
Ok, there is no option available for Web Application and only for Web Site projects.
For Web Application projects, you could add a Web Deployment project which helps you getting a precompiled version, but it doesnt automatically publish it to IIS. Any way to automate that?
Thanks
u can use the options in the publish website as to get 1. make my site upgradeable 2.make different assembly file for each page 3.pre compiled version when you right click your web app and publish it. Hope i got it right

Do I have to convert my website project into a web application project to migrate to Azure?

I have a current website project that I need to migrate to Windows Azure. Back in 2009 we had to convert the website project to a web application project. Is that still the case today?
Your life will probably be a lot easier if you use web application projects, but you can use website projects. At the very least, you can use cspack from the command line and point it at any directory. You can also use the physicalDirectory attribute in ServiceDefinition.csdef to point to an arbitrary directory. That directory can be your website project.
I'm not sure if there are better ways from within Visual Studio to use a website project as a web role.
You can add any project to the Windows Azure Visual Studio project. I like to create a new Windows Azure project first, and then add existing projects to it (rather than the other way around).

Is it possible to develop a Web Service using Visual Web Developer 2010?

Is it possible to develop an ASP.NET Web Service using the Visual Web Developer 2010? Or I must use Visual Studio itself for creating the Web Service?
Thanks,
LS Developer
Yes. But for future understanding, please consider these notes:
Creating Web Service actually doesn't need any IDE. You can create a web service (or an entire web site) using Notepad. Therefore, Visual Studio is just a helpful tool for you.
Creating a web service based on .NET Framework actually needs you to compile your code. Therefore, you can again create the web service with notepad, and compile it using C# or VB.NET compiler, deploy it and use it.
Visual Web Developer 2010 (Express) is just an IDE. Web Service on the other hand is an Item Template (which writes the basic infrastructure for you). But even if you don't use that Item Template, you can create a class, inherit from WebService and create your web service.
Good luck.
Yes: http://msdn.microsoft.com/en-us/library/8wbhsy70.aspx

Resources