When launching Web Site Administration Tool, I kept getting the following error when accessing the Security section.
There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to
a page where you can choose a new data store.
The following message may help in diagnosing the problem:
Could not load file or assembly 'Foundation' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be
loaded. (C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\web.config line 59)
I have no Runtime or Assembly section in my web.config file. Is that a problem? The application runs fine---it's when I try to use the Web Site Administration Tool and accessing the Security tab section.
check your solution by changing the .net exetension from your visual studio.
in solution explorer > right click > property pages (very bottom one) > target framework
Change the "Target Framework" to 4.0 and I got this error on my default page:
The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web application for version 3.5 or earlier of the .NET Framework, remove
the 'targetFramework' attribute from the <compilation> element of the Web.config file.
Description:
An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Configuration.ConfigurationErrorsException: The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web
application for version 3.5 or earlier of the .NET Framework, remove the 'targetFramework' attribute from the <compilation> element of the Web.config file.
Source Error:
An unhandled exception was generated during the execution of the current
web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
It seems that you set the web site in .net framework 4.0 on IIS application pool but build the project in .net in earlier version. As it mentioned, try to update your application to net 4.0.
mychucky
Exception Details: System.Configuration.ConfigurationErrorsException: The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web
application for version 3.5 or earlier of the .NET Framework, remove the 'targetFramework' attribute from the <compilation> element of the Web.config file.
There's a special section in web.config that will support manually upgrade .NET framework.
And now I got this error when I tried to access the web site.
The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web application for version 3.5 or earlier of the .NET Framework, remove
the 'targetFramework' attribute from the <compilation> element of the Web.config file.
Description:
An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Configuration.ConfigurationErrorsException: The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web
application for version 3.5 or earlier of the .NET Framework, remove the 'targetFramework' attribute from the <compilation> element of the Web.config file.
Source Error:
An unhandled exception was generated during the execution of the current
web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web application for version 3.5 or earlier of the .NET Framework, remove
the 'targetFramework' attribute from the <compilation> element of the Web.config file.
These scenarios occur because this web site was in a subfolder. And maybe there's a parent folder or application that contain a configuration file with a different or earlier version of .NET framework. IIS will return this error. One method I think is to
change the compiler version in web.config. Or try to remove the assemblies and compilers section in web.config.
Check this links and see paragraph #ASP.NET 4 Child Applications Fail to Start When Under ASP.NET 2.0 or ASP.NET 3.5 Applications, it give some solution for this issue.
mychucky
Contributor
4358 Points
3709 Posts
Web Site Administration Tool -- There is a problem with your selected data store
Apr 28, 2011 08:05 PM|LINK
When launching Web Site Administration Tool, I kept getting the following error when accessing the Security section.
There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.
The following message may help in diagnosing the problem: Could not load file or assembly 'Foundation' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. (C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\web.config line 59)
Any suggestion is much appreciated.
Shellymn
Contributor
2612 Points
485 Posts
Re: Web Site Administration Tool -- There is a problem with your selected data store
Apr 28, 2011 09:35 PM|LINK
I saw a similar post in msdn forums , please try this...
http://social.msdn.microsoft.com/Forums/en/wfprerelease/thread/020f38cf-1412-4b75-a5be-925961a34b35
vijayst
All-Star
16558 Points
3216 Posts
Microsoft
Re: Web Site Administration Tool -- There is a problem with your selected data store
Apr 29, 2011 03:11 AM|LINK
There could be problems in configuring the connection string.
Also, try upgrading the application to use Asp.net 4.0 or check the Runtime/Assembly portion of web.config to check for dependent assemblies.
http://liteblog.codeplex.com
mychucky
Contributor
4358 Points
3709 Posts
Re: Web Site Administration Tool -- There is a problem with your selected data store
Apr 29, 2011 01:53 PM|LINK
In the IIS 7 Appliation Pool, I did set the web appliation to use ASP.NET 4.0. In the web.config, it also has this:
<system.codedom> <compilers> <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <providerOption name="CompilerVersion" value="v4.0" /> <providerOption name="WarnAsError" value="false" /> </compiler> </compilers> </system.codedom>I have no Runtime or Assembly section in my web.config file. Is that a problem? The application runs fine---it's when I try to use the Web Site Administration Tool and accessing the Security tab section.ramiramilu
All-Star
95503 Points
14106 Posts
Re: Web Site Administration Tool -- There is a problem with your selected data store
Apr 29, 2011 01:59 PM|LINK
This might be useful for you -
http://forums.asp.net/t/1088928.aspx/1
http://msdn.microsoft.com/en-us/library/yy40ytx0(v=vs.85).aspx
Thanks.
JumpStart
Abhimanyu Ku...
Member
611 Points
198 Posts
Re: Web Site Administration Tool -- There is a problem with your selected data store
Apr 29, 2011 02:22 PM|LINK
check your solution by changing the .net exetension from your visual studio.
in solution explorer > right click > property pages (very bottom one) > target framework
mychucky
Contributor
4358 Points
3709 Posts
Re: Web Site Administration Tool -- There is a problem with your selected data store
Apr 29, 2011 08:02 PM|LINK
Change the "Target Framework" to 4.0 and I got this error on my default page:
The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web application for version 3.5 or earlier of the .NET Framework, remove the 'targetFramework' attribute from the <compilation> element of the Web.config file.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Configuration.ConfigurationErrorsException: The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web application for version 3.5 or earlier of the .NET Framework, remove the 'targetFramework' attribute from the <compilation> element of the Web.config file.
Source Error:
Zizhuoye Che...
All-Star
21915 Points
1915 Posts
Re: Web Site Administration Tool -- There is a problem with your selected data store
May 03, 2011 02:43 AM|LINK
Hi,
It seems that you set the web site in .net framework 4.0 on IIS application pool but build the project in .net in earlier version. As it mentioned, try to update your application to net 4.0.
There's a special section in web.config that will support manually upgrade .NET framework.
<system.web>
<compilation debug="true" targetframework="4.0"/>
</system.web>
You can check these links for this error:
http://stackoverflow.com/questions/3314469/asp-net-4-0-how-do-i-fix-the-compilerversion-iis-error
http://www.asp.net/learn/whitepapers/aspnet4/breaking-changes#0.1__Toc256770150
How to Upgrade an ASP.NET Web Application to ASP.NET 4:
http://msdn.microsoft.com/en-us/library/dd483478.aspx
See (paragraph #To manually upgrade an application's Web.config file from the .NET Framework 3.5 to the .NET Framework 4)
Hope this can help you.
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework
mychucky
Contributor
4358 Points
3709 Posts
Re: Web Site Administration Tool -- There is a problem with your selected data store
May 03, 2011 01:56 PM|LINK
I put this section in:
<compilation targetFramework="4.0"> <assemblies> <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="System.Data.Services.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="System.Data.Services.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> </assemblies> </compilation>And now I got this error when I tried to access the web site.
The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web application for version 3.5 or earlier of the .NET Framework, remove the 'targetFramework' attribute from the <compilation> element of the Web.config file.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Configuration.ConfigurationErrorsException: The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web application for version 3.5 or earlier of the .NET Framework, remove the 'targetFramework' attribute from the <compilation> element of the Web.config file.
Source Error:
Zizhuoye Che...
All-Star
21915 Points
1915 Posts
Re: Web Site Administration Tool -- There is a problem with your selected data store
May 04, 2011 02:05 AM|LINK
Hi,
These scenarios occur because this web site was in a subfolder. And maybe there's a parent folder or application that contain a configuration file with a different or earlier version of .NET framework. IIS will return this error. One method I think is to change the compiler version in web.config. Or try to remove the assemblies and compilers section in web.config.
Check this links and see paragraph #ASP.NET 4 Child Applications Fail to Start When Under ASP.NET 2.0 or ASP.NET 3.5 Applications, it give some solution for this issue.
http://www.asp.net/learn/whitepapers/aspnet4/breaking-changes#0.1__Toc256770150
Similar thread:
http://stackoverflow.com/questions/3314469/asp-net-4-0-how-do-i-fix-the-compilerversion-iis-error
Hope this can help you.
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework