Home
Options

How to use with existing business & data access DLLs & app.config

My data access DLL expects to find a connection string in app.config or web.config. Where would I put that when using LinqPad?

Comments

  • Options
    OK, found out I need to create Linqpad.config in the exe dir. Did that and added the connections string and a, appSetting, but can't return them to LP.

    Here is my config file:
    image

    and here is my code. Both statements return null:
    var setting = ConfigurationManager.AppSettings["MySetting"];
    Console.WriteLine(setting);

    var con = ConfigurationManager.ConnectionStrings["MyConnectionString"];
    Console.WriteLine(con);
  • Options
    edited November 2013
    For some reason image of config didn't show so here it is. Am I doing something wrong?

    OK, I can't paste my config or an imag
  • Options
    SOLVED - works when running as administrator.
Sign In or Register to comment.