This walkthrough is intended to help hosters verify that their customers can use the Windows Web Platform tools and services to download, customize, publish, and manage their applications in a Hosted Environment.
In this case we'll play the role of the developer and use the Microsoft Web Patform Installer to deploy a popular CMS ASP.NET application called "Graffiti CMS" in the local developer machine. Once we verify that works we'll proceed to deploy it in the hosted server.
In summary this walkthrough covers:
Install Graffiti CMS in a developer machine
Configuring the application to use SQL Server and test it locally
Using Visual Web Developer to modify and publish the application to the remote server.
Using IIS Manager Remote Administration feature to change the application Connection String to point to the new SQL Server.
Prerequisites
The hoster must have provided the developer with credentials that have access to an FTP site that shared its content with the corresponding Web Site. See FTP and VWD articles link: Guide to Deploy FTP and Publish with VWD for details on how to setup this configuration so that users are isolated from each other.
The hoster must have provided the developer with a SQL Server database.
The developer must have installed Visual Web Developer (VWD) and SQL Server.
Step 1: Install the Graffiti CMS application on your development machine
Follow the official guide to install Graffiti CMS on IIS/Windows.
Step 2: Verify the existence of the Graffiti CMS Site and corresponding Database
Run IISMgr and view the Sites folder in the left-hand panel.
Run SQL Management Studio and view the Graffiti DB in the database tables:
Use IE to browse to the site:
Step 3: Configure Graffiti to use the SQL Server Database already created
At this point you have the Graffiti application running and a SQL db created for it. However, the SQL database is not the one used by the application by default. Out-of-the box it uses its own db system (VistaDB), see connection string dialog below for the site:
The steps to setting up SQL Server are very simple:
Using the Graffiti database:
Execute the Graffiti_SQL_Schema.sql file found in the Data folder.
Execute the Graffiti_SQL_Data.sql file found in the Data folder.
Add the connection string of your database to the web.config file. It should have the name "Graffiti":
<add name="Graffiti" connectionString="server=SERVERNAME; database=Graffiti; User ID=graffiti; Password=********" />
You can accomplish it through the Connection Strings Module in IIS Manager:
Change the AppSetting key DataBuddy::Provider value to DataBuddy.SQLDataProvider, DataBuddy in the web.config file.
With Internet Explorer browse to the Graffiti site. Notice that since the SQL db does not render the same data that comes in the default database:
Verify that the Application Admin credentials work the temporary password for the admin user can be found in the web.confg file:
Enter the credentials and press Login:
The Admin Control Panel page is display:
Now you are ready to publish the application.
Step 4: Use Visual Web Developer (VWD) to Modify and Publish Your Application
Open your Graffiti Site with VWD. The following dialog will display, press Yes to upgrade the site to .NET Framework version 3.5.
Open the menu Website and select "Copy Web Site":
Select FTP Site and enter the Server name, Port and user account credentials. Ensure that "Passive Mode" is checked and press Open:
Publish the entire content to the target server.
Step 5: Use IIS Manager Remote Administration to change the Graffiti Site Connection String to point to the new SQL server.
Start IISMgr, if you are running Vista ensure that you are running the remote version of IISMgr:
Connect to the Remote Site:
Enter the Hoster provided user credentials:
Assign a name to the new connection:
Install any IIS Manager extension modules that are offered in the following dialog:
Select your new Graffiti site, find the Connection String icon and double click on it:
Change the Server Name to the new target SQL Server
To upload the database you can use the facilities provided by the hoster. Either through database backup and restore process through FTPor any other control panel facility that would let you run the Graffiti_SQL_Schema.sql and Graffiti_SQL_Data.sql files.
Test that the application works in the new hosting environment. Here is a screen shot after creating a post as the Admin user:
Conclusion
This walkthrough covered:
Install Graffiti CMS in a developer machine
Configuring the application to use SQL Server and test it locally
Using Visual Web Developer to modify and publish the application to the remote server.
Using IIS Manager Remote Administration feature to change the application Connection String to point to the new SQL Server.
Build end-to-end solutions in Microsoft Azure to create Azure Functions, implement and manage web apps, develop solutions utilizing Azure storage, and more.