This example will show you how to create a new website using the Provware Framework (Build 001).
- Create a reference pointing to the Provware.Framework.dll assembly.
- Add a directive to use the "Provware.Framework.Web" namespace
using Provware.Framework.Web;
- Add the following code to your C# application
WebManager wm = new WebManager();
WebServer iisServer = wm.Connect("localhost"); Site newSite = iisServer.CreateSite("My Site", ":80:www.mySite.com", "C:\\Sites\\mySite\\Content\\Web", true);
At this point, the site is now created. The "Site" object is part of the Provware Framework. You can now use that object to interact with the site.
About agramont
Conrad Agramont is a Partner Technology Specialist (PTS) focused on the Microsoft Server product lines in the Small and Mid-Market Solutions and Partners (SMSP) area for the Mid-Atlantic district. Conrad was previously the Senior Architect for a Microsoft Gold Partner where he was responsible for product planning, software architecture, and technical evangelism focusing on Service Providers around the world. Agramont was previously a Program Manager at Microsoft driving hosting scenarios and architecting components for the Microsoft Provisioning System, Service Provisioning component in Microsoft Solutions for Hosted Messaging & Collaboration, Hosted Exchange 2003, and Windows based Hosting 3.0. Conrad has over 8 years of experience in the Microsoft automation and hosting space, speaking at public events, and publishing articles in magazines. Conrad Agramont is also an active blogger focusing on many Microsoft Hosting related topics. His blog can be found at http://agramont.net/