How to deploy a Web API to my web host? - visual-studio

I'm building a RESTful Web API on my local machine and it works nicely. I want to put it on my GoDaddy web host account now. I did this once by copy and paste file by file to the FTP site they gave me. That worked, but it is slow and painful to do and to update when I make changes. Is there a quicker way to publish (in Visual Studio) from my local copy to my FTP site? If not, can you tell me which files I need to deploy for the Web API to work? I don't think it needs all the .cs files, but I'm not sure what files it must have.

OK, I found this link about publishing a website in Visual Studio:
https://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k%28WebApplicationProjects.PackagePublishOverview%29;k%28TargetFrameworkMoniker-.NETFramework
It didn't really solve everything for me, but I started playing around with the controls in Visual Studio. I was able to publish my local website to FTP by right-clicking on the project node in Server Explorer and click Publish... or click Build -> Publish in the Visual Studio menu. Fill in your FTP connection information, enter the target folder under Site Path and leave Destination URL blank (don't know, don't care). I also unchecked "Include all databases..." in the Project Properties Page for Package/Publish Web because I didn't want to rebuild my destination database. It worked.

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

Put and get in Visual Studio?

How to get or put files from local to ftp server in Microsoft Visual 2010, equivalent options from Dreamweaver put/get ?
And is there in VS option to upload and download (in DW ctrl + shift U/D) ?
Thanks
Right click on the web project and select Publish. There are several different options.
See How to: Deploy a Web Site Project by Using the Publish Web Site Tool for details.
The target location can be a local or shared folder, an FTP site, or a Web site that you access with a URL. You must have permissions to create and write files in the target location.
(emphasis mine)

Link remote site to visual studio 2010

i developed a site in my local laptop. The site is quite in an dvanced stage so i'd like to test it in the remote server where it will be once finished.
I use visual studio 2010 and i was asking myself if it was possible to leave the site in the server and go on developing it in my machine without loosing syncronization.
I mean, suppose i find a bug while navigating the site from my laptop. I would like to fix it without copying the site locally, and then put it back on the server manually.
Is this possible with Visual Studio 2010?
Some more info:
The site is hosted locally in C:\Mysite\ and in the server in C:\Mysite\ (the same directory).
I can connect to the server with remote desktop but the connection is authenticated (of course)... I wrote this in case it's useful information.
Thanks in advance!
You can, by simply selecting Open -> Website and choosing from FTP or Remote Site in the directory browser.
However, just because you can doesn't mean you should! Keep a development and production copy separately.
Open VS2010 and then in File menu choose Open -> Website -> Remote site.
Then enter your remote address and it's done, you can work on your remote site as if it was local.
it is not a good idea to publish your code directly to your server. However if you would like to do it, you can think of setting up continuous integration process. Whenever you commit the code, you can run a msbuild or nant script which gets latest code changes from source control and push to the server. You can also sse something like webdeploy... which ideal for web projects...

VS2008 How to deploy a WebSite Application Project

So I have created a Web Site Application project in VS2008 and is fine on my local machine. Just wondering how to I deploy this to a dev server i.e via FTP i.e. do I need just copy over all files i.e.
Microsoft Visual Studio Solution
Visual Basic Project File
Visual Studio Project User options File
and the rest of my customer folder and files & web.config ?
And then when I have those moved and i.e I want to change the config file on the dev server, can I just change the web.config directly on that server or do I need to then open it visual studio on that server and recompile again ?
You can use the Publish Web Site options under Build Menu.
This option can deploy directly on the remote site whit FTP or can publish the file needed on a foolder on your local computer, so you only have to upload on the remote site.
After you deploy the web site if you have only to change the web.config you can use Notepd for it and don't need to recompile nothing... only if you change CodeBehind you have to recompile and upload only the DLL.
This link can Help you understan all the process

Visual Studio: testing on different a server than developing on

In dreamweaver, it's really simple to set up a site so when you test a page that you are developing that it deploys it to a different test server that you are developing on and then browses to that page at that location also.
Question: Can you set up Visual Studio so that when you "run" or "View in Browser" that it automatically pushes the pages out to the test server and then browses to that location as well?
You've got two options as far as I can see:
1) Create a local project and set it up to run from your own local IIS, (this is not exactly what you're asking, but it should be more of an apples to apples test, as opposed to the built-in visual studio web server).
2) Use Remote Debugging to attach your Visual Studio instance to a remote server, links here and here
With option two, you'll still likely need to publish/deploy your solution to the server each time, but you will be able to step through and debug your code running on the remote server.
I think you can use an FTP project (File>Open Web Site and then select FTP) - as far as I'm aware, when you save a file it's automatically uploaded to the specified server. Then you could just point your browser at that web server.
I don't think this is possible,but you can always set up a shared folder where you put your code, and that shared folder is in fact the folder where your web server expect the code to be.

Resources