Web Development & Execution
David Addison
by David Addison
share this
« Back to the Blog

How to run ADXStudio CMS websites using .NET 4

How to run ADXStudio CMS websites using .NET 4

So, you love using Visual Studio 2010, and Team Foundation Server 2010, right? One of the requirements of VS 2010 is that projects need to be converted to .NET 4.0. You also love using AdxStudio CMS and want to be able to run your project in VS 2010 to use some of the cool new features right? Unfortunately AdxStudio CMS only supports .NET 2.0 right now and if you try to convert the project you get a string of errors at runtime. I will demonstrate how to successfully convert your projects to ASP.NET 4.0 while still running AdxStudio CMS using .NET 2.0.

First let’s talk about conversion. The projects I have converted to .NET 4.0 so far have been fairly straightforward with little code change. Most of the changes happen in the configuration files and on IIS. If you haven’t already installed the .NET Framework 4.0 you should do so. Click on Web Installer, and Standalone Installer. Also you should note that I used the Standalone installer, rebooted, and still had to run Windows update and reboot before IIS7 would run a 4.0 Web site. The unfortunate symptom was simply a server 500 error which was not very descriptive.

So the basic process will be to use location tags in web.config to create different system.web versions. One version will load .NET 4.0 for your Web site and the other will load .NET 2.0 for Adx. Without further ado here are the steps.

  • Verify your site runs without errors.
  • Copy your current system.web node into notepad.
  • Open your project in Visual Studio 2010 and run the conversion wizard.
  • If you refresh your Web site you should receive the error “Unrecognized attribute ‘targetFramework’". Go to IIS and double click the app pool that your site runs and change the .NET Framework version to v4.0.
  • Your site complies but now Adx does not work. In IIS create a new app pool for Adx and make sure the framework version is set to 2.0.
  • Right click your Adx virtual directory and convert it to an application, and make sure that the application uses the 2.0 app pool you just created.
  • Open Windows Explorer and go to: C:\Program Files\ADXSTUDIO\CMS\7.0.0070
  • From one of the sample sites in /samples, copy the bin folder to inetpub/adx.
  • Next in inetpub/adx make a directory named ‘App_Data’ and give the IIS_IUSRS permissions to this directory. (Adx checked to see if the directory was present before it would run, however since my installations all use Sql Server this directory does not appear to be used.)
  • In the web.config for your site wrap this tag around your current system.web node to prevent inheritance by sub applications: <location path="." inheritInChildApplications="false"></li>
  • Copy the old system.web node from notepad, paste it into the new web.config and wrap this tag around it: <location path="adx"></li>

You should now be able to run AdxStudio CMS using .NET 2.0 while your website runs .NET 4.0. Your results may vary as I am using a fairly stock implementation. Feel free to send in any tips.


Thank you for contacting us!

We'll be in touch!

Back Home ×