Can someone tell me what is wrong here?

G

Guest

I just added the SQL connection string to my web.config:

________________________________________
<configuration>

<system.web>
<customErrors mode="Off"/>
compilation debug="true"/>
</system.web>
<appSettings>
<add key="ConnectionString"
value="server=localhost;database=testdb;uid=sa;password=!@#ddi386;"/>
</appSettings>
</configuration>
__________________________________________

Now I am getting a runtime error telling me to turn <customErrors
mode="Off"/>
but I already have that set. The page I am trying to access is in the same
directory my web.config I just post. Can anyone help me out?

Thanks in advance
 
K

Kevin Spencer

"localhost" is an alias used by your web server, not by SQL Server. Try
using your machine name, or the local loopback IP address of the machine
(127.0.0.1), or the LAN address of the machine instead.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Everybody picks their nose,
But some people are better at hiding it.
 
G

Guest

Thanks for your reply. I changes the ip to 127.0.0.1 and then the lan ip but
still the same error message.
 
R

rviray

Here is a little trick that you can do to verify that the connectio
string is correct.

Just drop and drag a SQL Connection object onto a test form, then loo
at the properties of the SqlConnection object and there will be
property of Connection String...it puts other bits of info that yo
really don't need, but you will get the correct syntax an
spellings....

Hope this helps...
 
U

Ulf Kristian S. Kristiansen

Bigal said:
I just added the SQL connection string to my web.config:

________________________________________
<configuration>
<system.web>
<customErrors mode="Off"/>
compilation debug="true"/>
</system.web>
<appSettings>
<add key="ConnectionString"
value="server=localhost;database=testdb;uid=sa;password=!@#ddi386;"/>
</appSettings>
</configuration>
__________________________________________

Now I am getting a runtime error telling me to turn <customErrors
mode="Off"/>
but I already have that set. The page I am trying to access is in the same
directory my web.config I just post. Can anyone help me out?


You're missing an "<" on the fourth line. Fourth line in your config should
read:
<compilation debug="true"/>

My guess is that you missed this part as you set customErrors off, the
server is no longer able to read the config and is still going with the
previous config.
 
K

Kevin Spencer

Well, you're going to have to give us more information about the error.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Everybody picks their nose,
But some people are better at hiding it.
 
G

Guest

Figured it out. The OS was 2003 server and I didnt have sql service pack
installed. That is a requirement for running sql server 2000 on windows 2003

thanks for everyone time.

AL
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top