RE: Connection strings?

Tech-Archive recommends: Fix windows errors by optimizing your registry



{\rtf1\ansi\ansicpg936\deff0\deflang1033\deflangfe2052{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\lang2052\f0\fs20 Hi Simon,
\par
\par I have seen your another thread on this issue in the same newsgroup. I've replied you there. Welcome to followup and continue to discuss in that thread.
\par
\par Sincerely,
\par
\par Steven Cheng
\par
\par Microsoft MSDN Online Support Lead
\par
\par
\par This posting is provided "AS IS" with no warranties, and confers no rights.
\par \pard\li720 --------------------
\par From: "Simon" <none@xxxxxxxx>
\par Subject: Connection strings?
\par Date: Sat, 29 Dec 2007 22:30:10 +010
\par
\par I have created new web service and inserted connection strings to web.config
\par file:
\par
\par <connectionStrings>
\par <add name="ConnStr" connectionString="XXXXXXXX"/>
\par </connectionStrings>
\par
\par When I try to read this connection string:
\par
\par coll = ConfigurationManager.ConnectionStrings;
\par connStr = coll[0].ConnectionString;
\par connStr = coll["ConnStri"].ConnectionString;
\par
\par coll has only one member and that one has ConnectionString value:
\par "data source=.\\SQLEXPRESS;Integrated
\par Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User
\par Instance=true"
\par
\par If I try to read the "ConnStr" value I get null reference exception.
\par
\par Why is that? Is it not enough to change the Web.config file in project and
\par that should work?
\par
\par Thank you
\par
\par Simon
\par
\par \pard
\par
\par }

Relevant Pages

  • problems
    ... because ConnStr is not found. ... Is there something that I have to run to update the connection strings? ... Best regards ... Simon ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Help with global.asa & sql database
    ... Read the article about changing the connection strings, ... having multiple includes for different databases, ... If I move the test.asp file to the ROOT directory, ... Please reply to the newsgroup. ...
    (microsoft.public.inetserver.asp.db)
  • Re: ODBC
    ... If the external application wants a DSN, ... there are connection strings here: ... looks only for an ODBC connection. ... Please respond in the newsgroup and not by email. ...
    (microsoft.public.access.externaldata)
  • Re: tesco mobile GPRS and Audiovox RTM 8000 settings?
    ... go to the Microsoft.public.pocketpc.wireless newsgroup and look at the "ipaq ... 5550 GPRS" thread it should give you some ideas on connection strings. ...
    (microsoft.public.pocketpc)