Last post Nov 26, 2008 07:56 PM by exuviae
Nov 25, 2008 11:48 PM|alex2go|LINK
I have an asp.net2.0 website that I'm trying to deploy. This isn't my first deployment of such a website, and Im very familiar with the hosting setup Im using.
This website was regularly deployed to a test server during production. It worked fine until the final deployment.
Now I get this error when I try to load the site remotely (It runs fine still on my development machine):
Parser Error Message: Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad3xxxxx' or one of its dependencies. The system cannot find the file specified. (E:\kunden\homepages\24\d2542xxxxx\web.config
Line 63: <httpModules>
Line 64: <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD3xxxxx"/>
Line 65: </httpModules>
I have erased and reloaded everything a few times - reloaded the database tables, recompiled the website, checked that all database references and login were correct.
Since I have no errors on my machine, I really have no way to "debug" this. I can't imagine how I could be missing something. I've uploaded the site countless times.
Nov 26, 2008 02:05 AM|exuviae|LINK
Are you sure asp.net 2.0 is installed on the machine you are deploying to and that iis is configured to run asp 2.0? It may sound like a stupid question, but that script module is part of asp 2.0, if asp 2.0 is installed then there is some error with your
installation, all asp 2.0 installs should find that assembly...and no need to xxx out the public key since it is the same for everyone :)
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
Nov 26, 2008 02:15 AM|alex2go|LINK
Yes Asp.net2.0 is installed on the server.
Im having the same problem with two different hosting accounts - on being a "test" server that I use to test all my Asp.net2.0 applications before I deploy them to the final hosting server. This server had this same application running on it earlier today.
I recompiled after the few days worth of work and now it is unoperable.
So yes, I know for sure that there is not a problem with the server.
Nov 26, 2008 02:19 AM|alex2go|LINK
And another interesting point -
the line of code apparently causing the problem was part of my earlier deployments, which worked just fine.
Nov 26, 2008 02:33 AM|exuviae|LINK
Ok i am getting really tired, i been on to long. What i ment to say is that assembly belongs to Ajax 1.0, and if you are using asp.net 3.5 you need to change that line to :
assembly="System.Web.Extensions, Version=126.96.36.199, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
If you are running asp.net 2.0 and ajax leave the line as it is. The assembly is put in the gac when you install ajax. If you are using .net 3.5 in vs2008 it doesn't change the reference, so you will
get that error and have to change the line manually to the one above. Other than that, the only cause for the error is a missing or damaged install.
Nov 26, 2008 02:36 AM|alex2go|LINK
to reiterate, I AM using ASP.NET 2.0
It can't be a damaged install. I told you I had the project running on the same server successfully earlier today.
Nov 26, 2008 02:39 AM|alex2go|LINK
Ya know whenever Im starting to feel like Asp.net is just great, something reminds me of just what a pain it is.
Here I am with a finished Asp.net website, which now won't run for any explainable reason.
And now the only person trying to help is going to bed.
Nov 26, 2008 02:48 AM|exuviae|LINK
by the way i am not going to bed just yet, but believe me, i am getting tired, i been answering questions most of the day.
Are you using the AjaxControlToolkit? if so remove the reference to the System.Web.Extensions and the AjaxControlToolkit and re-add the references, rebuild, and publish.
I will sit it out and get you running, but you have to have some patience, i have been helping others for 10 hours today, i enjoy it, but i am tired, and not thinking as well as i would when awake and alert [:D]
Nov 26, 2008 02:52 AM|alex2go|LINK
I do appreciate your help!
I am just getting a little frustrated because I have been going over and over this for 13 hours and seem no closer to a solution.
I am using the AjaxControlToolkit and I did use the correct one. This project was running earlier today and the part of the project that is Ajax was introduced quite some time ago and ran fine on the same server in question.
Nov 26, 2008 02:54 AM|alex2go|LINK
I am going to compile an earlier version on another machine and upload to the server to assure that the server is functioning
Nov 26, 2008 02:59 AM|alex2go|LINK
I just recompiled the site without the "offending" line of code and got a new error:
Parser Error Message: 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.
Line 55: <assemblies>
Line 56: <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
Line 57: <add assembly="System.Design, Version=188.8.131.52, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
Line 58: <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
Nov 26, 2008 03:01 AM|exuviae|LINK
I understand your frustration, it can be stressfull messing with something for hours on end and feel like you are getting nowhere. I will wait to see what you come back with. I would try the reference thing, it seems silly but it has happened to me before.
Nov 26, 2008 03:06 AM|exuviae|LINK
when you say without the offending line of code, you mean you removed:
<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
and the re-ran the project and that is the error? All it did was add the reference back, and that points me right back to what i was saying, delete the AjaxControlToolkit.dll from your references directory and
add it back, then remove one of the lines that reads,
<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
and run the application again plz
Nov 26, 2008 03:07 AM|alex2go|LINK
currently recompiling code I saved a week ago. It worked then.
Nov 26, 2008 03:11 AM|alex2go|LINK
you mean just cut the dll and paste it right back in? or paste another copy from some other source?
Nov 26, 2008 03:18 AM|exuviae|LINK
yep, expand the project references directory and delete the dll and the pdb and the xml.refresh file, then right click the project, click add reference, on the first tab page, click browse, go to the folder where the original ajaxcontroltoolkit.dll is (where
you extracted the zip) and select the AjaxControlToolkit.dll. When it is added back, rebuild.
Nov 26, 2008 03:20 AM|exuviae|LINK
try the latest code after that and let me know.
Nov 26, 2008 03:23 AM|alex2go|LINK
looked for .xml refresh file and didn't see it anywhere...?
Nov 26, 2008 03:25 AM|exuviae|LINK
no worries, it isn't always there, it is there sometimes, and others it is not, its simply a way vs tracks if a dll has changed
Nov 26, 2008 03:26 AM|exuviae|LINK
i forgot to mention, if you have the language dll files in the references directory remove those two before readding it back. I mean all of them, there is a lot. Not to worry though they get added back automatically when you add the AjaxControlToolkit.dll
Nov 26, 2008 03:30 AM|alex2go|LINK
hmm now you're losing me....
Nov 26, 2008 03:45 AM|alex2go|LINK
not sure how to do what you recommend
Nov 26, 2008 03:47 AM|alex2go|LINK
do you want me to delete everything in "bin"?
Nov 26, 2008 03:54 AM|exuviae|LINK
Ok under your project you have a references (Bin) directory right? that directory may contain language dlls associated with the AjaxControlToolkit, they will be in folders with names like "ar,en,ja" ect and contain references to a file named AjaxControlToolkit.resources.dll
if those are there, remove them from the references directory by clicking them, and pressing the delete key. Do the same for the AjaxControlToolkit. After that re-add the reference to the AjaxControlToolkit, depending on version it may or may not create
those language directorys. Now you can rebuild and redeploy. It isn't hard i just can;t seem to explain it well, my mind is shot. Basically delete everything from the bin directory related to AjaxControlToolkit and only add back the AjaxControlToolkit.dll
from the place you extracted the original AjaxControlToolkit.zip file, it will then be placed back in the Bin directory. You can re-add the reference by pasting the dll in the bin file, but i prefer clicking the project in solution explorer, clicking add
reference, then browse to the folder you extracted the AjaxControlTookit to and add the dll.
Nov 26, 2008 03:59 AM|exuviae|LINK
Nov 26, 2008 04:03 AM|alex2go|LINK
thats all that was in there.
I did what you advised, added the reference again, recompiled and same problem
Nov 26, 2008 04:05 AM|alex2go|LINK
I also recompiled the week old code that was running successfully still as of this morning.
That wont run now either!
Nov 26, 2008 04:11 AM|alex2go|LINK
alright, hopefully you will be back on tomorrow or someone else will pick up this thread??
Anyway, one more thought - the only thing that was changed in the webconfig since it was a working version was the addition of this:
do you think this could have anything to do with it?
Nov 26, 2008 04:16 AM|Kishor.Yewale|LINK
Put the dll in GAC
Nov 26, 2008 04:17 AM|alex2go|LINK
Nov 26, 2008 04:22 AM|exuviae|LINK
Global Assembly Cache (aka GAC) and that is what i suggested earlier, looking at the GAC and making sure that the System.Web.Extension dll was properly installed and that the version in the GAC matched the version in the web.config, but i was told there
is no way there is an installation problem, so i left it at that :). The membership providers do not make use of the System.Web.Extensions dll, that is an AJAX 1.0 assembly, if Ajax was installed on the machine, that assembly should have been installed and
placed in the GAC.
You do not have this problem locally right, it runs on your development box, just not on your hosting environment?
If removing the reference to the toolkit and redeploying the solution did not help, then you need to check and be certain that the assembly is on the machine you are deploying to, is properly registered with the gac, and is the proper version.
I am not sure why you have the membership provider in the web.config twice though, you can use multiple providers no problem, but they look exactly the same.
Nov 26, 2008 04:27 AM|alex2go|LINK
do you mean the GAC on my development computer or the one on the hosting server?
Nov 26, 2008 04:34 AM|exuviae|LINK
hosting server, because that is where you are deploying to and getting the error. I edited my last message so might want to read that again. Who is your host provider if you don't mind me asking.
Nov 26, 2008 04:40 AM|alex2go|LINK
1and1... but don't you find it suspicious that last weeks version was working fine until I uploaded todays?
Nov 26, 2008 04:41 AM|alex2go|LINK
that would be a little coincidental dont ya think?
Nov 26, 2008 05:33 AM|exuviae|LINK
One last thing before bed....manually copy the System.Web.Extensions from C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025 into your project bin and actually deploy the system.web.extension.dll to your host by placing it in the
bin dir. Make sure the the file gets move to your applications bin directory on your hosting server.
Nov 26, 2008 04:00 PM|alex2go|LINK
I did what you advised and now the site is loading! THANKS!
However, Im still missing something. When I try to load pages that include ajax controls, I get this error:
Nov 26, 2008 06:21 PM|exuviae|LINK
That usually happens because there are two versions of ajax on your machine, it is the same problem i have when dealing with the AJaxControlToolkit, if you downloaded the AjaxControlToolkit35sp1.zip then you will get the issue, because the AjaxControlToolkit
is targeting .NET 3.5, and the rest of your project is targetting 2.0 with ajax 1.0. I am not sure where they older 2.0 version is kept.
Nov 26, 2008 06:40 PM|alex2go|LINK
well it seems I am totally beat now.
I uninstalled .net framework 3.5 and the ajax control I was using disappeared from my toolbox as would be expected. The pages with that control cause an error on my machine - ExtenderControlBase.cs opens (from where I don't know)
I reinstalled .net framework 3.5, and then readded the controls to my toolbox.
Now with everything reinstalled, I still get the ExtenderControlBase.cs opening and it says "The control with ID 'ReorderList1_rlio' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it."
I have a ScriptManager in the correct postition on the page. Even built a new page with same controls taking them right out of the toolbox and it still wont work!
Ive run out of thing to try other than throw my laptop out the window and give up....
Nov 26, 2008 07:38 PM|alex2go|LINK
well if the experts at asp.net can't help me then Im really on my own
Nov 26, 2008 07:56 PM|exuviae|LINK
can you post your web.config again. Look to see if you have multiple references to the script module.