NCSA SCADA
asked on
ASP.net VB Calendar Extendar Fails
I have a web project that uses a calendarExtender. When I try to either debug or publish and run I get the following error.
Sys.Extended.UI.TextBoxWra pper is null or not an object
My employeer recently replaced my laptop (xm to vista ent.) and this is the first time I have tried to use the extendar. I tried opening an old project with the same exterdar and I get a different 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.Ajax, Version=3.0.31106.0, Culture=neutral, PublicKeyToken=28f01b0e84b 6d53e' could not be loaded.
=== Pre-bind state information ===
LOG: User = VESTAS\damod
LOG: DisplayName = System.Web.Ajax, Version=3.0.31106.0, Culture=neutral, PublicKeyToken=28f01b0e84b 6d53e
(Fully-specified)
LOG: Appbase = file:///C:/Users/damod/Doc uments/Vis ual Studio 2008/Projects/HelpdeskRepo rting/Help deskReport ing/
LOG: Initial PrivatePath = C:\Users\damod\Documents\V isual Studio 2008\Projects\HelpdeskRepo rting\Help deskReport ing\bin
Calling assembly : AjaxControlToolkit, Version=3.0.31106.0, Culture=neutral, PublicKeyToken=28f01b0e84b 6d53e.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\damod\Documents\V isual Studio 2008\Projects\HelpdeskRepo rting\Help deskReport ing\web.co nfig
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\F ramework\v 2.0.50727\ config\mac hine.confi g.
LOG: Post-policy reference: System.Web.Ajax, Version=3.0.31106.0, Culture=neutral, PublicKeyToken=28f01b0e84b 6d53e
LOG: Attempting download of new URL file:///C:/Users/damod/App Data/Local /Temp/Temp orary ASP.NET Files/root/8b8620e2/94e3c8 7f/System. Web.Ajax.D LL.
LOG: Attempting download of new URL file:///C:/Users/damod/App Data/Local /Temp/Temp orary ASP.NET Files/root/8b8620e2/94e3c8 7f/System. Web.Ajax/S ystem.Web. Ajax.DLL.
LOG: Attempting download of new URL file:///C:/Users/damod/Doc uments/Vis ual Studio 2008/Projects/HelpdeskRepo rting/Help deskReport ing/bin/Sy stem.Web.A jax.DLL.
LOG: Attempting download of new URL file:///C:/Users/damod/Doc uments/Vis ual Studio 2008/Projects/HelpdeskRepo rting/Help deskReport ing/bin/Sy stem.Web.A jax/System .Web.Ajax. DLL.
LOG: Attempting download of new URL file:///C:/Users/damod/App Data/Local /Temp/Temp orary ASP.NET Files/root/8b8620e2/94e3c8 7f/System. Web.Ajax.E XE.
LOG: Attempting download of new URL file:///C:/Users/damod/App Data/Local /Temp/Temp orary ASP.NET Files/root/8b8620e2/94e3c8 7f/System. Web.Ajax/S ystem.Web. Ajax.EXE.
LOG: Attempting download of new URL file:///C:/Users/damod/Doc uments/Vis ual Studio 2008/Projects/HelpdeskRepo rting/Help deskReport ing/bin/Sy stem.Web.A jax.EXE.
LOG: Attempting download of new URL file:///C:/Users/damod/Doc uments/Vis ual Studio 2008/Projects/HelpdeskRepo rting/Help deskReport ing/bin/Sy stem.Web.A jax/System .Web.Ajax. EXE.
Stack Trace:
[FileNotFoundException: Could not load file or assembly 'System.Web.Ajax, Version=3.0.31106.0, Culture=neutral, PublicKeyToken=28f01b0e84b 6d53e' or one of its dependencies. The system cannot find the file specified.]
AjaxControlToolkit.Toolkit ScriptMana ger.ApplyA ssembly(Sc riptRefere nce script, Boolean isComposite) +0
AjaxControlToolkit.Toolkit ScriptMana ger.OnReso lveScriptR eference(S criptRefer enceEventA rgs e) +167
System.Web.UI.ScriptManage r.Register Scripts() +172
System.Web.UI.ScriptManage r.OnPagePr eRenderCom plete(Obje ct sender, EventArgs e) +113
System.Web.UI.Page.OnPreRe nderComple te(EventAr gs e) +8695102
System.Web.UI.Page.Process RequestMai n(Boolean includeStagesBeforeAsyncPo int, Boolean includeStagesAfterAsyncPoi nt) +1029
Sys.Extended.UI.TextBoxWra
My employeer recently replaced my laptop (xm to vista ent.) and this is the first time I have tried to use the extendar. I tried opening an old project with the same exterdar and I get a different 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.Ajax, Version=3.0.31106.0, Culture=neutral, PublicKeyToken=28f01b0e84b
=== Pre-bind state information ===
LOG: User = VESTAS\damod
LOG: DisplayName = System.Web.Ajax, Version=3.0.31106.0, Culture=neutral, PublicKeyToken=28f01b0e84b
(Fully-specified)
LOG: Appbase = file:///C:/Users/damod/Doc
LOG: Initial PrivatePath = C:\Users\damod\Documents\V
Calling assembly : AjaxControlToolkit, Version=3.0.31106.0, Culture=neutral, PublicKeyToken=28f01b0e84b
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\damod\Documents\V
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\F
LOG: Post-policy reference: System.Web.Ajax, Version=3.0.31106.0, Culture=neutral, PublicKeyToken=28f01b0e84b
LOG: Attempting download of new URL file:///C:/Users/damod/App
LOG: Attempting download of new URL file:///C:/Users/damod/App
LOG: Attempting download of new URL file:///C:/Users/damod/Doc
LOG: Attempting download of new URL file:///C:/Users/damod/Doc
LOG: Attempting download of new URL file:///C:/Users/damod/App
LOG: Attempting download of new URL file:///C:/Users/damod/App
LOG: Attempting download of new URL file:///C:/Users/damod/Doc
LOG: Attempting download of new URL file:///C:/Users/damod/Doc
Stack Trace:
[FileNotFoundException: Could not load file or assembly 'System.Web.Ajax, Version=3.0.31106.0, Culture=neutral, PublicKeyToken=28f01b0e84b
AjaxControlToolkit.Toolkit
AjaxControlToolkit.Toolkit
System.Web.UI.ScriptManage
System.Web.UI.ScriptManage
System.Web.UI.Page.OnPreRe
System.Web.UI.Page.Process
Which .net framework does your laptop have installed?
ASKER
The image shows .net installed
dotNet.jpg
dotNet.jpg
Do you have the Ajax toolkit installed ?
ASKER
Yes.. I also verified when I try to publish that the dll shows up in the bin directory
Can you verify the version? Is it 3.0.31106.0?
ASKER
Ajax Ver
ajax.jpg
ajax.jpg
Do other web projects that use ajax but not the extender work on your laptop?
Have you tried debugging or publishing those and they are ok?
Have you tried debugging or publishing those and they are ok?
ASKER
Another note... my older project still runs fine if I run it from the web server. I think I would likely break it if I republished now.
I see. What .net framework does your server have?
If it doesn't have SP1 for .net 3.5 that could be the issue.
Do you know if your laptop had .net 3.5SP1 when you wrote the apps?
If it doesn't have SP1 for .net 3.5 that could be the issue.
Do you know if your laptop had .net 3.5SP1 when you wrote the apps?
ASKER
I can check on the server, but I don't know on the old laptop
ASKER
Server also has 3.5 SP1
Could you remove any ajax references, save and close the solution, re-open and re-add those references?
ASKER
Not exactly sure how to do that. are we talking just delete the txtbox that the extendar is associated to?
Well you can try that quick.
Also does your server have the same version of ajax?
Also does your server have the same version of ajax?
ASKER
it does have the same ver
Do you have ToolkitScriptManager in your control toolkit?
Can you try dragging it onto the form tag?
Can you try dragging it onto the form tag?
If you look under your C:\WINDOWS\assembly directory on your laptop, what ajax versions do you see?
ASKER
ok.. this is strange. After removing the textbox saving and closing the project and then reopening the project I get this error. see pic.. I then created the dir structure (is did not exist), closed and reopened and the directory gets deleted and I get the same error
ajaxerror.jpg
ajaxerror.jpg
Please make sure that you have installed ASP.NET AJAX Extension.
http://www.asp.net/ajaxlibrary/download.ashx
Then please make sure that your web.config is correct.
http://www.asp.net/AJAX/Documentation/Live/ConfiguringASPNETAJAX.aspx
http://www.asp.net/ajaxlibrary/download.ashx
Then please make sure that your web.config is correct.
http://www.asp.net/AJAX/Documentation/Live/ConfiguringASPNETAJAX.aspx
ASKER
I don't see the ajax dll in c:\windows\assembly
The error is looking for the ajaxcontroltoolkit.dll under that path.
You do need to remove the reference and add it back pointing at the right place.
OR if that is the right place you may want to copy it from your bin folder.
You do need to remove the reference and add it back pointing at the right place.
OR if that is the right place you may want to copy it from your bin folder.
ASKER
I am a newb.. what are the steps to remove the reference? Thanks
Also did you ever debug this app with .net framework 3.5sp1 and was working just fine or you haven't changed it for a while and it was .net framework 2.0 when you created it?
The reference should be in your webconfig
Please search for AjaxControlToolkit.dll on your laptop to see where it was installed.
This says VS2008 but it will work for VS2005 as well. Which version are you using?
Try following these instructions to set things up for the first time. Which I believe that is your case, correct?:
VS2008 Pro comes with AJAX already so there is no need to install any of it. If you didn't create a AJAX Enabled Website in the templates then try this:
Right click on your toolbox area and click Reset Toolbox
Close your current solution
Create a new test website by going to File>New Website
Select your language (VB or C#)
Select ASP.NET Web Site and choose .NET Framework 3.5 in upper right
Take a look at your toolbox, you will probably see AJAX Extensions but only a few items inside it
To get the rest of the items right click on the AJAX Extensions header and click Choose Items
When the dialog box comes up click Browse and navigate to your directory where you put the dll (C:\Program Files\Ajax35\Binaries) and it will automatically select all the controls it finds in the dll.
Click Ok and it will add those items to your toolbox.
Just a side note, I tend to take any dll's I use a lot like the AjaxToolKit and put them here (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE) as this is where many of the others are located.
You should now be able to access those other AJAX items. The first time you place an AJAX item on your page it will add the dll to your project and add the info you need on the page.
Try following these instructions to set things up for the first time. Which I believe that is your case, correct?:
VS2008 Pro comes with AJAX already so there is no need to install any of it. If you didn't create a AJAX Enabled Website in the templates then try this:
Right click on your toolbox area and click Reset Toolbox
Close your current solution
Create a new test website by going to File>New Website
Select your language (VB or C#)
Select ASP.NET Web Site and choose .NET Framework 3.5 in upper right
Take a look at your toolbox, you will probably see AJAX Extensions but only a few items inside it
To get the rest of the items right click on the AJAX Extensions header and click Choose Items
When the dialog box comes up click Browse and navigate to your directory where you put the dll (C:\Program Files\Ajax35\Binaries) and it will automatically select all the controls it finds in the dll.
Click Ok and it will add those items to your toolbox.
Just a side note, I tend to take any dll's I use a lot like the AjaxToolKit and put them here (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE) as this is where many of the others are located.
You should now be able to access those other AJAX items. The first time you place an AJAX item on your page it will add the dll to your project and add the info you need on the page.
ASKER
Thanks so much I will give it a try
ASKER
Well, I am back to the same problem. I reset toolbox, saved the ajax dll to the path you sudgested, created new asp page, verified that the limited ajax items existed, added additional items by browsing to dll, added textbox to page, added scriptmanager to page, added extendar to txt box, Everything looked great up until that point... started debug and the sys.extended.ui.textboxwra pper is null or not an object message showed up......
Then answer my question: Have you successfully tried to change this app with .net framework 3.5sp1 before? I was going under the assumption that it is ONLY the upgrade to Vista that has caused this issue. Nothing else has changed?
Could you post your web.config ?
Could you post your web.config ?
ASKER
The old project is the only one that worked. It still works on the server it is deployed on. Any new project or if I open an old project in VS it fails.
Here is the web.config
Here is the web.config
<?xml version="1.0"?><configuration>
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<appSettings/>
<connectionStrings>
<add name="VSARestoreConnectionString" connectionString="Data Source=10.20.6.14;Initial Catalog=VSARestore;Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
Visual Basic options:
Set strict="true" to disallow all data type conversions
where data loss can occur.
Set explicit="true" to force declaration of all variables.
-->
<compilation debug="true" strict="false" explicit="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.DataSetExtensions, 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.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies>
</compilation>
<pages>
<namespaces>
<clear/>
<add namespace="System"/>
<add namespace="System.Collections"/>
<add namespace="System.Collections.Generic"/>
<add namespace="System.Collections.Specialized"/>
<add namespace="System.Configuration"/>
<add namespace="System.Text"/>
<add namespace="System.Text.RegularExpressions"/>
<add namespace="System.Linq"/>
<add namespace="System.Xml.Linq"/>
<add namespace="System.Web"/>
<add namespace="System.Web.Caching"/>
<add namespace="System.Web.SessionState"/>
<add namespace="System.Web.Security"/>
<add namespace="System.Web.Profile"/>
<add namespace="System.Web.UI"/>
<add namespace="System.Web.UI.WebControls"/>
<add namespace="System.Web.UI.WebControls.WebParts"/>
<add namespace="System.Web.UI.HtmlControls"/>
</namespaces>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</controls>
</pages>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpModules>
</system.web>
<system.codedom>
<compilers>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="OptionInfer" value="true"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
</compilers>
</system.codedom>
<!--
The system.webServer section is required for running ASP.NET AJAX under Internet
Information Services 7.0. It is not necessary for previous version of IIS.
-->
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="ScriptModule"/>
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<remove name="ScriptHandlerFactory"/>
<remove name="ScriptHandlerFactoryAppServices"/>
<remove name="ScriptResource"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</handlers>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Could you post your references?
In the solution explorer area, right-click on your web project (not the solution) and select properties.
Click on the References tab and could you post a print screen of that?
In the solution explorer area, right-click on your web project (not the solution) and select properties.
Click on the References tab and could you post a print screen of that?
ASKER
Here ya go
refVB.gif
refVB.gif
See your AjaxControlToolkit ? can you remove it , save and close. Reopen and add it from wherever it needs to be?
ASKER
I will give it a try
ASKER
same error
Is it pointing at the same place or did its path change when you re-added it?
Please change it to copy local = false
Also are you rebuilding after every change you are making?
ASKER
I still am having no luck with this... any other ideas experts
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the help