How to create and deploy a Web Application - asp.net

I have two working servers (at different locations) with IIS hosting WCF. On each server, WCF (by way of an entity framework) connects to a PostgreSQL database on the same server. My development machine is my laptop.
I have added new stored procedures to the PostgreSQL databases and added these to the WCF implementation on my laptop.
Currently, the Server only has the production site set to use ASP.Net v4.0 application pool.
In Visual Studio 2010 (.Net 4.0), can someone please tell me how to:
Create a Web Deployment Application that will use the existing PostgreSQL database already on the Server (I do not want to export any database from my laptop).
Create a Web Deployment Application that will use the existing PostgreSQL database already on the Server, but target a non-production site like "TestingSite".
Is there anyway of creating a Web Deployment Application that will CREATE the new site, "TestingSite" on the Server with the correct settings.
Ultimately I'm hoping for something really simple that I can develop the WCF code I need on my laptop, then deploy it to the server for testing.

Related

Hosting ASP.NET application with SQL Server DB

I have a web site developed in ASP.NET MVC and used MS SQL Server as a back-end database.
I was trying to host this application on webFaction, but unable do do so as it seems WebFaction does not support hosting of ASP.NET applications.
Can I host ASP.NET application with SQL Server as DB on WebFaction?
The official answer is here: https://community.webfaction.com/questions/17081/asp-as-application/17099
WebFaction only offers Linux server hosting.
If you want to use ASP.Net, you'll have to use Mono. They don't provide an installer for it, so you'll need to build the Mono stack from scratch.
Per MS SQL server, it doesn't (currently) run on Linux. So you will either need to connect your Webfaction ASP app to another hosting service for the database, switch to a new database, or wait for MS to release their linux version of MS SQL.

Publish ASP.NET MVC 4 (Razor) app onto remote server running Windows 7 with IIS 7

I have experience in hosting an Asp mvc 4 application on local IIS with Sql server as back end. Now I want to host this application on another system that don't have Sql server and Visual studio installed. I think we can able to get all files necessary to host by publish option in visual studio 2012. But I don't have any idea on how to make my database working on the server without sql server and the necessary connection strings. Can I change my db to sql server compact 4.0?
Please give the necessary instructions.
For .net Application you can generate necessary files using publish feature of VS.You can even make use of web-deploy for direct deployment of artifacts to remote server itself.
For db you better have sql -engine, without that it get's tricky. Express edition will always be better option if you are not looking for some advanced DBA jobs.

Accessing file share from Azure Website

We have a web application that consists of three main parts:
Web server running ASP.NET 4.5 Web site;
Database server hosting SQL Server 2012;
Another server hosting some Legacy App used by back office;
Relations between parts are as follows:
Web application runs with App Pool Identity set to local user called Foo and consumes database using Entity Framework;
Legacy app consumes database and periodically exports data changes in file system as XML files, folder is shared to local user Foo (local user has the same password as on Web Server) using Windows File Share feature;
Web application monitors file share for new data and imports all the changes if any;
Now we would like to migrate this application to Azure. Unfortunately we have to use VM for SQL Server because our legacy app database uses File Stream feature which is not available on Azure SQL. Also, we need another VM for legacy app.
Currently I have ended up with the following:
Created a new Virtual Network on Azure;
Created a new Azure Website and connected it to VNET using Point-To-Site VPN connection;
Created 2 VM's for SQL Server and legacy app and connected both to VNET, marked network as private network, disabled firewall;
Everything works fine except one thing - Website is unable to access file share located on Legacy App VM. I have tried to enable sharing to Everyone but to no avail.
So, my question: is it possible to access a file share from an Azure website? If not, what alternatives do I have?
I know that we could spin up another VM for Website and then I would have no issues but I would like to use Azure Website to optimize costs and make use of all Azure goodies.
At the time of writing Azure file service SMB shares are only accessible from VMs, Web- and Worker roles. You can use the storage REST.API or client library to access your files from Azure Websites or on-premise. You can get it from nuget.
Install-Package WindowsAzure.Storage
I went through the same exercise of moving a web application that used files to Azure.
Example of what I did.

how to deploy MVC3 WebApp to windows Azure

How is it possible to deploy MVC3 web roles to windows Azure? Most of the tutorials seems done on deploying ASP.NET web roles than the MVC3 one.
can any one give me a link/hint?
Way back in the old days, MVC3 wasn't supported out-of-the-box because the appropriate DLLs needed to be manually added by you (or installed as a startup task). These days, the MVC dll's are all there using the MVC3 template, so there's no difference in what you'd need to do, between asp.net and asp.net mvc deployment. The basic Web Roles and Worker roles are just Windows 2008 Server VMs, and the deployment process is the same. The most important part, when starting out, is making sure your connection strings to storage point to "real" storage and not dev storage (such as your diagnostics connection string). Also, session state defaults to using SQLExpress, which isn't running in Windows Azure, so you'll need to either use a SQL Azure database (plus proper connection string) in web.config, or change session state to use Cache (again, a web.config change).

How can I deploy my ready website?

I have well developed an ASP.NET website with SQL Server 2000. How can I drop it on a server?
You might find these resources helpful:
ASP.NET Web Site Project Deployment Overview
Deploying a Database by Using the Database Publishing Wizard
How to: Deploy a Database With a Web Application Project
Depends on a number of things (e.g. if you have direct access to the server(s)). I tend to export my database structure as a SQL script and execute that against the production database. I then "publish" the site using VS and copy it across to a virtual directory on the web server.
If I am passing the application to a customer, I tend to use WiX or a VS deployment project to wrap the application up in an installer.
You can use SQL Server Publisher (free) wizard for moving database from development machine to the server. Or you can use SQL Server database schema synchronization tool by Red-gate.com
And SitePubisher for deploying files over FTP (and VPN)
There are many ways to do this.
Read this - http://www.beansoftware.com/ASP.NET-Tutorials/Deploy-ASP.NET.aspx

Resources