Upgrades Questions on upgrading to version 7.x.
Version 7.x > Upgrades > FieldSelector.ascx Compilation Error View modes: 
User avatar
Member
Member
mr_phil - 2/26/2013 4:10:39 AM
   
FieldSelector.ascx Compilation Error
As part of my upgrade from 6SP1 to 7 I thought I would also upgrade to VS2010 as well.

I upgraded my VS2008 (.NET 3.5) project to VS2010 (.NET 3.5) using the Visual Studio conversion wizard.

My project now does not compile, throwing the following errors in CMSModules\AdminControls\Controls\Class\FormBuilder\FieldSelector.ascx:
'AjaxControlToolkit.ReorderList' does not contain a definition for 'ClientIDMode' and no extension method 'ClientIDMode' accepting a first argument of type 'AjaxControlToolkit.ReorderList' could be found (are you missing a using directive or an assembly reference?)
and
The type or namespace name 'ClientIDMode' does not exist in the namespace 'System.Web.UI' (are you missing an assembly reference?)

This is the code in the Kentico control:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="FieldSelector.ascx.cs" Inherits="CMSModules_AdminControls_Controls_Class_FormBuilder_FieldSelector" %>
<ajaxToolkit:ReorderList ID="lstFields" runat="server" AllowReorder="true" DragHandleAlignment="Left" ClientIDMode="AutoID">
<ItemTemplate>
<%# Eval("Text") %>
</ItemTemplate>
<DragHandleTemplate>
<div class="dragHandle">x</div>
</DragHandleTemplate>
</ajaxToolkit:ReorderList>

Any ideas?

User avatar
Kentico Consulting
Kentico Consulting
richards@kentico.com - 2/27/2013 2:27:00 AM
   
RE:FieldSelector.ascx Compilation Error
Hello,

what were your steps during upgrade from Kentico 6 to Kentico 7? Did you use manual or automatic update?

Can you please navigate to Bin folder in your project and check is there is an "AjaxControlToolkit" file?

From the error it seems like there are some files missing due to the upgrade.

Best regards,
Richard Sustek

User avatar
Member
Member
mr_phil - 2/27/2013 10:49:56 AM
   
RE:FieldSelector.ascx Compilation Error
Hello,

I opened my web project in VS2010 and followed the visual studio upgrade process.

I have since tried a different method that worked. I chose to upgrade the framework version before upgrading Kentico to v7:

1. Delete VWD Cache (%LocalAppData%\Microsoft\WebsiteCache on my system)

2. File > Open > Website

3. Change target framework version to .NET 4

4. Make web.config changes related to mschart controls now being included in .NET4

5. Compile

6. Upgrade Kentico

User avatar
Kentico Consulting
Kentico Consulting
richards@kentico.com - 2/28/2013 3:33:47 AM
   
RE:FieldSelector.ascx Compilation Error
Hello,

I would strongly suggest you to upgrade your website using our KIM manager. The documentation of that may be found in the link below.

http://devnet.kentico.com/docs/devguide/index.html?kim_upgrading_and_hotfixing.htm

Were you able to fix your problem by using your different method?

Did you locate the file?

Best regards,
Richard Sustek

User avatar
Member
Member
mr_phil - 2/28/2013 7:52:59 AM
   
RE:FieldSelector.ascx Compilation Error
Thanks, I believe the compilation errors were due to the Visual Studio cache. After the framework was upgraded to .NET 4 I used your own upgrade executable (Upgrade_6_0_7_0.exe) and the site has been fine.

I now have the following error when trying to view dashboards:
[Error loading the layout] 
The file '/CMSVirtualFiles/Templates/Shared/=vg=614713B7-8ED7-43A0-97A8-063F486ADB69/MyDeskDashboard.ascx' does not exist.

When the deployment mode is turned off I get:
[Error loading the layout] 
The VirtualPathProvider is not running, you have to enable deployment mode in Site Manager -> Administration -> System -> Virtual objects.

Any ideas?

User avatar
Member
Member
mr_phil - 2/28/2013 8:04:59 AM
   
RE:FieldSelector.ascx Compilation Error
Just to add to this, I used the automatic method.

User avatar
Kentico Consulting
Kentico Consulting
richards@kentico.com - 3/1/2013 1:32:45 AM
   
RE:FieldSelector.ascx Compilation Error
Hello,

Could you please try restarting your application? Go to Kentico CMS site manager >> Administration >> System >> General , and then click on " Restart Application ". This helped one of our customer with the similar issue.

Also you may need to look into this devguide for configuration medium trust enviromnent which may be related to this issue.

http://devnet.kentico.com/docs/devguide/index.html?configuration_for_medium_trust_environment.htm

Best regards,
Richard Sustek


User avatar
Member
Member
mr_phil - 3/1/2013 2:28:40 AM
   
RE:FieldSelector.ascx Compilation Error
Thanks for the suggestions but unfortunately they didn't work. Also with regard to the link please note I have upgraded my web application to .NET 4 so this mostly does not apply.

My server is in a full trust environment and the network service account has modify permissions on the website folder. I can make any change I want. The files test under Administration > System > Files > Test completes successfully.

The dashboards work fine on my development computer just not when they're deployed, either in a separate test environment or on my production server.

Any ideas?

User avatar
Kentico Consulting
Kentico Consulting
richards@kentico.com - 3/1/2013 2:40:17 AM
   
RE:FieldSelector.ascx Compilation Error
Just to verify, it works fine on your local computer but shows this error when deployed on the server? If this is the case then there really must be some bad configuration on your server.

Best regards,
Richard Sustek

User avatar
Member
Member
mr_phil - 3/1/2013 2:59:13 AM
   
RE:FieldSelector.ascx Compilation Error
Yes that's right. I have used the same upgrade process for:

4.1 - 5.0
5.0 - 5.5
5.5 - 5.5R2
5.5R2 - 6.0

My production server has not been rebuilt or reconfigured during this period. The only significant change is that .NET 4 has been installed and the server rebooted.

Is there any other guidance you can give please?

User avatar
Kentico Consulting
Kentico Consulting
richards@kentico.com - 3/1/2013 3:14:08 AM
   
RE:FieldSelector.ascx Compilation Error
Hi,

could you please try (once again) deleting the content of the cache in your server and then restarting Kentico application?

Was it working when you were using the .NET 3 version? Would it be possible to try it with this?

Also what .NET are you using at your local development station?

I'm sorry I can't give you more precise answer, this is the first error of this kind we have encoutered and it seems to be not that much Kentico related - more likely some configuration on the server.

Best regards,
Richard Sustek

User avatar
Member
Member
mr_phil - 3/1/2013 7:01:50 AM
   
RE:FieldSelector.ascx Compilation Error
Thanks for the quick response. A cache clear and restart didn't work.

I have just discovered that if I copy my .NET4 web project to my server without publishing from Visual Studio the dashboards work fine.

With previous versions I have always published Kentico from Visual Studio so that code is compiled. Is this not possible now?


User avatar
Kentico Consulting
Kentico Consulting
richards@kentico.com - 3/4/2013 9:32:09 AM
   
RE:FieldSelector.ascx Compilation Error
Hi,

My guess is that this is cause by the changes in .NET 4 as the error was cause by handling the virtual files which the .NET was unable to create/find. To find out the cause we would have to ask some developers who could know the answer.

Anyway I'm glad the issue has been resolved.

Also thank you for sharing this as this might be useful in the future.

Best regards,
Richard Sustek