how do i publish my asp.net project to my local iis? - c#

I've been looking and I've seen a few how-tos but I find them to be somewhat confusing.
Does anyone have a good tutorial or step by step writeup that's easy to follow for a newbie

In Visual Studio, go on project properties > tab web and check "Use Local IIS Web Server". Then, it will ask you to if you want to create the virtual directory, answer yes and vouala...you create a IIS virtual directory, when you run your application, they will run on IIS.

If you're just looking to run your application under IIS, setting up a virtual directory is pretty straightforward. If you're looking to test publish a build, the web deployment project is the way to go (you can do it from the command line and in VS.Net, it enables a "Publish" right-click option).

A good place to start would be looking into web deployment projects.
This link is for VS2008, but they also exist for VS2005
VS2008 Web Deployment Project

You can publish your web app to an iis website. Click on Build > Publish Web app and select to publish to Local IIS website. Job done.
For a local development environment this is fine but if you want to deploy to a test or staging server than look at another solution such as the Web Deployment project or use nant or msbuild.

Related

Azure DevOps Continuous Integration with asp.net website project instead of web application

I have a hard requirement from the developer to use a website project instead of a web app project for a .net deployment. I am able to connect and use continuous integration just fine with a web app project, but when using website, it fails to find the compiled files for deployment:
#[debug]check path : D:\a\_tasks\PublishBuildArtifacts_2ff763a7-ce83-4e1f-bc89-
0ae63477cebe\1.142.2\task.json
##[debug]set resource file to: D:\a\_tasks\PublishBuildArtifacts_2ff763a7-ce83-4e1f-bc89-0ae63477cebe\1.142.2\task.json
##[debug]system.culture=en-US
##[debug]PathtoPublish=D:\a\1\a
##[debug]check path : D:\a\1\a
##[debug]ArtifactName=drop
##[debug]ArtifactType=Container
##[debug]system.hostType=build
##[warning]Directory 'D:\a\1\a' is empty. Nothing will be added to build artifact 'drop'.
Looking at the build process, it's compiling a copy of the deployment to the PrecompiledWeb folder instead of the debug folder, which seems to explain why it cannot find the results. Has anyone had luck deploying with a website project or have you run into the issue above?
Azure DevOps Continuous Integration with asp.net website project instead of web application
Since the project is asp.net website, you may need use the website.publishproj file instead of the .sln file when you publish the asp.net website project with MSBuild.
The command line like:
msbuild.exe "<PathToTheFile>\website.publishproj" /p:deployOnBuild=true /p:publishProfile=WebsiteTestDemo /p:VisualStudioVersion=1x.0
With this setting, MSBuild does not create the PrecompiledWeb folder and the publish uses the setting in the profile.
Check my previous thread for some more details.
The website project the publish process is not plumbed into the build
process. For website project since there is no formal build process
there was nothing for us to really extend.
Hope this helps.

Run aspx page locally in another computer without Visual Studio

I have an application that works fine in my computer locally. What I need is to run this application in another computer but it doesnt have Visual Studio.
I installed IIS 7.0 and tried to create a virtual directory but no luck. Am using the right port? Used port 80 and tried port 4444 and no luck. Any ideas?
What files do I have to drag into the inetpub/wwwroot? All my project files?
You don't need Visual Studio for a web application (aspx). You need to copy the files from the Bin folder and setup a Virtual directory (you do need IIS and might need to enable some features in IIS to support ASPX) .
The easiest way to do this is from Visual Studio right click your project and click Publish. This will let you select what kind of publish option you want (File System will publish to a local dir and you can just copy to the new computer and hook to the virtual directory you created, Web Deploy let's you remotely publish from your local dev box, etc.)
Here is a walkthrough
As long as you're accessing the ASPX files through an IIS web server with the correct target framework you used then it can easily work without Visual Studio.
For instance, my production servers don't have Visual Studio on them. They just need IIS and the proper .NET framework installed.
As a commenter mentioned above, if you right click on your project and select PUBLISH you'll be in good hands.
Go to IIS Manager
Open sites
Right click on default website and choose "Add Application"
Alias "Application Name 'can be any' " and Physical Path is the application path

Publish a web service on Visual Studio 2010

I created a web service in C#, using Visual Studio 2010 ( Framework .NET 3.5). In debug mode it works great, but now I must publish it on the internet, so that I can consume it in remote (the app that will consume the web service is an android app).
So the question is: how do I publish my web service on Internet so that I can consume it in remote?
Thanks in advance; this is a work for taking my degree!
A simple way: you switch to release mode, update your web.config for production, right click on your service project and from the menu select publish. Then you publish it to the local folder. This way it copies only the files needed. Then you copy the contents of the folder to your remote site using ftp, for example, your hosting provider should have given you the credentials.
for some hosters it is also possible to publish directly but I don't use this.

Deploying an N-Layered ASP.NET Webforms Application In A Shared Hosting

I Have a solution that containts 4 layers (3 Class Libraries and 1 Web Application). I Need to deploy this solution to my shared hosting account. I've read a little about deployment and I hope I could perform a 'Precompiled Deployment' because as far as I know, It gives a better experience for the first time users as it's already compliled.
I don't see the "Publish Application" or whatever under the 'Build' menu, I setuped Microsoft Website Copy Tool. and I have on my shared account the Deployment Tool. I'm using Visual Studio 2010 Pro.
..Any one can help with details to deploy my first website on the internet !? :)
Right click on your web application the solution explorer. Select 'publish' from there or is it disabled?

WAP, How to Publish to Web with Web Deploy?

I want to publish my web application on a hosting server.
Domain: mysite.com
Folder: mysite.com/TestWAP
Can I use one-click deployment on typical discount shared hosting?
Will I need to make any installation on the server first, and how is
this done?
With the above details, what would I specify in the
"Service URL" and "Site/Application" fields?
Check out these resources:
How to: Deploy a Web Application Project Using One-Click Publish and Web Deploy
Walkthrough: Deploying a Web Application Project Using One-Click Publish
ASP.NET Web Application Project Deployment FAQ
Build, publish local with a manual first time setup on shared host. From then on publish through Visual Studio Publish - FTP option.
I think you are looking for this.
Configure the Web Deployment Handler
Hope this help.

Categories

Resources