Web hosting forums || get your web hosting related questions answered https://www.hostasp.net/forums/latest.html Wed, 26 Jan 2022 05:39:14 +0000 Joomla! - Open Source Content Management en-gb How to: One-Click Web publishing or Deploying your Website using Visual Studio https://www.hostasp.net/forums/question/how-to-one-click-web-publishing-or-deploying-your-website-using-visual-studio.html https://www.hostasp.net/forums/question/how-to-one-click-web-publishing-or-deploying-your-website-using-visual-studio.html . You will use this information to rebuild publishing XML in the following step. [img]http://www.hostasp.net/articles/images/visual-studio-remote-deployment/vs-2010-ms-sql-server-db.PNG[/img] [b]Step 2. Setting up Web publishing environment. (WebsitePanel)[/b] Login to your Web hosting panel and select your Website, you would see Web Publish properties Tab, now enabling this will create a new web publishing account. After your account is created you will see a link to rebuild publishing XML- click on the link and configure your database for use. Now after reconfigure is done, you will be able to download the updated [b]Publishing XML for your Reference[/b]. This XML contains your Service URL, SQL server name, and other related information for you Visual studio publishing. (If you're using WebMatrix you could use this XML to directly import to WebMatrix IDE). ([b]Download your publishing XML to your client machine[/b]) [img]http://www.hostasp.net/articles/images/visual-studio-remote-deployment/dotnet-webpublishing-settings.PNG[/img] [b]Step 3. Configuring your IIS Website application pool. (WebsitePanel)[/b] This is a vital part you would need to really look into it and set it up correctly. You would choose appropriate Application pool depending upon your web application targeted framework, if you have app built on framework .NET 4.0 then your choice here would be 4.0. [i][b]Please note that for MVC application you would need to select Integrated Pipeline.[/b] for rest of app you would select Classic pool which are just displayed as 2.0 / 4.0.[/i] Still the version depends on your targeted framework. [img]http://www.hostasp.net/articles/images/visual-studio-remote-deployment/dotnet-application-pool-settings.PNG[/img] [b]Step 4. Creating new Publish profile in Visual Studio. (Visual Studio 2010)[/b] Now that we have configured our Web publishing setup on our hosting space. Let see how to setup Visual studio for Web deploy. [img]http://www.hostasp.net/articles/images/visual-studio-remote-deployment/vs-2010-create-web-publish-profile-menu.PNG[/img] Open your Web project using Visual studio 2010, on menu bar you would see [b]Publish:[/b] menu item. You could create as many profiles you want using this, let us see how to create a new profile now. Click on new profile option. This will launch profile screen as shown below. [i]Open your Publishing XML and have it ready reference. [/i] [img]http://www.hostasp.net/articles/images/visual-studio-remote-deployment/vs-2010-publishing-profilesetup.PNG[/img] a) Name your profile b) Select publishing method as "Web Deploy" [b]c) Find publishUrl attribute in downloaded XML file and copy its value to Service URL field. (suffix with msdeploy.axd - refer figure above)[/b] d) On Site/application field type your domain name (or) copy msdeploySite attribute value from XML file. e) Leave untrusted certificate field checked. f) Configure user name and password that your created in Web publishing tab on your hosting space ( you could refer userName and userPWD attribute from your downloaded publishing XML). Click on Save button to save your profile. (See top right corner of the profile window) Ok, we just saw how we will have to setup the publish profile. The next 2 steps 5 & 6 will be about how you want to make this publish process work for your website contents and MS SQL db. [img]http://www.hostasp.net/articles/images/visual-studio-remote-deployment/vs-2010-publishing-menu.PNG[/img] [b]Step 5. Setting up Publish Web in Visual Studio[/b] Here in this screen you would determine what contents are to be deployed on your remote website. [b]We will NOT concentrate on Packing-part instead we’re going to deploy directly to your hosting space. [/b]As you see on the image, you can determine whether only runtime components is required ( advisable for release version / production environment) (or) all files of your project and then you can also choose whether to exclude app_data folder and so on. [i]Do not forget to “check” Include all databases configured in Package / Publish SQL tab if you’re using SQL server database for your web application project.[/i] [img]http://www.hostasp.net/articles/images/visual-studio-remote-deployment/vs-2010-publish-web.PNG[/img] [b]Step 6. Setting up Publish SQL in Visual Studio[/b] You will be using this Publish SQL screen for setting up DB configuration. As you see in this screen, you will select the databases entries you want publish, you could also import directly from your web.config. Then you will need to configure your remote database connectivity for publishing your SQL and data. [i]Refer to your downloaded Publish XML content for destination SQL server name, your database and its credentials.[/i] The connection string as you see on the image will be generated, after successful configuration of destination database setup. (You could copy this connection string and update your Web.config HostASP on hosting space.) Further down in this screen you could see scripting options that determine what to publish to remote DB (Schema / Data / both). [img]http://www.hostasp.net/articles/images/visual-studio-remote-deployment/vs-2010-publish-SQL.PNG[/img] To setup HostASP remote database connection string, click on "..." button on Destination Database Information. This will launch configuration setup for remote database as shown below. You would refer to downloaded Publish XML to configure this part. [img]http://www.hostasp.net/articles/images/visual-studio-remote-deployment/vs-2010-database-connectionstring.PNG[/img] [b]Step 7. Publishing your Website.[/b] Hurray, you're done with required setup for publishing your Web project. Now it is time to publish your website. On your Visual Studio menu bar select your publishing profile and click on “Publish web” (or) alternatively you could right click on your project name and select “Publish” action. This will copy all your web project contents, SQL database information as per configured setup in Visual studio. [img]http://www.hostasp.net/articles/images/visual-studio-remote-deployment/vs-2010-publishing.PNG[/img] After you get your web project successfully published, you would need to update your connection string in web.config on your hosting space. You could see the connection string that you need in Step 6. above. This will make your Website point to your HostASP database. You can now launch your sample MVC website that you just published. [img]http://www.hostasp.net/articles/images/visual-studio-remote-deployment/vs-2010-mvc-application.PNG[/img] Good luck, if you have any queries contact HostASP support.]]> <a href="/forums/tags/webmatrix-publishing.html">WebMatrix Publishing</a>, <a href="/forums/tags/web-deploy.html">Web Deploy</a>, <a href="/forums/tags/visual-studio.html">Visual Studio</a>, <a href="/forums/tags/visual-studio-publishing.html">Visual Studio Publishing</a> Tue, 22 Nov 2011 02:58:13 +0000 ftp and publishing my MS visual studio website. What are the location details https://www.hostasp.net/forums/question/ftp-and-publishing-my-ms-visual-studio-website-what-are-the-location-details.html https://www.hostasp.net/forums/question/ftp-and-publishing-my-ms-visual-studio-website-what-are-the-location-details.html <a href="/forums/tags/visual-studio-publishing.html">Visual Studio Publishing</a>, <a href="/forums/tags/visual-studio.html">Visual Studio</a>, <a href="/forums/tags/web-publishing.html">Web Publishing</a> Sat, 26 May 2012 06:26:51 +0000