After adding assebly to System.Data.Entity to my web configuration, I got this error: Error using a section registered as allowDefinition = 'MachineToApplication' that exceeds the application level. This error can be caused by the fact that the virtual directory is not configured as an application in IIS.
I deleted the obj and bin folders, I deleted the authentication = "windows" line, tried to open it again, as some said it worked, I checked that there is only 1 web.config in the main folder (Entity Framework - Folder for forms, models , DAL and BLL) ...
What other reasons for this to happen? I searched everywhere, and basically these were the reasons I found ....
This is my web.config, if that matters:
<configuration> <connectionStrings> <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" /> <add name="CStringVKB" connectionString="Data Source=.;Initial Catalog=VKB;Persist Security Info=True;User ID=websiteservice;Password=websiteservice" providerName="System.Data.SqlClient" /> </connectionStrings> <system.web> <compilation debug="true" optimizeCompilations="true" targetFramework="4.0" > <assemblies> <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> </assemblies> </compilation> <!--<authentication mode="Windows"> <forms loginUrl="~/Account/Login.aspx" timeout="2880" /> </authentication>--> <membership> <providers> <clear/> <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" /> </providers> </membership> <profile> <providers> <clear/> <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/> </providers> </profile> <roleManager enabled="false"> <providers> <clear/> <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" /> <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" /> </providers> </roleManager> </system.web> <system.webServer> <modules runAllManagedModulesForAllRequests="true"/> </system.webServer> </configuration>
What can I do to solve this problem?
Kerieks
source share