Migration Solutions for ColdFusion Applications to ASP.NET
      
New Atlanta Product Forums Profile | Search | Login | RSS
New Topic Reply   Previous Page  Page: 1   Next Page

Thread: DSN not working in BD 9 Alpha - Unrecognized element - datasource
Created on: 07/28/13 05:28 PM Replies: 2
sugardaddy


Joined: 07/16/13
Posts: 2
DSN not working in BD 9 Alpha - Unrecognized element - datasource
07/28/13 5:28 PM

Just installed 9 and am having trouble configuring the DSNs for my site. I got into IIS and set them up as they were in 7, and it takes it. Then I load a page with a db call and I get the error below.

I did notice that 7 encrypted my password before it stored it in web.config, but when I view that file in 9, I see the dsn as a new xml node, but the pw is NOT encrypted! For grins, I even tried sticking the encrypted string into the password attribute as a hail mary, but it didn't work.

The error seems to be that the < datasource > node isn't expected there, but that's where BD console put it!

Thanks for any help!

Win 7 box. IIS 7.5. Eval/single IP version of BD.

-----------------

(Note that I have replaced all sensitive values with "myDsn...", etc.)

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Unrecognized element 'datasource'.
Source Error:
Line 23: </cfmlcustomtags>
Line 24: <cfquery>
Line 25: <datasource
name="myDSN"
databasename="myDbName"
drivername="com.newatlanta.NET.sql.Driver"
drivertype="0"
description="MyDesc"
hoststring="jdbc:ADO.NET:sqlserver://myServerName,1433/myDbName"
initstring=""
connectstring=""
maxconnections="24"
logintimeout="120"
connectiontimeout="120"
maxlivetime="1800"
maxusage="1000"
connectionretries="0"
port="1433"
servername="myServerName"
username="myUsername"
password="myPassword"
perrequestconnections="false"
/>
Line 26: </cfquery>
Line 27: </bluedragon>
Source File: C:\dir\path\to\web.config Line: 25
Link | Top | Bottom
sugardaddy


Joined: 07/16/13
Posts: 2
RE: DSN not working in BD 9 Alpha - Unrecognized element - datasource
07/29/13 12:40 PM

For now, I've gotten around this by using the connectionstrings node instead of using BD. This node is a child of < configuration >, and therefore a sibling of < system.webServer >. Note that this one stores the password in clear text, not encrypted!

<connectionStrings>
<add name="myDsn" connectionString="Data Source=myDbServerName; Initial Catalog=myDefaultDatabase; user id=myUserName; password=myPassword" />
</connectionStrings>
Link | Top | Bottom
Joyrex


Joined: 02/02/09
Posts: 11
RE: DSN not working in BD 9 Alpha - Unrecognized element - datasource
08/18/16 11:28 AM

I know this is years later, but you can encrypt (and should encrypt) your web.config file:

https://msdn.microsoft.com/en-us/library/bb986855.aspx
Link | Top | Bottom

New Post
Please login to post a response.


company media information terms of use privacy policy contact us
This page was dynamically built on the BlueDragon CFML Engine