Reputation: 3736
I am using windows 8.1 on which I have installed VS2012 and VS2013 and I am running my website on IIS but whenever I run my project it gives an error about LocalSqlServer connection string is empty in my machine config. I looked at my machine config under "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config" directory and found that connection string is there. I have nearly spent 2 days but couldn't get my site to run on IIS. Any help is appreciated?
Server Error in '/GCC.Server' 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 257: <roleManager>
Line 258: <providers>
Line 259: <add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 260: <add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 261: </providers>
Source File: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config Line: 259
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34009
This is the complete error as image was not readable due to my laptop resolution.
Upvotes: 0
Views: 2094
Reputation: 3736
I got it working and got bit late to reply. Answer is very simple in my case issue was under IIS. I went to IIS. Selected defualt website and clicked on modules. Under modules just remove System.Web.Security.RoleManagerModule.
Upvotes: 1