This is a migrated thread and some comments may be shown as answers.

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

3 Answers 120 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
mattc
Top achievements
Rank 2
mattc asked on 02 Mar 2009, 03:47 PM
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

3 Answers, 1 is accepted

Sort by
0
Accepted
Jan Blessenohl
Telerik team
answered on 02 Mar 2009, 07:25 PM
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.
0
mattc
Top achievements
Rank 2
answered on 03 Mar 2009, 10:51 AM
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
0
Jan Blessenohl
Telerik team
answered on 03 Mar 2009, 12:56 PM
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.
Tags
General Discussions
Asked by
mattc
Top achievements
Rank 2
Answers by
Jan Blessenohl
Telerik team
mattc
Top achievements
Rank 2
Share this question
or