I have a C# web application developed and web deploy ready - meaning I have the WebApp.Web.zip file ready. I have verified that manual import of this application in my IIS 7.0 manager works and I am able to run the application in the browser.
Open IIS Manager (cmd->inetmgr), and explore the "Sites -> Default Web Site", and click on "Import Application" on the Right menu under Deploy. Browse to the path of the AAA.Web.zip and click "open". Go through the Package Import wizard. Click on "Browse *:80".
I now want to programmatically do the import of this application in the local IIS Server. Could you help me with some pointers?
So If all that you want is to host your WebApplication in IIS, and you don't want to do it all the way manually.
There is a neat way to do so,
Create a WebSetup Project. i.e. Add a New Project into the Solution of your Existing WebApplication i.e. inside visual studio, Add New Project, go to
Other Project Types >>Setup And Deployment >> Visual Studio Installer >> Web Setup Project
Just add Primary Output and Content Files of your WebApplication to the Setup Project and you are done. All you have to do is to build your solution.
And inside the bin folder of your Setup Project, you will get an .exe, which upon installation, hosts the WebApplication in IIS.
see more about creating a setup Project in visual studio
atleast it is cleaner than WebDeploy Command Line Syntax
Just use the webdeploy command line in your buildscript or from a Process object
http://technet.microsoft.com/en-us/library/dd569106(v=ws.10).aspx
Microsoft basically doesn't let you hook in with an API, there are a few ways to hack through it, but honestly you'll be better off using the command line
see this old answer
Related
I've developed a website in ASP.NET C # in Visual Studio 2013 (no database), for a company. This company wants to replace its current website with the one I've developed. This site is located on the server of a telephone company. How can I replace the old site files with mine, ie, what do I have to do to get my site up and running?
I tried to follow this solution: https://support.microsoft.com/en-us/help/326356/how-to-deploy-an-asp-net-web-application-using-the-copy-project-featur but in step 1 from "Steps to Perform a Copy Project in Visual Studio .NET", the "Copy Project" command is not available.
In visual studio solution, Right click and select publish
in the publishing dialog, select publish to local directory and obtain the deployment files. then place it in your IIS (in a new website) and make sure everything is working. once you are comfortable,
backup your existing website's files ( zip would be a easy and fast option)
remove existing files
place your files( published files) with old files.
that's it and for troubleshooting(if any)
set custom error mode to OFF How to set web.config file to show full error message"
carefully read the error and try to understand what the error message. and configure your website accordingly.
Just take the leap of faith...
I have inherited a asp.net project that i'm trying to incorporate into our continuous integration tool. I've successfully got other C# web applications to compile via msbuild and into the CI, but this project seems different. It has no .csproj / .sln / .vsproj to open, and I open the project in visual studio 2012 via "Open Web Site"
Normally, the dev's will just run "Publish Web Site" via visual studio, and this is the process that I want to run over command line so that I can get it into our CI.
A lot of SO answers involve the .sln or .csproj file which I don't have, and also a publishing profile, which I don't have.
Any ideas or solutions on how I can get this project to publish via command line?
I've been looking around and other than: http://msdn.microsoft.com/en-us/library/31kztyey.aspx I have found no information on how to publish a Windows form application I have written.
I have managed to publish and then install my application on my local computer, but not in the way I had intended. I was hoping to be able to zip up the folder containing my published project and upload it somewhere, at which point people can download the zip file and install my application. The publishing wizard doesn't seem to be able to publish in such a way, or if it is, it is fairly unclear.
Can anyone point me in the right direction here? I can also clarify what I would like to do if need.
You can create Setup Project ( File-> New -> Project -> Other Project Type -> Setup and Deployment -> Visual Studio Installer -> Setup Project ). So, in Solution Explorer, you can add existing project. After add your project, you can add your program output in File System window( Right click on Application Folder -> Add -> Project Output ... ), so you select your project from Project ComboBox ). After adding your project output, you can build your setup-project and you will have your setup file in your setup-project.
For more information you can check :
Steps to Create Setup and Deployment
Setup Projects
Try this way: ClickOnce (Too simple, free, many ability like Update )
Edit : Absolutely there are many ways, also you can use third party software (like InstallSheild). and Look at Different Windows Installer and ClickOnce
You can create a setup-project - with this you can simply compile a setup and deploy all the setupfiles/msi and the user can install from this.
The development phase of my project has been completed and now I want create a setup file.
What shoud I add in Application Folder in File System section ?
Where and how can I add my icon of project, database, recource and essential dll file?
In Visual Studio, you add a setup project application to your solution.
Setup is a project type, so it's like adding another .exe.
Visual Studio has a wizard that takes you through most of the steps.
Well if your question is like "How do I create a setup of my project?" You should try reading some of the tutorials on internet:
Creating Setup and Deployment Projects in VS.NET
Setup and Deployment with Prerequisites Included in VB.Net 2008
Serial Number in Setup and Deployment
Every time I use Setup & Deployment to create a new Web Setup, and run it (after edit all the nice things in the properties), the output is always a copy of the Web Site project...
How can I output a PreCompile version of the WebSite project?
What I did was, publish the Web Site (so I get the precompiled version), add this new precompiled web site as an existing Web site to my solution and add it to the content output of the Setup...
well, the idea was good but I get an error saying:
"This application is already precompiled."
alt text http://www.balexandre.com/temp/stackoverflow_precompiledquestion.png
:-(
Bottom line is that I just want a Setup file that gives me the precompiled version of my Web project, how can I accomplish this?
I see you tried the standard Web Setup project from VS.
Scott Gu's blog post takes you to this page:
Visual Studio 2008 Web Deployment Projects
which is a plugin for Visual Studio that activates an additional "right click" option to any Web Site project to add such a deployment project. You can see here what I created.... And the output is a pre-compiled web application. Now, if you add a regular Web Setup project to your solution, and point it to the previously created Web Deploy project as its content, ... I got a valid build, no errors and an MSI file was created...with dlls inside it.
http://img222.imageshack.us/img222/6177/71881923mj9.jpg
I hope this helps you.
I was searching for this solution from google for long days. What i did is i precompiled my website to one folder and added that folder as a new website to my
solution(While adding it will give a warning message that it was already precompiled content. No probs). Now add this project output to the my setup project and one more important thing is in my web deployment project i just disabled Building of my precompiled
website.
I just got my thinks working. If you want you can try that.
Regards,
Rousseau.A
you may be having "PrecompiledApp.config" file in the root of your web application (please check in solution explorer).
I faced this issue and removed "PrecompiledApp.config" from solution explorer and solved the issue.