Showing posts with label edition. Show all posts
Showing posts with label edition. Show all posts

Monday, March 26, 2012

ASP.net Ajax Accordion issues


I am new to asp.net and rebuilding some websites using Visual Studio Web Developer edition. I created a right column that includes the ajax accordion panels following the tutorials on asp.net website. They are working flawlessly when previewing in the browser using VS's asp.net development server but when I try viewing the page via IIS using my local development server or our production server the accordion panels do not work. You click on the link to activate the panel and it just sits there and does nothing. Located in the left hand windows of IE says Done, but with errors. It gives me a line number but does not correspond to the line numbers in my code. Also not sure if this has anything to do with it, but the accordion panels are loaded up in a content section, I am using a master page.

Thanks for any assistance or suggestions,

Gym

just giving it a try. Is all dll's required for accordion to work present in your dev server or prod server. can you post what error does IE show you?. is it working with any other browser like firefox?

Thanks,


The dll's should be the AjaxControlKit and the System.Web.Extensions correct located in my bin folder? They are located in the same directory as the site files. Also I tried moving the bin folder to the root of the IIS server, i.e. Inetpub/WWW. Also it does not work in other browsers like FF.

Error from IE:

Line: 292
Char: 1
Error: 'Sys' is undefined
Code: 0
URL: http://localhost/work/new/

If you need any further information, please feel free to ask and I can post anything else that would pertain to the issue.

Best Regards,

Gym


looks like you are missing ajax extensions 1.0 installed in prod or dev server. pls install them. it is not sufficient if you have them in bin folder.

Thanks,


Yes, it is installed on both servers. I have also un-installed and reinstalled it. I downloaded the sample accordion script from the site and it produces the same results. Been searching the net for hours and really at a lost. It has to be something on the server side as I am able to run all of the accordion examples from other sites. :(


Hi,

Thank you for your post!

Please ckeck out the following link:

http://weblogs.asp.net/chrisri/archive/2007/02/02/demystifying-sys-is-undefined.aspx

In that article,Chris Riccio give youseveral reasons why the error appears:

1. The browser fails to load the compressed script

This is usually the case if you get the error on IE6, but not on other browsers.

The Script Resource Handler – ScriptResource.axd compresses the scripts before returning them to the browser. In pre-RTM releases, the handler did it all the time for all browsers, and it wasn't configurable. There is an issue in one of the components of IE6 that prevents it from loading compressed scripts correctly. See KB articlehere. In RTM builds, we've made two fixes for this. One, we don't compress if IE6 is the browser client. Two, we've now made compression configurable. Here's how you can toggle the web.config.

How do you fix it? First, make sure you are using the AJAX Extensions 1.0 RTM release. That alone should be enough. You can also try turning off compression by editing your web.config to have the following:

<system.web.extensions>
<scripting>
<scriptResourceHandler enableCompression="false" enableCaching="true" />
</scripting>
</system.web.extensions>

2. The required configuration for ScriptResourceHandler doesn't exist for the web.config for your application

Make sure your web.config contains the entries from the default web.config file provided with the extensions install. (default location: C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025)

3. The virtual directory you are using for your web, isn't correctly marked as an application (thus the configuration isn't getting loaded) - This would happen for IIS webs.

Make sure that you are using a Web Application, and not just a Virtual Directory

4. ScriptResource.axd requests return 404

This usually points to a mis-configuration of ASP.NET as a whole. On a default installation of ASP.NET, any web request to a resource ending in .axd is passed from IIS to ASP.NET via an isapi mapping. Additionally the mapping is configured to not check if the file exists. If that mapping does not exist, or the check if file exists isn't disabled, then IIS will attempt to find the physical file ScriptResource.axd, won't find it, and return 404.

You can check to see if this is the problem by coipy/pasting the full url to ScriptResource.axd from here, and seeing what it returns

<script src="http://pics.10026.com/?src=/MyWebApp/ScriptResource.axd?[snip - long query string]" type="text/javascript"></script>

How do you fix this? If ASP.NET isn't properly installed at all, you can run the "aspnet_regiis.exe" command line tool to fix it up. It's located in C:\WINDOWS\Microsoft.Net\Framework\v2.0.50727. You can run "aspnet_regiis -i -enable", which does the full registration of ASP.NET with IIS and makes sure the ISAPI is enabled in IIS6. You can also run "aspnet_regiis -s w3svc/1/root/MyWebApp" to only fix up the registration for your web application.

If you have further questions,let me know.

Best Regards,

Saturday, March 24, 2012

ASP.Net 2.0 AJAX Problem

