Line 149: <add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" application

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 years ago
Hi,
First time I'm having such problems installating an ASP apps on remote web hosting servers.
All the files and folrders have been copied into a subdomain aaaa.mydomain.com setup as ASP .NET
Have the SQL Server database correctly initiated and ConnectionStrings.config modified (when running the apps locally it uses the SQL Server from the provider no problem).

Now, simply enterring http://aaa.mydomain.com  gives this error (and yes, I've also added LocalSqlServer into the ConnectionStrings.config for test, and still same problem.  My Hosting service is http://www.mochahost.com

Please HELP fast we're about to make decision in the next few hours on what package to use.
Thanks in advanve!!

============
Server Error in '/' Application.
--------------------------------------------------------------------------------

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 connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty.

Source Error:


Line 147:    <roleManager>
Line 148:      <providers>
Line 149:        <add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Line 150:        <add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Line 151:      </providers>


Source File: C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\machine.config    Line: 149

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4016
14 years ago
Ok, got over that part by adding "<clear/> in the web.config file after <providers>
==
<providers>
        <clear/>
        <add name="NopRoleManagerSqlProvider"
==

Now I'm STUCK with that stupid INSTALL.ASPX page that keep telling me that the line it wants in the ConnectionsStrings.config is not there AND IT IS THERE!!!

The install DOES NOT SEE that the database is ALREADY there neither!

What's wrong?  I should NOT HAVE the install.aspx running, all is configured, should be going to DEFAULT.ASPX

The site is running under a subdomain:   mysubdomain.mydomain.com

Anyways to SKIP the install.aspx from loading?

Thanks!
14 years ago
Amazing, the install.aspx can't correctly see the connection settings.

Anyway, I bypassed it in global.asa and put the connection info in webconfig so we'up.

CHANGES are required with the way this whole install/setup thing is implemented...  imho.

SF
14 years ago
It shouldn't be looking in the server's machine.config file for your app's connection string. The connection string should be in the ConnectionStrings.config file in the root of your app or the web.config file for the 1.4 version.



<connectionStrings>
    
<add name="NopSqlConnection" connectionString="Data Source=yourHostServerName.com;Initial Catalog=yourDatabaseName;User Id=yourDBUserName;Password=yourDBPassword" providerName="System.Data.SqlClient" />

</connectionStrings>

The connectionStringName="LocalSqlServer" is not what the name of the element that it's looking for. It has to be "NopSqlConnection", but not in the machine.config file. That is the global file for the server. It only looks there, I believe, if it can't find the correct name in the root of your web app.

Hope this helps

David
14 years ago
David... we all know what you are saying.  How can this be helping me??

I simply put the product on the subdomain I've created at the domain I'm managing at the hosting service (ie. www.mochahost.com).

If you know of something that should be changed, let me know...

BUT as I'm pointing out in the previous messages.... I THINK that this software is using incorrect relative directory positioning as where to find its files...  AKA the INSTALL.ASPX needs fixing, for one.

As for my first error...  Line 149: <add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" application...  You see what I had to do to fix it... (I MEAN TO JUMP OVER IT)...  The rest is up to the guys to make this software...

So, can you put some light on what is going on?  Or anyone else.
Thanks.
14 years ago
What version are you using? Presume 1.30.

1. Open web.config file
2. Find "NopMembershipSqlProvider" and "NopRoleManagerSqlProvider" elements
3. Add the following attribute to them -      connectionStringName="NopSqlConnection"
14 years ago
I have same problem with LocalSqlServer not found in the applications configuration

I been through a lot of hours researching for answer especially on this forum but not one helps.

I'm using 1.40, the problem is that the software is not using the connection LocalSqlServer  at all because i run a search on the whole site and it couldn't find that keyword.

The website runs perfectly after the installation. I encounter the problem above when I tried to Login and Register. It's the Member Role Manager Authentication on the Form.

Andrei suggested of adding the connectionstringname to "NopMembershipSqlProvider" and "NopRoleManagerSqlProvider" but it's already there.

Any suggestion?
14 years ago
I found a solution to my problem.

Just in case someone encounter this same exact problem hope this solution will work for you as well.

<membership defaultProvider="AspNetSqlMembershipProvider" userIsOnlineTimeWindow="15">
      <providers>
        <clear/>
<add name="AspNetSqlMembershipProvider" type="NopSolutions.NopCommerce.BusinessLogic.Profile.StoreMembershipProvider, Nop.BusinessLogic" connectionStringName="NopSqlConnection" minRequiredPasswordLength="5" minRequiredNonalphanumericCharacters="0" requiresQuestionAndAnswer="false" applicationName="NopCommerce"/>        
<add name="NopMembershipSqlProvider" type="NopSolutions.NopCommerce.BusinessLogic.Profile.StoreMembershipProvider, Nop.BusinessLogic" connectionStringName="NopSqlConnection" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="NopCommerce" requiresUniqueEmail="true" enablePasswordRetrieval="true"/>
        
      </providers>
    </membership>


do the ff:

change defaultProvider="NopMembershipSqlProvider to defaultProvider="AspNetSqlMembershipProvider"

then add
<add name="AspNetSqlMembershipProvider" type="NopSolutions.NopCommerce.BusinessLogic.Profile.StoreMembershipProvider, Nop.BusinessLogic" connectionStringName="NopSqlConnection" minRequiredPasswordLength="5" minRequiredNonalphanumericCharacters="0" requiresQuestionAndAnswer="false" applicationName="NopCommerce"/> as shown above

Things to consider:
if you got this error The entry 'AspNetSqlMembershipProvider' has already been added. You forgot to include <clear/>


The only question now is what will be the effect of adding AspNetSqlMembershipProvider on the web.config. By far i haven't encounter any problems. Just in case one of the developer of nopCommerce read by and knows the side effect please advise.

Happy programming
14 years ago
The system can not find that connection string, if it do not work why can not  add that  connection string in <connectionStrings> element at web.config by myself,  good luck with you.
13 years ago
I also encountered such problems, but I can not log into my website.please help me
I use NopCommerce 1.9
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.