Last post May 15, 2010 08:44 AM by hans_v
May 14, 2010 07:16 PM|lahorya|LINK
I have got a small website with MS Access Database. I have used access membership provide with it. i bought hosting with Discountasp.net when i uplaoded my web to the server it gives me following error. It works perfect on my local machine.
i have contacted the support guys they say there is somthing worng with my web config there is nothing pointing to sql server in my web config. here is my error message. I have a hosting with iis 6 it does work on that but it does not with with iis7. Can
anyone please help. Thanks in advance.
Line 158: <roleManager>Line 159: <providers>Line 160: <add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=126.96.36.199, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>Line 161: <add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=188.8.131.52, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>Line 162: </providers>
Version Information: Microsoft .NET Framework Version:2.0.50727.4016; ASP.NET Version:2.0.50727.4016
May 15, 2010 02:01 AM|Chintan Dave|LINK
pls refer these 2 post. u get ur answer from there.
i hope it help
May 15, 2010 08:44 AM|hans_v|LINK
Well, I think the error is quit clear!
"The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty"
Both the membershipprovider and roleprovider (and others) are using by default the LocalSqlServer Connectionsstring which is specified in the connectionstrings section of web.config. But in your web.config, you'll not see it there. So when you upload it
to your hosting company, you'll get this error. That it does work on your local machine is because the LocalSqlServer Connectionstring is in your machine.config file.
You say you're using the Access Membership provider. If you don't want to use the role provider, simply remove the rolemanager section completly. When you don want to use the (Access) Role Provider, you need to remove line 160 and add a new entry pointing
to the right connectionstring (the same that you used for the membership provider), but also set the other properties so that they point to your Access Role Provider....