CodeSmith Community
Your Code. Your Way. Faster!

Problem with data sources-Unable to load NetTiersServiceSection

Latest post 01-03-2008 8:29 AM by del. 4 replies.
  • 12-06-2007 5:03 PM

    • del
    • Not Ranked
    • Joined on 12-06-2007
    • Posts 5
    • Points 25

    Problem with data sources-Unable to load NetTiersServiceSection

    I get an error in VS design view for all of the screens that use any of the DataSourceControl objects, including the Admin screens that are automatically generated.  The error displayed is "Error Creating Control   Unable to load NetTiersServiceSection"

    I have tried this with multiple databases (including Petshop), thinking that there might be a naming conflict causing it, but the same things occurs on all of them.  The admin pages build and work without errors, but they can't be edited in design view.  If I cut out the data source, like the example below, the error disappears and I can view the controls.

    <data:OrdersDataSource ID="OrdersDataSource" runat="server"
       SelectMethod="GetPaged"
       EnablePaging="True"
       EnableSorting="True"
    >   <Parameters>
        <data:CustomParameter Name="WhereClause" Value="" ConvertEmptyStringToNull="false" />
        <data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" />
        <asp:ControlParameter Name="PageIndex" ControlID="GridView1" PropertyName="PageIndex" Type="Int32" />
        <asp:ControlParameter Name="PageSize" ControlID="GridView1" PropertyName="PageSize" Type="Int32" />
        <data:CustomParameter Name="RecordCount" Value="0" Type="Int32" />
       </Parameters></data:OrdersDataSource>

    One thing I noticed is that the NetTiersServiceSection is named slightly different in the generated Web.Config vs the one that is displayed in the summary report.

     Web.Config

    <section name="Petshop.Data" type="Petshop.Data.Bases.NetTiersServiceSection, Petshop.Data" allowDefinition="MachineToApplication" restartOnExternalChanges="true"/>

    SummaryReport

    <section name="netTiersService" type="PetshopTest.Data.Bases.NetTiersServiceSection, PetshopTest.Data"  allowDefinition="MachineToApplication" restartOnExternalChanges="true" />

    I tried renaming the section in Web.Config to NetTiersService, but get the same result.

    I am using VS2005, .NetTiers 2.2, and CodeSmith Professional 4.1.2.

    Has anyone else had this problem? 

     Thanks,

    Daryl

    Filed under: , , , , ,
    • Post Points: 5
  • 12-07-2007 1:21 PM In reply to

    • del
    • Not Ranked
    • Joined on 12-06-2007
    • Posts 5
    • Points 25

    Re: Problem with data sources-Unable to load NetTiersServiceSection

    I was working with multiple versions of the application and database and accidentally copied the SummaryReport line from the wrong window.  It should have read:

    <section name="netTiersService" type="Petshop.Data.Bases.NetTiersServiceSection, Petshop.Data"  allowDefinition="MachineToApplication" restartOnExternalChanges="true" />

    • Post Points: 5
  • 12-07-2007 4:58 PM In reply to

    • del
    • Not Ranked
    • Joined on 12-06-2007
    • Posts 5
    • Points 25

    Re: Problem with data sources-Unable to load NetTiersServiceSection

    I fixed this by installing Service Pack 1 for VS2005.

    • Post Points: 5
  • 01-02-2008 12:45 PM In reply to

    • del
    • Not Ranked
    • Joined on 12-06-2007
    • Posts 5
    • Points 25

    Re: Problem with data sources-Unable to load NetTiersServiceSection

     The install of VS2005 SP1 worked for a few weeks, but I am now getting the same error message again on all of the projects that were working.  I can work around the problem by cutting out the <data: sections from the page while laying out the pages and paste them back in when ready to run, but that is a hassle.  Any help would be appreciated.

    • Post Points: 5
  • 01-03-2008 8:29 AM In reply to

    • del
    • Not Ranked
    • Joined on 12-06-2007
    • Posts 5
    • Points 25

    Re: Problem with data sources-Unable to load NetTiersServiceSection

    Reply |Contact |Answer

    ??? After rebooting, the error went away in one of the applications.  Another still isn't working, but is giving a different error.  The issue has to be in how VS resolves references in the designer, not in the code itself.

    • Post Points: 5
Page 1 of 1 (5 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems