+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Existing website to SItefinity

Existing website to SItefinity

6 posts, 0 answered
  1. Sachin
    Sachin avatar
    5 posts
    Registered:
    10 Mar 2011
    11 Mar 2011
    Link to this post
    Hi ,
    I have existing application in aspnet which I want to migrate/ host to sitefinity.
    I understand that there are 2 ways of doing this
    1) Create ascx (i.e user control ) for each page and then add that control to the page and publish it
    2) Publish the website and while selecting control add dll of the page .

    I would prefer using second option because I dont want  to change any code by converting it to user control.

    I created a single page with simple label control which says hello world and I published the website.
    When I try to add dll, I get error system.Null reference exception.

    Please let me know if i am going in right direction and if yes then how would I solve the null reference exception

    Thanks
    Sachin

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    11 Mar 2011
    Link to this post
    Hello Sachin,

    How did you add the dll? What is the exact error you are getting? Try adding the dll in your bin folder. Then register the control in the web.config - toolboxControls section.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. Sachin
    Sachin avatar
    5 posts
    Registered:
    10 Mar 2011
    11 Mar 2011
    Link to this post
    Steps involved are
    1) Add page
    2) Upload control ..  select the path of published folder
    3) The dll gets added to general section and then try to drag and drop the the added page ( Please not the same methodology works for ascx page where we specify the file name instead of dll path)

    4)  this is the error which I get

     

    Object reference not set to an instance of an object.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

    Stack Trace:

    [NullReferenceException: Object reference not set to an instance of an object.]
       System.Web.UI.Page.get_Title() +63

    [TargetInvocationException: Property accessor 'Title' on object '_HelloUser' threw the following exception:'Object reference not set to an instance of an object.']

       System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component) +390
       Telerik.Cms.Data.WebControlBase.SaveControlState(Control control, Control defCtrl, PropertyDescriptorCollection properties) +433

       Telerik.Cms.Data.WebControlBase.SaveControlState(Control control) +192
       Telerik.Cms.Data.WebControlBase.VerifyObject() +31
       Nolics.ORMapper.Base.OdbClassHelper.VerifyClass(IOdbClass cl) +41
       Telerik.Cms.Data.WebControlBase.Nolics.ORMapper.Base.IOdbClass.BeginCommit() +12
       Nolics.ORMapper.Base.Transaction.Commit(Boolean fCleanIfSuccess) +909
       Nolics.ORMapper.Base.Transaction.Commit() +10
       Telerik.Cms.Data.StagedPage.AddControl(String containerId, ICmsWebControl cmsControl, Int32 ordinal) +314
       Telerik.Cms.Data.StagedPage.AddControl(String containerId, Type type, Int32 ordinal, String controlId) +140
       Telerik.Cms.Web.UI.ToolBar.AddContol(String controlName, String zoneId, Int32 ordinal) +349
       Telerik.Cms.Web.UI.Toolbox.Button_Command(Object sender, CommandEventArgs e) +330
       System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +108
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +166
       System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565    

    ********************************************************************************************



    please let me know if there is working sample demonstrating the above flow

  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    15 Mar 2011
    Link to this post
    Hello Sachin,

    There seems to be some problem with the control you are using. Can you please share its code so that we can take a look at what the problem might be?

    All the best,
    Radoslav Georgiev
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  5. Sachin
    Sachin avatar
    5 posts
    Registered:
    10 Mar 2011
    25 Mar 2011
    Link to this post
    Hi ,
    As I said earlier the page is part of website, The webpage just has label displaying hello world.

    I publish the website , Dll gets created by the page name, Now I am trying to add this dll to the pages as discussed before and it gives me error as below.

    Please share any existing Business case / web cast demo  which could help me in converting existing web page to sitefinity

    Thanks
    Sachin Thorat

  6. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    30 Mar 2011
    Link to this post
    Hello Sachin,

    You can find a number of examples regarding building user controls in this series of blog posts.

    Kind regards,
    Radoslav Georgiev
    the Telerik team
Register for webinar
6 posts, 0 answered