Showing posts with label ive. Show all posts
Showing posts with label ive. Show all posts

Wednesday, March 28, 2012

Consistent nuisance with AjaxControlToolkit. Possible PublicKeys.

Hi.

I've been developing a web site in Visual Studio 2005. I had various problems with the Ajax Extensions such as ScriptManager and UpdatePanel. They were all of validation nature for ASP and sometimes went away without notice and sometimes opening up the Web.config was enough. Not logical to me I kept on and then finally ended up updating Visual Studio to Service Pack 1. All of the problems are now gone but then, new one surface.


Even when I make a new AjaxControlToolkit enabled web site, and just drag and drop a TextBox and AutoCompleteExtender, I get validation errors on both the AutoCompleteExtender and then the default added ToolkitScriptManager. The error I get is sometimes of the likes of

Error 34 Element'ToolkitScriptManager'is not a known element. This can occurif thereis a compilation errorin the Web site.

And yeah, the build failes. Then I get this error:

Error32Requestfor the permission of type'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
 
So, just so you know what I've tried to do to fix this. I've tried: * Searched the PublicKeyToken and changed it to all uppercase.

* Reinstalled the Ajax Extension msi
* Re-added the AjaxControlToolkit in to the Toolbox (reset it first).
* Put the Trust Level to Medium in web.config.
* Taken out PublicKeyToken on System.Web.Extensions

And this is happening to me with default values of all things. I really understand if some of you who are kind enough to try and help me can't reproduce this error but,
these errors have crippled my work for 2 days by now and it's really uncomfortible to realise that this tool that's supposed to help me is more a burden then help.
I can pass on a screenshot of this peculiar error and it's safe to say that I expected more from Microsoft.

Hi,

This seems to be a security issue, please specify trust level to FullTrust and try again.

Monday, March 26, 2012

Confused about Atlas July CTP and now AJAX Beta 1

I've been using the Atlas July CTP for my projects along with the Control Toolkit. Now I hear about AJAX Beta 1 (they scrapped the name Atlas right?)
If I wanted to update to AJAX Beta 1, how can I do so? I haven't seen any information about it so far.

Forgive me for my lack of understanding about this, but I'm kind of confused Embarrassed

Thanks!

Atlas was just a code name, it's now the Microsoft ASP.NET AJAX Extensions. If you go tohttp://ajax.asp.net/ there are several downloads as well as migration guides to switch you over from the previous CTPs to the new 1.0 beta. Click the Get Started tab at the top to... get started!

Thanks,

Eilon


Ok thanks that got me started!

But i'm having some problems now. I uninstalled the last Atlas CTP and installed the new AJAX. I also installed the new Toolkit and added a reference to it, and added the controls to the toolbox, but I'm still getting errors on my page. I change my Reference directive to match the new AJAX and updated all the control extenders to say ajax instead of atlas. But I'm still getting errors, especially with control toolkit properties.

Is there a better explanation on updating everything? I'm assuming all my AJAX updated, but the toolkit seems to giving me problems.

Thanks for all the help thus far!!


You may be experiencing some of the same issues some folks have already brought up... however without specific error messages kinda hard to guess what ypou are experiencing...

In terms of the toolkit the biggest item is the fact that the 'extender' controls are now part of the actual control properties. One idea to try is compare what feature you are implementing with how the asp.net code looks like in the example website pages of the toolkit. Additional - the Migration.Doc that is available at the link ref above - will give you some explicit examples on the conversion changes...


ooohhhh so I don't have to setup the properties for the extenders IN the extenders?

I'll look into that.

Thanks!


ok I'm sure the AJAX portion of my project is updated successfully.

I'm still having alot of problems with my control Toolkit. The only controls I have in my project are Accordians. When I load the page I get this error:

Parser Error

Description:An error occurred during the parsingof a resource required to service this request. Please review the followingspecific parse error details and modify your source file appropriately.

Parser Error Message:Type'AjaxControlToolkit.Accordion' does not have a public property named'AccordionPane'.

Source Error:

 
Line 260:                                                     ContentCssClass="accordianContent" FadeTransitions="true" 
Line 261:                                                     FramesPerSecond="40" TransitionDuration="250" AutoSize="Limit">
Line 262:            <ajaxToolkit:AccordionPane ID="AccordionPane1" runat="server" ContentCssClass="accordianContent" HeaderCssClass="accordianHeader">
Line 263:                <Header>
Line 264:??????????????? <a href\u003d"" onclick\u003d"return false;" class\u003d"accordianLink"> Communication </a>
\n \n\n\n


\nSource File:/bptWeb/ContactsDetail.aspx ?? Line:262

\n\n\n\n\n\n\n\n",0]);D(["ce"]);//-->Line 264: <a href="http://links.10026.com/?link=" onclick="return false;" class="accordianLink"> Communication </a>
 
I successfully changed my directives and manually updated my web.config like the migration.doc says and I've rebuilt the project, but I still get these problems with the Accordians.
Any ideas? Thanks for the help! 


Are you doing anything with code-behind that used to reference the extender properties? From the snippett above I can't see anything wrong - but if you still have codebehind that references the old extender method then I would assume it would generate an error as such what you are seeing...

Ok I followed the instructions about updating the scriptmanager, but its still giving the error

"Element 'ScriptManager' is not a known element. This can occur if there is a complication error in the website"
Here's what the scriptmanager tag looks like:

<asp:ScriptManager ID="sm1" runat="server" /
I get the same errors for my AccordianPane controls that are referenced in the above post.

I also noticed in the Migration guide it says:


Deletethe old version of Microsoft.Web.dll from the bin directory of yourapplication.

But I didn't have one, I hadMicrosoft.Web.Atlas.dll and I renamed the extension to OLD. Here's what I have in my bin folder (it may help):
AjaxControlToolkit.dll
AjaxControlToolkit.pdb
Microsoft.AtlasControlExtender.dll (??)
Microsoft.Web.Atlas.dll.OLD (this is what I renamed according to the instructions in the migration guide.

Thanks for the quick responses and all the help!


Ok I got the accordian pane working, turns out I forgot to add the new <Panes> tag around the AccordianPanes :)

Does my bin folder look ok now though? Do I need to delete everythign referencing 'Atlas'?

Thanks!


Personally I find having the old dlls in the bin can be a bad thing. Unless you do a clean solution - sometimes that caching of the dll makes things unpredicatble. I move the old dlls out to another folder and after cleaning up all the references and such - then recompile. If you still need to play around with the older Atlas bits - merely just make a copy of your solution and you can play with both without either disrupting the other... It makes it cleaner and you know what you are dealing with..


Great! I'm going to delete them unless you guys say otherwise. I don't plan on going back to Atlas CTP at all.

Thanks!

ConfirmButton Problem

Hi all, im new here and also to asp/ajax.. ive got a slight question to ask which may be simple.. im using the confirmbutton extender programatically as shown below

Dim lnkOptionAs New LinkButton lnkOption.Width = 50 lnkOption.Text ="Delete" lnkOption.ID = lblUser.TextAddHandler lnkOption.Click,AddressOf Delete ContentPanel2.Controls.Add(lnkOption)Dim btnConfirmAs New AjaxControlToolkit.ConfirmButtonExtender btnConfirm.TargetControlID = lblUser.Text btnConfirm.ConfirmText ="Are you sure you want to delete ?"

It retrieves a list of users and lists them down on a page using a for loop... now id like each option to have a delete ability as shown in the code above.. however the code doesnt seem to work as i think im missing something out since it doesnt show the text "Are you sure you want to delete ?"

Thanks :)

I don't see any code that adds the btnConfirm to the page...are you doing this?

Jason