The specified connectionStringName, 'LocalSqlServer', was not registered.

Vote:
 

Hi,

I tried to enable webparts in my solution the other day, and now I get an error that
I have a hard time to remove.

The error is shown below. I just can't find the error in my solution.
I have removed the tag for webparts in web.config, but I still get the error.

Anybody that have experienced this??

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: The specified connectionStringName, 'LocalSqlServer', was not registered.

Source Error:

Line 315:            <personalization>
Line 316: <providers>
Line 317: <add connectionStringName="LocalSqlServer" name="AspNetSqlPersonalizationProvider" type="System.Web.UI.WebControls.WebParts.SqlPersonalizationProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 318: </providers>
Line 319:


Source File: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Config\web.config    Line: 317

 

#47255
Jan 20, 2011 17:16
Vote:
 

It seems from the path that this line is read from your computer's default web.config. Try to add the personalization node to your site's web config and use "EPiServerDB" (the default when installing EPiServer), or whatever your connection string is called, as connectionStringName. Then that section should be read from your site's config instead of the default config.

#47260
Jan 21, 2011 7:56
Vote:
 

Webparts and personalization is added to web.config nad the connectionStringName="EPiServerDB".

In the connectionstring.config file I added  <remove name="LocalSqlServer" /> as the first line inside the connectionstring section.

Webpart configuration:

    <webParts>
            <personalization defaultProvider="EPiServerPersonalizationProvider">
                <providers>
					
                    <add name="EPiServerPersonalizationProvider" type="EPiServer.WebParts.Core.EPiServerPersonalizationProvider" connectionStringName="EPiServerDB" />
                </providers>
                <authorization>
                    <allow verbs="enterSharedScope" roles="WebAdmins, WebEditors, Administrators" />
                </authorization>
            </personalization>
    </webParts>
    

I'm not supposed to have webparts enabled in my website so I really want to remove it, but I can't seem to find what causes the problem.
I know that "LocalSqlServer" is the default connectionstringname, but isn't it a way to bypass this?

I thought

<remove name="LocalSqlServer" />

should take care of this...

#47264
Jan 21, 2011 9:09
Vote:
 

I'm sorry, I got the personalization mixed up with the profile... So I have no idea really, I'm afraid.

Using remove on the connectionstring in connectionstrings.config probably won't help though, since it is looking for the key "LocalSqlServer". Rather, you should ADD that to your connectionStrings.config, that way it is at least found. If it doesn't point to a valid database you could get other errors of course so it doesn't necessarily solve the problem, but it could remove the immediate error.

#47265
Jan 21, 2011 9:58
Vote:
 

Hi. Have you tried adding <clear /> first in the <providers> section? That should do the trick!

<providers>

<clear/>

<add name="EPiServerPersonalizationProvider" type="EPiServer.WebParts.Core.EPiServerPersonalizationProvider" connectionStringName="EPiServerDB" />

</providers>

#47271
Jan 21, 2011 12:14
Vote:
 

HMMMM! With a big H. I'm sure I tried this yesterday, but with no luck. It worked today.
Perhaps there was some kind of caching involved.
I knew it was something simple.

Well, thank you for helping out, Tore!

#47278
Jan 21, 2011 14:16
Vote:
 

Great to hear that you solved your problem!

Strange that it did not work yesterday. Do you have it in an external config file <webParts configSource="webParts.config" />? If so, the change was probably not read because you need to restart the application to trigger it read the external config files again.

#47281
Jan 21, 2011 15:12
Vote:
 

Thanks for the tip Tore. Yes, I know that you have to restart the application, but it wasn't in an external config file.

It's a mistery why it didn't work. As long as it works, I don't care what the problem was.

Thanks again, Tore! :)

#47285
Jan 21, 2011 15:39
Vote:
 

Strange.... As long as it works now, I totally agree with you :)

#47286
Jan 21, 2011 15:41
Vote:
 

Hi,

I am new to using the webparts in EPiServer CMS 6.Actually i follwed the below link

http://tedgustaf.com/en/blog/2008/8/using-web-parts-in-episerver/

for installing,using and creating our own webpart......everything works fine.....but the issue is regarding to clock webpart it is not diplaying the Edit option along with Minimise,Delete options.......i followed the guidelines what is mentioned in that article.....still why i am lacking that option?Can any one figure out this?..............

#52387
Jul 21, 2011 9:31
Vote:
 

Thx guys i also had the same problum and the solution worked for me also

#55860
Dec 21, 2011 10:17
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.