I have a web.config file in a parent directory that applies to files in that directory. Then I have another web.config in a directory within the parent directory for it's files. It was running okay until our last release and now the aspx files in the subdirectory
give me a "Could not load the file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified." error. The web.config in the parent directory
has a reference to System.Web.Extensions in <sectiongroup> and <assemblies>, but the other web.config does not. If I copy those pieces from the other web.config into this one, I get "Section or group name 'system.web.extensions' is already defined. Updates
to this may only occur at the configuration level where it is defined." What can I do to fix this?
Thanks, I looked at the link, but mine is a different problem. The parent site is using the System.Web.Extensions piece and works fine. The child site does not use the System.Web.Extensions piece. It seems to me to be an inheritance issue, so I tried
using <remove> in the assemblies section of the child web.config. The error went away when I used it on my development server, but when I do it on my production server, I still get the error. I also tried using
<locationpath="."inheritInChildApplications="false"> around system.web in the parent web.config and that did not work.
using remove to unload the assembly is definitely the right way to do this. If it works on your dev server but not your production server, the change is working. Are you sure you copied the new web.config over?
Just checked it again - I'm positive the code is in there. Don't know if it will help, but here's the error text:
Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file
specified.
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.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
I have another clue that may help solve this puzzle. I remembered that with this release we are now using LINQ in the parent directory. I noticed that the parent web.config has 2 versions of the system.web.extensions assembly. Here's the assembly portion
of the file:
The “'System.Web.Extensions” is the Strong Named assembly that should be installed in GAC, the file not found issue should not caused by the relative path problem of the sub directory. In my opinion, the problem is the AJAX 1.0 extension is not installed
on the server.
To solve this issue, we can remove the “1.0.61025.0” version “System.Web.Extensions” assembly from the “assemblies” section. As you said, after doing that, the LINQ assembly not found issue appears. For this issue, I would recommend checking if .NET Framework
3.5 installed on the Server.
Sincerely,
Benson Yu
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.
webbertc
Member
3 Points
11 Posts
Could not load ... 'System.Web.Extensions' error
Aug 29, 2008 04:02 PM|LINK
I have a web.config file in a parent directory that applies to files in that directory. Then I have another web.config in a directory within the parent directory for it's files. It was running okay until our last release and now the aspx files in the subdirectory give me a "Could not load the file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified." error. The web.config in the parent directory has a reference to System.Web.Extensions in <sectiongroup> and <assemblies>, but the other web.config does not. If I copy those pieces from the other web.config into this one, I get "Section or group name 'system.web.extensions' is already defined. Updates to this may only occur at the configuration level where it is defined." What can I do to fix this?
cv_vikram
Star
8510 Points
1056 Posts
Re: Could not load ... 'System.Web.Extensions' error
Aug 29, 2008 05:12 PM|LINK
Friend, try this
http://forums.asp.net/t/1135367.aspx
Hope it helped you. Good luck!
This can be beneficial to other community members reading the thread.
webbertc
Member
3 Points
11 Posts
Re: Could not load ... 'System.Web.Extensions' error
Aug 29, 2008 05:44 PM|LINK
Thanks, I looked at the link, but mine is a different problem. The parent site is using the System.Web.Extensions piece and works fine. The child site does not use the System.Web.Extensions piece. It seems to me to be an inheritance issue, so I tried using <remove> in the assemblies section of the child web.config. The error went away when I used it on my development server, but when I do it on my production server, I still get the error. I also tried using <location path="." inheritInChildApplications="false"> around system.web in the parent web.config and that did not work.
Any ideas?
Bruce L
All-Star
18102 Points
2841 Posts
Re: Could not load ... 'System.Web.Extensions' error
Aug 29, 2008 06:08 PM|LINK
using remove to unload the assembly is definitely the right way to do this. If it works on your dev server but not your production server, the change is working. Are you sure you copied the new web.config over?
http://www.discountASP.NET
webbertc
Member
3 Points
11 Posts
Re: Could not load ... 'System.Web.Extensions' error
Aug 29, 2008 06:25 PM|LINK
Just checked it again - I'm positive the code is in there. Don't know if it will help, but here's the error text:
Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Source Error:
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.
webbertc
Member
3 Points
11 Posts
Re: Could not load ... 'System.Web.Extensions' error
Aug 29, 2008 09:15 PM|LINK
I have another clue that may help solve this puzzle. I remembered that with this release we are now using LINQ in the parent directory. I noticed that the parent web.config has 2 versions of the system.web.extensions assembly. Here's the assembly portion of the file:
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<add assembly="System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</assemblies>
However, when I take out either one of these, I get an error on the using statement that looks for LINQ.
Help, anyone????
Benson Yu - ...
All-Star
34797 Points
2497 Posts
Re: Could not load ... 'System.Web.Extensions' error
Sep 04, 2008 05:47 AM|LINK
Hi webbertc,
The “'System.Web.Extensions” is the Strong Named assembly that should be installed in GAC, the file not found issue should not caused by the relative path problem of the sub directory. In my opinion, the problem is the AJAX 1.0 extension is not installed on the server.
To solve this issue, we can remove the “1.0.61025.0” version “System.Web.Extensions” assembly from the “assemblies” section. As you said, after doing that, the LINQ assembly not found issue appears. For this issue, I would recommend checking if .NET Framework 3.5 installed on the Server.
Benson Yu
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.