none
Getting an error "Could not load file or assembly 'XmlSerializationConfig' or one of its dependencies. The system cannot find the file specified." RRS feed

  • Question

  • Hi, All

    I am using custimized config section app.config and when I called:

    ConfigurationSettings

     

    .GetConfig("TickData");

    I got this exception:

    An unhandled exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll

    Additional information: An error occurred creating the configuration section handler for TickData: Could not load file or assembly 'XmlSerializationConfig' or one of its dependencies. The system cannot find the file specified.

    I am using VS2005 2.0 .NET.

     

    Please help me to resolve it.

     

    Thanks,

     

    Rick

     

     

    Friday, March 11, 2011 3:56 PM

Answers

  • Hi Ricku,

    What is the exact names of you namespace and class? You should give the correct namespace & class names in app.config (with correct case).

    <configSections>
      <section name="TickData" type= "XmlSerializationConfig.BasicConfigurator, XmlSerializationConfig" />
    </configSections>
    

    In the ensure "XmlSerializationConfig" is your namespace and "BasicConfigurator" is your class name with correct spelling. Once they are correct, then it will work fine.

     


    Please mark this post as answer if it solved your problem. Happy Programming !!!
    • Proposed as answer by Paul Zhou Monday, March 14, 2011 6:32 AM
    • Marked as answer by Paul Zhou Monday, March 21, 2011 2:10 AM
    Friday, March 11, 2011 5:11 PM

All replies

  • Hi, Adavesh

    Here it is:

     

    <?

     

     

    xml version="1.0" encoding="utf-8" ?>

    <

     

     

    configuration>

    <

     

     

    configSections>

    <

     

     

    section name="TickData"

     

     

     

    type="XmlSerializationConfig.BasicConfigurator,

    XmlSerializationConfig

     

     

    " />

    </

     

     

    configSections>

    <

     

     

    appSettings>

    <

     

     

    add key="AppName" value="OneTickHistDataLoader"/>

    <

     

     

    add key="LogDir" value="c:\\OneTickHistDataLoader\\log" />

    <

     

     

    add key="DataSource" value="TickData" />

    <

     

     

    add key="WorkDir" value="c:\\OneTickHistDataLoader\\work" />

    <

     

     

    add key="OneTickConfig" value="C:\\omd\\client_data\\config\\one_tick_config.txt"/>

    <

     

     

    add key="OneTickDatabase" value="GCM_EBS" />

    <

     

     

    add key="OneTickContext" value="DEFAULT" />

    <

     

     

    add key="BatchSize" value="500000" />

    <

     

     

    add key="AppendOnly" value="true" />

    <

     

     

    add key="EmailServer" value="gcm-mailr" />

    <

     

     

    add key="EmailSender" value="yliu@grahamcapital.com"/>

    <

     

     

    add key="EmailReceiver" value="yliu@grahamcapital.com"/>

    </

     

     

    appSettings>

    <

     

     

    TickData>

    <

     

     

    TickDataConfiguration SourceDir="\\gcm-mdatahist\SourceData\TickData\Equities\US" DataSource="TickData" Year="2011"/>

    </

     

     

    TickData>

    </

     

     

    configuration>

    Friday, March 11, 2011 4:18 PM
  • Hi Ricku,

    What is the exact names of you namespace and class? You should give the correct namespace & class names in app.config (with correct case).

    <configSections>
      <section name="TickData" type= "XmlSerializationConfig.BasicConfigurator, XmlSerializationConfig" />
    </configSections>
    

    In the ensure "XmlSerializationConfig" is your namespace and "BasicConfigurator" is your class name with correct spelling. Once they are correct, then it will work fine.

     


    Please mark this post as answer if it solved your problem. Happy Programming !!!
    • Proposed as answer by Paul Zhou Monday, March 14, 2011 6:32 AM
    • Marked as answer by Paul Zhou Monday, March 21, 2011 2:10 AM
    Friday, March 11, 2011 5:11 PM
  • These msdn articles may help understanding config file.

    http://msdn.microsoft.com/en-us/library/ms228245.aspx

    http://msdn.microsoft.com/en-us/library/ms228256.aspx

     


    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Saturday, March 12, 2011 4:02 AM
  • Hi Rick,

     

    Does Adavesh’s suggestion work on?

    If any concerns, please feel free to let us know.

     

    Have a nice day.


    Paul Zhou [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, March 14, 2011 6:33 AM
  • Hi Ricku,
    Has your issue been resolved?

    Now I will mark an answer. You could “Unmark As Answer if it doesn’t make sense.

     

    Have a nice day!


    Paul Zhou [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, March 21, 2011 2:11 AM