Hello All,
If this is a repeat of posting that have been created, I sincerely apologize. I have been looking for a solution for quite some time and although I have run across a lot of different posts offering solutions, nothing seems to be work.
Here is my dilemma:
I have created a website with several pages using ASP.NET 2.0 and AJAX Extensions (including the AJAX Control Toolkit). The pages run fine on my Development machine but on my IIS machine, I continue to recreate a Parser Error in regard to System.Web.Extensions.
Here is what I have done thus far:
I have an XP machine running IIS.
- I have ASP.NET 2.0 installed as well as the AJAX Extensions.
- I have tried copying the dlls into the bin folder.
- I have tried restarting IIS.
- I have tried changing the PublicKeyToken to all caps.
- I have tried modifying my Web.Config (per a few websites)
Here is the exact error that I am seeing:
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load file or assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source Error:
Line 1: <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
Line 2: <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
Line 3: <%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Line 4: Namespace="System.Web.UI" TagPrefix="asp" %>
Line 5:
Source File: /MasterPage.master Line: 3
Any suggestions on what I can try next?
![]() |
0 |
![]() |
Thanks for the reply. I have installed the AJAX Extensions on the XP machine (server). When this failed to eliminate the error, I then copied the System.Web.Extensions dll to the BIN folder under wwwroot, where the website is located. Neither have eliminated the error.
![]() |
0 |
![]() |
'System.Web.Extensions, Version=3.5.0.0?????
Why are using .NET 3.5 extensions for a .NET 2.0 project. That's going to hurt you....
Look at your web.config file and compare it to the default one located in C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025.
And as well right click on your System.Web.Extensions DLL you are using to check that it is version1.0.61025.0
Wray
P.S. I assume you did install only the 1.0 RTM version of Ajax and that you don't need to uninstall futures you don't need to clean up anything upset by them.
![]() |
0 |
![]() |
Wow, in my hurry to research the error, I didn't take notice that it was using 3.5 framework. I didn't even realize that 3.5 had been installed on any of my machines. I will take a look and see why it is using 3.5. Thanks!
![]() |
0 |
![]() |
Maybe you are pre-compiling in a VS2008 machine.
You can solve that problem by running a microsoft script that disable the AjaxPolicy.
After that you only have to re-precompile the project and load the new dll generated in your bin directory.
This fix the problem. You can find that script here: http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx
P.S.
After that, your project will work properly on the webserver because him uses the previous version of the assemby but on your machine you will maybe find other problems: the pages that uses that assembly without specify the version number will fail with an error message about that assembly.
To solve that problem you have to reference the assembly in the pages specifying the version number in this way
Example:--------------------------------
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>
---------------------------------------------
ITALIANO:
Il problema è causato da una "incompleta" installazione di VS2008. Microsoft infatti consiglia, dopo l'installazione, l'esecuzione di uno script che si trova qui (http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx ) e permette di disabilitare AjaxPolicy; il che è indispensabile per non interferire negativamente nella pre-compilazione di progetti scritti in aspnet 2.0 ajax.
Dopo l'esecuzione di tale script è sufficiente ricompilare il progetto e copiare le dll appena generate nella directory bin sul webserver.
Ora tutto ok sul webserver perché lui usa la precedente versione dell'assembly ma potreste incontrare altri problemi sulla vostra macchina in fase di debug.
Se doveste avere errori relativi allo stesso assembly, controllate bene di aver referenziato correttamente l'assembly nelle pagine che ne fanno uso.
Esempio:
-----------------------------------------------
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>
----------------------------------------------Dario Iacampo
![]() |
0 |
![]() |
Thanks, JackNova, that fixed my problem, too!
If my post is your answer, please mark it as the answer. It will bring good karma.
Crystal Alliance
My Blog
Florist Blogs
![]() |
0 |
![]() |
i found a way to take care of this... but... im a little curious.. i have vs2008 installed and obviously 3.5 installed but im using my copy of VS2005 and i did a new ajax project and it is for some reason assuming its a 3.5 project.. is this part of the ajax install or did 3.5 sink its claws in too deep?
Justin
![]() |
0 |
![]() |
hello.
there are some issues that might make you get into problems. I've written a small post here about it:
--
Regards,
Luis Abreu
email: labreu_at_gmail.com
EN blog:http://msmvps.com/blogs/luisabreu
![]() |
0 |
![]() |