views:

114

answers:

3

Parser Error Message: The entry 'SiteSqlServer' has already been added.

Source Error:

Line 23: providerName="System.Data.SqlClient"/> -->

Line 24: < ! -- Connection String for SQL Server 2000/2005 -->

Line 25: <add name="SiteSqlServer" connectionString="Server=(local);

abase=DotNetNuke2; uid=nukeuser;pwd=dotnetnuke;" providerName="System.Data.SqlClient" / >

Line 26: </connectionStrings>

Line 27: <appSettings>

Does anyone know the work around???

+1  A: 

It seems there are two connection strings named "SiteSqlServer" in your web.config file. Can you post the complete section of the config file?

M4N
no, i checked... there is only one
Samiksha
A: 

Maybe this post in the dotnetnuke forums helps:

The entry 'SiteSqlServer' has already been added

M4N
+1  A: 

Here is the work around which i followed yesterday to solve my problem:

If there is an application at the root of the site that already defines the 'SiteSqlServer' key, then that is why you are getting the error.

You could try and change the connectionString section to look like this:

<connectionStrings>

<remove name="SiteSqlServer" />

<add name="SiteSqlServer" connectionString="server=(local);uid=;pwd=;Trusted_Connection=yes;database=communityserver" />

</connectionStrings>

Remove the old key, then add the new one.

you can try to clear the connection strings on the first line in the same section in web.config.

<connectionStrings>
<clear />

...

This effectively prevents inherited connections.

Samiksha