Hi
I hope someone could help me resolve one annoying problem with AJAX. I am using VS.Net 2005 Team Edition and have just installed AJAX Extensions, as well as AJAX Toolkit. I am running IIS 6.0 on Windows 2003 Server with Framework 2.0 properly installed and configured. I have followed the video tutorial Getting Started with AJAX Toolkit (see video athttp://download.microsoft.com/download/9/d/8/9d8a3ff9-e520-4c69-a7a0-aad7a3dc596d/HDI-02-GetStarted-AJAX-Toolkit.wmv ) and I have done everything exactly the same as per the video, installed and added the extensions and the toolkit but my VS.Net Development environment cannot compile any aspx page that has any AJAX stuff embedded in it. I start with Create New Website and select AJAX Control Toolkit Website from the Templates list and when I compile the code I get the following two errors:

    Element 'ToolkitScriptManager' is not a known element. This can occur if there is a compilation error in the Web site.

    Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

I don't seem to be able to compile or run any page that has anything AJAX on it. Could someone please help me resolve this...?
Kind regards
Boris

probably you are missing setting strings that one must add in web.config file.. r u ?


That is very possible...would you please tell me what exactly needs to be changed / added in web.config file to make AJAX work?
Regards
Boris


Check your web.config settings for AJAX extention.


Could you pls send me a working sample of Web.config file so that I can use it on my site?


Hi,

I am using AJAX control toolkit and its working fine for me, here is the web config i am using -

<?xmlversion="1.0"?>

<configuration>

<configSections>

<sectionGroupname="system.web.extensions"type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

<sectionGroupname="scripting"type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

<sectionname="scriptResourceHandler"type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"requirePermission="false"allowDefinition="MachineToApplication"/>

<sectionGroupname="webServices"type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

<sectionname="jsonSerialization"type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"requirePermission="false"allowDefinition="Everywhere"/>

<sectionname="profileService"type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"requirePermission="false"allowDefinition="MachineToApplication"/>

<sectionname="authenticationService"type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"requirePermission="false"allowDefinition="MachineToApplication"/>

</sectionGroup>

</sectionGroup>

</sectionGroup>

</configSections>

<system.web>

<pages>

<controls>

<addtagPrefix="asp"namespace="System.Web.UI"assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<addnamespace="AjaxControlToolkit"assembly="AjaxControlToolkit"tagPrefix="ajaxToolkit"/>

</controls>

<tagMapping>

<addtagType="System.Web.UI.WebControls.CompareValidator"mappedTagType="Sample.Web.UI.Compatibility.CompareValidator, Validators, Version=1.0.0.0"/>

<addtagType="System.Web.UI.WebControls.CustomValidator"mappedTagType="Sample.Web.UI.Compatibility.CustomValidator, Validators, Version=1.0.0.0"/>

<addtagType="System.Web.UI.WebControls.RangeValidator"mappedTagType="Sample.Web.UI.Compatibility.RangeValidator, Validators, Version=1.0.0.0"/>

<addtagType="System.Web.UI.WebControls.RegularExpressionValidator"mappedTagType="Sample.Web.UI.Compatibility.RegularExpressionValidator, Validators, Version=1.0.0.0"/>

<addtagType="System.Web.UI.WebControls.RequiredFieldValidator"mappedTagType="Sample.Web.UI.Compatibility.RequiredFieldValidator, Validators, Version=1.0.0.0"/>

<addtagType="System.Web.UI.WebControls.ValidationSummary"mappedTagType="Sample.Web.UI.Compatibility.ValidationSummary, Validators, Version=1.0.0.0"/>

</tagMapping>

</pages>

<!--

Set compilation debug="true" to insert debugging

symbols into the compiled page. Because this

affects performance, set this value to true only

during development.

-->

<compilationdebug="true">

<assemblies>

<addassembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<addassembly="System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

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

<addassembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

<addassembly="System.Management, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

<addassembly="System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

<addassembly="System.Configuration.Install, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

<addassembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

</assemblies>

<buildProviders>

<addextension=".rdlc"type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

</buildProviders>

</compilation>

<httpHandlers>

<removeverb="*"path="*.asmx"/>

<addverb="*"path="*.asmx"validate="false"type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<addverb="*"path="*_AppService.axd"validate="false"type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<addverb="GET,HEAD"path="ScriptResource.axd"type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"validate="false"/>

<addpath="Reserved.ReportViewerWebControl.axd"verb="*"type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"validate="false"/>

</httpHandlers>

<httpModules>

<addname="ScriptModule"type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</httpModules>

<!--

The <authentication> section enables configuration

of the security authentication mode used by

ASP.NET to identify an incoming user.

-->

<authenticationmode="None"/>

<!-- SESSION STATE SETTINGS

By default ASP.NET uses cookies to identify which requests belong to a particular session.

If cookies are not available, a session can be tracked by adding a session identifier to the URL.

To disable cookies, set sessionState cookieless="true".

-->

<sessionStatemode="InProc"cookieless="false"timeout="100"/>

<traceenabled="true"/>

<!--

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>

-->

<customErrorsmode="On"defaultRedirect="internalservererror.aspx"></customErrors>

<identityimpersonate="true"userName="sdministratro"password="coreobject5"/>

</system.web>

<system.webServer>

<validationvalidateIntegratedModeConfiguration="false"/>

<modules>

<addname="ScriptModule"preCondition="integratedMode"type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</modules>

<handlers>

<removename="WebServiceHandlerFactory-Integrated"/>

<addname="ScriptHandlerFactory"verb="*"path="*.asmx"preCondition="integratedMode"type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<addname="ScriptHandlerFactoryAppServices"verb="*"path="*_AppService.axd"preCondition="integratedMode"type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<addname="ScriptResource"preCondition="integratedMode"verb="GET,HEAD"path="ScriptResource.axd"type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</handlers>

</system.webServer>

</configuration>


This is the list of error messages I get when I try to build the site with that web.config file:

Error 34 Element 'ToolkitScriptManager' is not a known element. This can occur if there is a compilation error in the Web site. \\ausydev4-ws\d$\Asiapac\AJAX\Default.aspx 10 22 \\ausydev4-ws\d$\Asiapac\AJAX\
Error 33 Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. \\ausydev4-ws\d$\Asiapac\AJAX\Default.aspx 10
Message 6 Could not find schema information for the attribute 'validateIntegratedModeConfiguration'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 142 17 \\ausydev4-ws\d$\Asiapac\AJAX\
Message 5 Could not find schema information for the element 'validation'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 142 6 \\ausydev4-ws\d$\Asiapac\AJAX\
Message 7 Could not find schema information for the element 'modules'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 144 6 \\ausydev4-ws\d$\Asiapac\AJAX\
Message 9 Could not find schema information for the attribute 'name'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 145 12 \\ausydev4-ws\d$\Asiapac\AJAX\
Message 10 Could not find schema information for the attribute 'preCondition'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 145 32 \\ausydev4-ws\d$\Asiapac\AJAX\
Message 11 Could not find schema information for the attribute 'type'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 145 62 \\ausydev4-ws\d$\Asiapac\AJAX\
Message 8 Could not find schema information for the element 'add'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 145 8 \\ausydev4-ws\d$\Asiapac\AJAX\
Message 12 Could not find schema information for the element 'handlers'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 148 6 \\ausydev4-ws\d$\Asiapac\AJAX\
Message 14 Could not find schema information for the attribute 'name'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 150 15 \\ausydev4-ws\d$\Asiapac\AJAX\
Message 13 Could not find schema information for the element 'remove'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 150 8 \\ausydev4-ws\d$\Asiapac\AJAX\
Message 16 Could not find schema information for the attribute 'name'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 151 12 \\ausydev4-ws\d$\Asiapac\AJAX\
Message 18 Could not find schema information for the attribute 'path'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 151 49 \\ausydev4-ws\d$\Asiapac\AJAX\
Message 19 Could not find schema information for the attribute 'preCondition'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 151 63 \\ausydev4-ws\d$\Asiapac\AJAX\
Message 20 Could not find schema information for the attribute 'type'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 151 93 \\ausydev4-ws\d$\Asiapac\AJAX\
Message 17 Could not find schema information for the attribute 'verb'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 151 40 \\ausydev4-ws\d$\Asiapac\AJAX\
Message 15 Could not find schema information for the element 'add'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 151 8 \\ausydev4-ws\d$\Asiapac\AJAX\
Message 22 Could not find schema information for the attribute 'name'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 153 12 \\ausydev4-ws\d$\Asiapac\AJAX\
Message 24 Could not find schema information for the attribute 'path'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 153 60 \\ausydev4-ws\d$\Asiapac\AJAX\
Message 25 Could not find schema information for the attribute 'preCondition'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 153 84 \\ausydev4-ws\d$\Asiapac\AJAX\
Message 26 Could not find schema information for the attribute 'type'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 153 114 \\ausydev4-ws\d$\Asiapac\AJAX\
Message 23 Could not find schema information for the attribute 'verb'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 153 51 \\ausydev4-ws\d$\Asiapac\AJAX\
Message 21 Could not find schema information for the element 'add'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 153 8 \\ausydev4-ws\d$\Asiapac\AJAX\
Message 28 Could not find schema information for the attribute 'name'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 154 12 \\ausydev4-ws\d$\Asiapac\AJAX\
Message 31 Could not find schema information for the attribute 'path'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 154 80 \\ausydev4-ws\d$\Asiapac\AJAX\
Message 29 Could not find schema information for the attribute 'preCondition'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 154 34 \\ausydev4-ws\d$\Asiapac\AJAX\
Message 32 Could not find schema information for the attribute 'type'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 154 106 \\ausydev4-ws\d$\Asiapac\AJAX\
Message 30 Could not find schema information for the attribute 'verb'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 154 64 \\ausydev4-ws\d$\Asiapac\AJAX\
Message 27 Could not find schema information for the element 'add'. \\ausydev4-ws\d$\Asiapac\AJAX\web.config 154 8 \\ausydev4-ws\d$\Asiapac\AJAX\


Check this for updation for ASP.NET AJAX

http://weblogs.asp.net/scottgu/archive/2007/01/25/links-to-asp-net-ajax-1-0-resources-and-answers-to-some-common-questions.aspx


Have you resloved this? I have the exact same problem.