This is a migrated thread and some comments may be shown as answers.

[Solved] WSS 3 + WebPart + RadTreeView

2 Answers 174 Views
RadControls
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Martin
Top achievements
Rank 1
Martin asked on 30 Apr 2007, 04:59 PM
Hi,

I am pulling my hair out to get a simple, basic example of a Telerik tree control to work within a WSS 3, Web Part. Below is my simple, simple, Web Part code
Imports System  
Imports System.Runtime.InteropServices  
Imports System.Web.UI  
Imports System.Web.UI.WebControls.WebParts  
Imports System.Xml.Serialization  
 
Namespace WebPart  
 
    Public Class FolderHierarchy  
        Inherits System.Web.UI.WebControls.WebParts.WebPart  
 
        Public Sub New()  
            Me.ExportMode = WebPartExportMode.All  
        End Sub 
 
        Protected Overrides Sub CreateChildControls()  
            MyBase.CreateChildControls()  
            AddTelerikControls()  
        End Sub 
 
        Protected Sub AddTelerikControls()  
            Dim m_RadTreeFolderHierarchy As New Telerik.WebControls.RadTreeView  
            Dim RadTreeNodeRoot As New Telerik.WebControls.RadTreeNode("Martin")  
            m_RadTreeFolderHierarchy.Nodes.Add(RadTreeNodeRoot)  
            Me.Controls.Add(m_RadTreeFolderHierarchy)  
        End Sub 
 
        Protected Sub AddASPControls()  
            Dim NormalLabel As New UI.WebControls.Label  
            NormalLabel.Text = "Normal ASP Control" 
            Me.Controls.Add(NormalLabel)  
        End Sub 
    End Class 
 
End Namespace 

Now if I switch the CreateChildControls to use the AddASPControls function then the web part displays fine. Using the AddTelerik controls it does not.

The problem I am getting is that the web part page returns a '403 - Forbidden' message. There are no other web parts on the page. When I go through the debugger the controls seem to be added OK. Well there are no exceptions thrown. 

I have amended my web.config: I have put these in the correct section.

<trust level="Full" originUrl="" />

<SafeControl Assembly="RadTreeView.Net2, Version=6.2.0.0, Culture=neutral, PublicKeyToken=dbd98e0feff9f06b" Namespace="Telerik.WebControls" TypeName="*" Safe="True" AllowRemoteDesigner="True" />

<SafeControl Assembly="RadTreeView.Net2, Version=6.2.0.0, Culture=neutral, PublicKeyToken=dbd98e0feff9f06b" Namespace="Telerik.RadTreeViewUtils" TypeName="*" Safe="True" AllowRemoteDesigner="True" />

The RadTreeView.Net2.dll file is in the bin directory.
It's file permissions are the same as all the other files in that directory.

I'm lost what to try next. Perhaps because my web.config file contains ASP.NET AJAX settings is upsetting things. A 403 - Forbidden means some kind of security problem, but I don't know what.

Thanks
Martin

2 Answers, 1 is accepted

Sort by
0
Martin
Top achievements
Rank 1
answered on 01 May 2007, 07:44 AM
I have taken the ASP.NET AJAX out of my web.config and no joy. I forgot to mention that I am using Forms authentication (and utilizing my own Membership Provider)
0
Martin
Top achievements
Rank 1
answered on 01 May 2007, 11:30 AM
I have managed to sort myself out now.
Strange solution - I switched my authentication type back to Windows and it worked!!! I tried to replicate my problem by switching back to my custom membership provider and it worked!!! So not a very satisfactory, engineering solution. :(
Tags
RadControls
Asked by
Martin
Top achievements
Rank 1
Answers by
Martin
Top achievements
Rank 1
Share this question
or