Database connection in web.config file not read when deploy to different machine

4 posts, 1 answers
  1. mattc
    mattc avatar
    21 posts
    Member since:
    Aug 2007

    Posted 02 Mar 2009 Link to this post

    Hello all

    got a weird problem that I can't see round.

    Got an ORM created class with a connection string in the app.config
    Am adding this class in a web project. If I put a different connection string with the same name in the web config it uses this connection as it should.

    However, when I publish the web site and copy it to another server for testing it refuses to use the web.config connection and reverts to the version in the ORM class.... I can't see why.

    Anyone seen this happen?

    Thanks

    Matt
  2. Answer
    Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 02 Mar 2009 Link to this post

    Hi mattc,
    The behavior itself is a workaround for web apps, if we do not find the connection node in the web.config we try to read it from the file with the persistent classes inside.

    The web.config is red by our Telerik.OpenAccess.Config.dll. It is absolutely necessary that you deploy this assembly to your machines.

    Best wishes,
    Jan Blessenohl
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft banner
  4. mattc
    mattc avatar
    21 posts
    Member since:
    Aug 2007

    Posted 03 Mar 2009 Link to this post

    Hi Jan

    Great thanks for that, works as expected now. Had the main ORM reference in the GAC on the development machine so the other DLLs were not being added explicitly.

    Thanks

    Matt
  5. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 03 Mar 2009 Link to this post

    Hi mattc,
    Sorry for the confusion, we are throwing a special error now to make it easier to detect that problem.

    Kind regards,
    Jan Blessenohl
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top