Showing posts with label config. Show all posts
Showing posts with label config. Show all posts

Wednesday, March 28, 2012

ASP.Net AJAX messing up my code and not known element???

I am trying to add AJAX Version 1.0 to an existing site and I believe I have added everything needed to the web.config file. Installed the AJAX Extensions in the GAC and added the AJAX Toolkit to the VS 2005 Toolbox.

When I drag AJAX items into my aspx pages I get red Squiggly Lines on the ScriptManager and UpdatePanel.

I just added a RequiredFieldValidator and it tells me that it is also not a known element.

Also I have noticed some strange new attributes in my html e..g.__designer:wfdid="w2"

What is going on, could somebody help me out, thanks, newbie

I forgot to mention that I am using Master and Content pages. When I add the AJAX Extensions such as ScriptManager to the Master page I have no red squiggly lines. I guess I have to add <form> tags to my content pages to make this all work.

Not true, I tried it and the red squiggle lines are gone but the page does not show up correctly. Basically the content page portion does not get displayed . So adding the <form> tag to the content page is not the solution.

What am I doint wrong?? Newbie


Fixed - here is a helpful article.

http://ajax.asp.net/docs/tutorials/UsingUpdatePanelMasterPages.aspx

ASP.NET AJAX for Web Application Project (WAP)

Has anyone successfully use the new AJAX controls in a WAP?

I'm getting this error when I try to use the web.config from an ASP.NET AJAX Web Site in a Web Application Project.

Error 8 The type 'Microsoft.Web.UI.ExtenderControl' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

Try to download Ajax Beta 2 and Futures Nov CTP from this website - http://ajax.asp.net/docs/Default.aspx
Try to download Ajax Beta 2 and Futures Nov CTP from this website - http://ajax.asp.net/docs/Default.aspx
Try to download Ajax Control Toolkit from this website - http://www.codeplex.com/AtlasControlToolkit/Release/ProjectReleases.aspx
Try to read Ajax materials document from here -
After you install Ajax Beta 2 and Futures Nov CTP in your PC,try to create a new Ajax Enabled website and a Ajax CTP Enabled website and check if it works.
Besides,try to check your web.config according to the following web.config
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="microsoft.web" type="Microsoft.Web.Configuration.MicrosoftWebSectionGroup, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="converters" type="Microsoft.Web.Configuration.ConvertersSection"/>
<sectionGroup name="scripting" type="Microsoft.Web.Configuration.ScriptingSectionGroup, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="webServices" type="Microsoft.Web.Configuration.ScriptingWebServicesSectionGroup, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="jsonSerialization" type="Microsoft.Web.Configuration.ScriptingJsonSerializationSection, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
<section name="profileService" type="Microsoft.Web.Configuration.ScriptingProfileServiceSection, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
<section name="authenticationService" type="Microsoft.Web.Configuration.ScriptingAuthenticationServiceSection, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<system.web>
<pages>
<controls>
<add tagPrefix="asp" namespace="Microsoft.Web.UI" assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagPrefix="asp" namespace="Microsoft.Web.UI.Controls" assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</controls>
<tagMapping>
<add tagType="System.Web.UI.WebControls.CompareValidator" mappedTagType="Microsoft.Web.UI.Compatibility.CompareValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.CustomValidator" mappedTagType="Microsoft.Web.UI.Compatibility.CustomValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.RangeValidator" mappedTagType="Microsoft.Web.UI.Compatibility.RangeValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.RegularExpressionValidator" mappedTagType="Microsoft.Web.UI.Compatibility.RegularExpressionValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.RequiredFieldValidator" mappedTagType="Microsoft.Web.UI.Compatibility.RequiredFieldValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.ValidationSummary" mappedTagType="Microsoft.Web.UI.Compatibility.ValidationSummary, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</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.
-->
<compilation debug="true">
<assemblies>
<add assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies>
</compilation>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="Microsoft.Web.Script.Services.ScriptHandlerFactory, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler" validate="false"/>
</httpHandlers>
<httpModules>
<add name="WebResourceCompression" type="Microsoft.Web.Handlers.WebResourceCompressionModule, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptModule" type="Microsoft.Web.UI.ScriptModule, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<add name="ScriptModule" preCondition="integratedMode" type="Microsoft.Web.UI.ScriptModule, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-ISAPI-2.0"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="Microsoft.Web.Script.Services.ScriptHandlerFactory, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptResource" verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler"/>
</handlers>
</system.webServer>
</configuration>
Wish the above can help you.

Hi JC,

Had the same error and found that it was because I had not replaced the AjaxControlToolkit.dll in my application with the new one in the SampleWebsite/bin folder when I updated my AJAX version from beta to AJAX 1.0 RC. Recommend you try this.

Kind regards,

Mick

ASP.Net Ajax elements not being recognized

I've just installed ASP.Net Ajax beta 2 and added its references to web.config, but my project still gives me some errors (my project was originally created using ASP.Net Ajax beta 1 template).

Here they are:

Warning 1 The 'requirePermission' attribute is not declared. c:\Inetpub\wwwroot\n2_lc1\Web.config 7 206 c:\...\n2_lc1\
Warning 2 The 'requirePermission' attribute is not declared. c:\Inetpub\wwwroot\n2_lc1\Web.config 8 200 c:\...\n2_lc1\
Warning 3 The 'requirePermission' attribute is not declared. c:\Inetpub\wwwroot\n2_lc1\Web.config 9 214 c:\...\n2_lc1\
Error 28 Element 'ScriptManager' is not a known element. This can occur if there is a compilation error in the Web site. c:\Inetpub\wwwroot\n2_lc1\processo\acompanhamento_corrida.aspx 32 7 c:\...\n2_lc1\

What can I do?

When I create a new project it works. With existing projects it doesn't work.

Try to take a look at this reading when upgrading to Ajax Beta 2 -
????http://66.102.7.104/search?q=cache:6kV1ivEIoIYJ:ajax.asp.net/files/Migration%2520Guide.doc+Upgrade+Ajax+Migration&hl=en&ct=clnk&cd=1
????http://ajax.asp.net/files/AspNet_AJAX_CTP_to_Beta_Whitepaper.aspx
Wish the above can give you some helps.

Jasson, thanks for your reply, but the problem isn't migrating an Atlas to Ajax code. The problem I have is about the prefix ASP for Ajax controls that Visual Studio Intellisense is not recognizing.

Visual Studio marks the Ajax elements as unknown. Their elements only work if I change Ajax prefix to another one (different from ASP).


Sorry for not giving you an immediate reply.For your questions, try to follow up the following suggestions.

Do you have the following code line when you want to access Ajax control toolkit? This is necessary to refer to Ajax control toolkit in your website project. If not,try to add it

Wednesday, March 21, 2012

Asp Ajax Extensions Beta1 and web config

Do I need to make any changes in my web config to use the new Asp Ajax Extensions Beta 1?

Everything worked with the last version.

Thanks

have you seen the migration guide that's posted on this page:http://ajax.asp.net/default.aspx?tabid=47

this is the link to the guide:http://ajax.asp.net/files/Migration%20Guide.doc