Saturday, March 24, 2012

deploying apps using AJAX

These controls in the AJAX toolkit seem really nice, and I was able to get them working in my development environment. I was disappointed that when I published my app to the web server though it no longer worked. I'm trying to understand exactly what needs to be done on the server to get it working. I don't have a lot of control over what gets installed on the server, so this may be a problem. The error message I got indicated it was blowing up from these lines in my web.config:

<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

Appreciate any help on how I can successfully deploy this app using FTP (if possible).

Thanks,

***

Hi dschroth,

You need to make sure that the system.web.extensions dll is installed in the GAC on your server. This will solve your problem probably!

Regards,


hello.

any chance of copying the stack error info and putting it here?


Server Error in '/nmp' Application.

Configuration Error

Description:An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

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.

Source Error:

Line 12: <compilation debug="true" explicit="true">Line 13: <assemblies>Line 14: <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>Line 15: <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> Line 16: <add assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>


Source File:D:\sites\NMP\web.config Line:14

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].



Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

Server Error in '/nmp' Application.

Configuration Error

Description:An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

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.

Source Error:

Line 12: <compilation debug="true" explicit="true">Line 13: <assemblies>Line 14: <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>Line 15: <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> Line 16: <add assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>


Source File:D:\sites\NMP\web.config Line:14

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].



Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

Hello.

by looking at the stack trace, it looks like you don't have the AJAX dll installed on the GAC. If you're able to run your web app at full trust, then you should copy the ajax dll into your bin folder (note that this will only work if you're able to configure your app to run at full trust)


When I published the app, it put both AJAXExtensionsToolbox.dll and AjaxControlToolkit.dll into the bin folder. Are they the AJAX dll you mean? If so, how can I configure the app to run at full trust?

Thanks for your help!


nope,

the system.web.extensions

succes!

Regards,


Whoever owns your server has to do it via the code access security settings, or else (as stated) install the dll to the GAC on the server. If you're working w/ a hosting company just renting a virtual directory, then the company will either advertise that they support AJAX extensions, or else you're probably out of luck w/ that one.


i hate to be stupid, but how do you install a dll to the GAC?


HI dschroth,

check the following link:

http://msdn2.microsoft.com/en-us/library/ex0ss12c(VS.80).aspx

Regards,


Sorry maybe a bit overkill open Visual studio command prompt and add:
gacutil /i YOURDLL.dll
Regards,

hello.

in this case, running tha ajax installation pacakage will do just that.

adding a dll to the gac is simple: you just need to drop it in windows\assembly folder or run the gacutil from the command line.


thanks everyone for your help - I guess it's easy when you know how. apparently all I needed to do was drop the System.Web.Extensions dlls into the bin folder on my development machine, and then the publish process put them on the server.

***


I am having a similar problem with trust issues. I run the site in house on a server so I really do not have a problem with full trust issues. The site runs on IIS 5.1. What do I need to do to set for Full Trust?

Thanks for the information.

No comments:

Post a Comment