Showing posts with label asp. Show all posts
Showing posts with label asp. Show all posts

Wednesday, March 28, 2012

Installation Question

I did the install but have not found the AJAX template in VS 2005.

Using ASP.NET AJAX with Visual Studio

If you have Microsoft Visual Studio 2005 installed on your computer, the installation process installs templates for AJAX-enabled Web site projects. It also installs an assembly (AJAXExtensionToolbox.dll) that extends the Visual Studio toolbox. When you create a new AJAX-enabled Web site by using Microsoft Visual Studio 2005, the template automatically includes the Web.config file that includes the elements required for ASP.NET AJAX components.

Well, since it didn't automatically install, would some kind person volunteer to explain to me how to manually install this template?

Question one: What is the name of the template?

Question two: Is it some where in C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025?

Thanks in advance, I am looking forward to using AJAX.

IanO

I think you are refering to the AJAX toolkit.

You can download the AJAX Toolkit from this site:

http://www.codeplex.com/AtlasControlToolkit/Release/ProjectReleases.aspx?ReleaseId=4923

And here is the video that shows you how to install it:

http://download.microsoft.com/download/9/d/8/9d8a3ff9-e520-4c69-a7a0-aad7a3dc596d/HDI-02-GetStarted-AJAX-Toolkit.wmv

Installed ASP.NET AJAX CTP

Hey all,

I've installed the ASP.NET AJAX CTP, now what? I haven't seen anything change in the toolbox or is this an under the cover kinda of deal.

thanks,

rodchar

hello.

well, you have to add the controls by hand to the toolbox since the ctp controls aren't added automaticaly:

http://msmvps.com/blogs/luisabreu/archive/2006/10/23/How-to-add-the-value_2D00_added-controls-to-the-toolbox.aspx


SmileThank you.

Installed new AJAX RT, now ASP controls dont work.

Hello,

I have been runing AJAX CTP and today upgraded to the full release version. I followed the migration instructions and updated my config file. So I thought I would go ahead and hit run as I am not using that much AJAX in my site. Thought I would just let the error messages show me where to update my AJAX code. Well I did not even get to that part of the code. For some reason now all my ASP controls seem to be disconjointed. Has anyone ever seen this message?

Error 10 The type or namespace name 'Controls' does not exist in the namespace 'System.Web.UI' (are you missing an assembly reference?) C:\WebSite\login.ascx 7

And this is the line that it stops on:<asp:TextBoxid="login_password" runat="server"TextMode="Password"EnableViewState="True"></asp:TextBox>

Thanks for any insite.

Michael

Never mind, I figured it out.
I'm having the same problem now. What did you do to correct it?

Installer Message

I had the .net framework installed on my computer and then installed Visual Studio 2005 and have been playing with ASP.net 2.0 for a while. Now that I downloaded the AJAX tool and try to install it I am getting a message that says I do not have the .net framework and AJAX cannot be installed to compatibility errors. I verified?in?my?programs?list?that?.net?framework?is?there?and?I?have?the?latest?(3.0)?all?the?way?back?to?1.0?so?I'm?not?sure?what's?going?on.?The?only?thing?I?can?think?of?is?that?Admin
privies are required to install b/c registries are being altered or something (I don't have admin). Normally when I try to use a windows installer and that happens I get an "Administrative Rights Required" message; not a compatibility message...Any thoughts?

Thanks!

JoeI had Tech Support give me admin privileges and the AJAX extensions installed without a problem. Apparently the installer was getting confused...it normally reports that sort of thing when Admin is required on an install.

Installing

I'm trying to install latest version of ASP.NET 2.0 v1.0 and when I try to install it says a previous version is installed and I need to un-install from add/remove programs. I have ASP.NET 2.0 AJAX Extensions Beta 2
installed currently. When I go to control panel add/remove programs and try and un-install it eventually comes up with "FATAL ERROR during installation". I can't seem to re-install new version (v1.0) or uninstall old version (beta 2.0). Is there a manual way I can get old version uninstalled or new version installed. Have tried on another PC and all works without a problem (have just uninstalled and re-installed).

Thanks

Discovered was corrupt registry setting/s on my PC. Ran Registry Mechanic and was ok after this.

you still have old version msi (beta 2)

try install it again, then remove it

Installing AJAX 1.0 on Windows 2003 Server

All, I have a windows 2003 server fully patched that we have full control of. It has IIS installed on it. Now we have developed an ASP.NET Ajax application, that runs fine on the desktop with visual studio installed. We have uploaded it to the server and Ajax is installed on the server. I can see the extension in the Windows\assembly folder, but when we run the web site we get the following error. I have checked through the forum and am going round in circles. Sorry if this is a stupid question but how do we get past this?

Server Error in '/movies' 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:Unrecognized attribute 'type'.

Source Error:

Line 2: <configuration>Line 3: <configSections>Line 4: <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">Line 5: <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">Line 6: <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>


Source File:F:\Websites\movies\web.config Line:4

Version Information: Microsoft .NET Framework Version:1.1.4322.2407; ASP.NET Version:1.1.4322.2407

Problem is that your iste is configured to use asp.net 1.1:Version Information: Microsoft .NET Framework Version:1.1.4322.2407; ASP.NET Version:1.1.4322.2407

Switch to 2.0 and it should work correctly. To switch go to IIS Manager, open properties of your web site and click asp.net tab.


Thanks coincidently just managed to work it out at the same time.

Thanks for your help

Installing AJAX on Test Server

When I install AJAX on my test server, is there anything to worry about in terms of my other non-AJAX ASP applications? Will installing the AJAX framework msi effect my other applications in any way?

shouldn't affect it at all unless you get everything enabled correctly in the individual web.configs. otherwise the other web apps shouldn't even know it is there.


So it sounds like as long as I don't touch my other applications on the test server, simply installing the updated framework won't affect anything.

Installing AJAX Control Toolkit for Visual Web Developer Express Edition

I cannot find any documentation on the asp.net website on how to install the AJAX Control Toolkit using Visual Web Developer Express Edition. Can anyone point me in the right direction?

Thanks,


Tom

have you tried

http://www.asp.net/ajax/documentation/live/InstallingASPNETAJAX.aspx


Found a great tutorial that steps through the process of adding the controls to the toolbox at

http://www.mcpblog.net/Lists/Categories/Category.aspx?Name=.NET

Installing AJAX question

My wen hosting company is worried about installing ASP.NET AJAX onto their production server. Can anyone tell me either why this isnt an issue (i.e. with other applications and the GAC or whatever) or if it could potentially be an issue, how can I somehow install AJAX so that it is local to my application?

Cheers,

Hi,

My guess is that the hosting company is worried about installing anything that is still in TCP, Beta or RC. I don't know if MS has issued a Go Live release for any AJAX stuff yet (best to check with them directly). As AJAX is going to become a part of production sites, it's a matter of time. If you don't want to wait, you can try another hosting Co. I know that discountasp.net is one that encorages new ASP.Net technology use - I'm sure there are others. If developing ASP.Net is important to you, I'd look to moving to a hosting co. that will work with you, and has a support staff that knows this stuff. Hope it helps. BRN..


thanks for the reply, sadly its not my choice about the hosting company and they seem pretty lenient about the AJAX installation. But still I would like to know how to install the AJAX CTP so that it is local to my app. (i.e. how to install the AJAX CTP into the BIN folder on my app).

How can this be done?

Cheers!


Hi,

As you don't have the option to go with another hosting company, my guess is that any AJAX functionality you might be able to include on your own will be limited. It's only my guess, but I'd think that if the hosting co, won't install them on their webserver, you can't get access to any of the controls that are part of the MS AJAX RC, AJAX Toolkit or CTP (Codeplex), controls. So, you'd have to provide all the funtionality that those components provide on your own - which would mean a ton of work (if you have the skills to write the stuff), and I don't know how much of an impact on performance that would have on your web app.

Try leaving this post open for a while, and see if someone can give you a definitive anwser. My gut feeling is that trying to implement AJAX technology into your app, when the hosting co, won't install the stuff on their server, won't be worth the effort. If it were my call, I'd try to do the app without AJAX, and explain any lack of AJAX type functionality on the limits of the hosting co. Another way to do this, is to develop the app WITH MS AJAX enabled, and cut out the AJAX code. Then you could add the AJAX controls back into the app, when your hosting company will allow AJAX. I'd probably develop two versions, one with AJAX, one without. If you can host ASP.Net 2.0 apps on that hosting co., they most likely will provide AJAX support at some point - probably when MS does an official release or Go Live. Hope it helps. BRN..


Hi,

I'm checking with a question on my hosting company's forum about this issue. I hope to hear from them soon. Posts I have read there seem to indicate that enabling AJAX is all on the developer side - I hope my post there will get a clear answer. It could be that your hosting co saying it doesn't support AJAX, is just that they won't help HELP YOU enable AJAX. I haven't gotten to the point of trying to get AJAX enaled on my hosted site yet, so I'm still feeling my way through the process.

I also wanted to mention that there are mixed signals as to how well (or how appropriate), the current MS AJAX technology works in providing the user experience you're after. Seems that a user hitting the back button is enough to cause problems. Also, like most new things, it may be used where it's not the best tool for the job. I've also noticed that several AJAX demo sites that I visited had some issues. whether that is caused by the site design, or my user setup and settings doesn't really matter - the point is that things for me (as Joe User), didn't work right all the time. Maybe AJAX just isn't quite ready for prime time. Hope it helps BRN..


Hi,

I saw thishttp://community.discountasp.net/default.aspx?f=24&m=14130 on my hosting co.'s forum. It has some info that you might find helpful. Looks like it outlines the steps you need to take to enable an MS AJAX site on that hosting co. It could well be that the steps are the same, or similar for all ASP.Net hosting co.s. Hope it helps. BRN..


Hi,

Here's another thread from the discountasp.net forum on using the MS AJAX toolkit (for apps using their servers):http://community.discountasp.net/default.aspx?f=24&m=14133 I think this gives a bit better idea of their recommendations. See if the material here gives a better clue as to how you might bbe able to get things working with your project. Hope it helps. BRN..

Installing ASP.NET AJAX with Visual Studio 2003

Hi Everyoe

I have one question that I want to install the ASP.NET AJAX with my Visual Studio 2003. So I want to know that which version of the ASP.NET AJAX will work properly with it. Also I am using Windows 2000 Professional and SQL Server2000 for Data Base Management.

Thanx in advance

Muhammad Ahsin Saleem

You will need to upgrade to .Net 2.0. as Ajax Beta is only compatable with .Net 2.0, .Net 3.0 (WCF) and upcoming Orcas...

Additionally - you can use the free Visual Development Express tools (as VS 2003 is not supported) - download them from theDownloads Tab .(as well as download Ajax and lots of starter kits)


There are no plans to support VS 2003 or .Net 1.1 I do believe...However, you can run on Windows 2000 - as OS is not the limitation - just the framework version..

Installing Atlas into non-atlas solutions

Hello everyone!

I need some help to do what I have to do, which is the following :

I have an asp .net 2.0 application nearly finished, and now I need to put support to atlas in it. How do I do that? I can't just start it over using the atlas template, there's too much already done! However, I only know how to start an atlas application.

Any help would be greatly appreciated!

Leandro Fernandez

Your best bet (imo, easiest) is to start an atlas project, then copy over the bits of the web.config you don't have (there's handlers, additional sections, etc) currently. You'd also make sure you have the atlas.dll in your /bin of the site, and then start adding atlas stuff. easiest of course is to add a scriptmanager and then wrap existing things in updatepanels, but it really depends on what you're trying to accomplish.

I just dealt with this: add the Atlas.dll to bin, add the sections to web.config as per the tutorial and add a script manager to the .master page if you have one. Try implementing an UpdatePanel, that will get you going.


Go to this post:http://forums.asp.net/thread/1336185.aspx and scroll down a little. It shows the changes to web.config needed for Atlas to work (in addition to copying the dll into the bin folder!)

Installing the ASP.Net control toolkit with Windows Vista

I installed ASP.net Ajax, the Extensions and the Toolkit with no problem at work on my Windows XP machine. However I have no look getting it to work at home on my Windows Vista machine. Has anyone succeed in get theirs installed with Windows Vista? I keep getting an error saying the TemplateVSI\TemplateVSI.cproj is not installed. How can I get this thing going?

Thanks for any help!

Hi kannis1,

Have you readhttp://www.asp.net/AJAX/Control-Toolkit/Live/Walkthrough/Setup.aspx carefully?

It is hard to say where the issue lies on.

Best Regards

Monday, March 26, 2012

Integrating AJAX into current site

I have seen many AJAX videos now that are good but they all start from a blank page.

I have sites I have built using ASP.NET 2 and I would like to implement ajax into those sites without rebuilding them.

Are there any videos/articles that show how to do this.

You don't have to rebuild a brand-new one. The point is to change Web.Config file. You can get template web.config file in C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025 (Beta 1 version) afterASP.NET AJAX v1.0 core Beta 1 release installed and then update web.config in your web application based on it. And you have to add some aspx source codes in your web pages, e.g. ScriptManager, UpdatePanel, etc.

Integrating Ajax into a SharePoint WebPart

Hello,

does anyone now how to use ajax within a webpart? In SharePoint Services V 3.0 the WebPart Class is just another component of ASP. NET 2.0 so it should be pretty easy. My question is where to import the libraies. Do I have to create WebPart pages that are ajax enabled?

thx for every help!

I've been using the client-side libraries that ship with ASP.NET AJAX beta 1 inside of SharePoint webparts - basically using the generated proxies to call webservices. I haven't played much with the controls ( and I think some of them are not fully supported in the current beta's of both products). Anyway, the basic steps are as follows:

1. Modify the web.config in your sharepoint root virtual directory to include all the ASP.NET AJAX Beta 1 settings.

2. Add the Microsoft.Web.UI control to your <SafeControls> list in the web.config.

3. Build the webpart. The gotcha here is that SharePoint will not allow you to run server-side code on an ungosted page. So if you create a page through Frontpage and embed the <asp:ScriptManager/> tags on it then it won't work. See this post for a work-around in this scenario (http://weblogs.asp.net/soever/archive/2006/07/27/SharePoint-2007_3A00_-using-ASP.NET-server-side-code-in-your-pages.aspx).

Besides embedding the <asp:ScriptManager/> tags you can also programatically add the controls to your page via the CreateChildControls() override. See an example here (http://daniellarson.spaces.live.com/Blog/cns!D3543C5837291E93!311.entry).

Thanks,

Matt


Matt,

I'm planning to use MS ASP.Net 2.0 Ajax framework with SharePoint.

What did you mean by including APS.NET Ajax settings, could you post a sample? Same for Microsoft.Web.UI control.

Thank you!

Lilia


Hi Lilia,

There are certain settings that need to be placed in your web.config file. My example is probably out of data because I haven't downloaded the final ASP.Net AJAX bits yet (still using beta). However, visit this bloghttp://daniellarson.spaces.live.com/Blog/cns!D3543C5837291E93!934.entry and you should find all the information you need to get going.

Thanks,

Matt


Matt,

I downloaded SharePointAJAX.wsp and RTM deploy.cmd into C:\Inetpub\wwwroot\wss\VirtualDirectories\80\bin on the web server and ran the script, which created SharePoint.Ajax.dll and .pdb files as well as altered web.config to include System.Web.Extensions. I added SharePoint.Ajax.dll to the VS05 project references but found that SharePoint.Ajax.DataLoader, .XmlTransform, and .XmlComponent methods don't show. Would these methods be used in the javascript web service?

I'm no very clear on what is needed to create Ajax-enabled controls for SharePoint. Would I have a web part (implemented in VS05) with a grid control for example and this .cs class would call a web service implemented with javascript (Ajax capability)?

Your help is very much appreciated.

Lilia

integration with asp.net services

Is there any documentation or examples online for creating atlas
applications that use the asp.net services?

Wally

--
Wallace B. McClure
"The Harder I Work, the Luckier I Get."
Listen to "The ASP.NET Podcast" at http://www.aspnetpodcast.com/
Database Award: http://url123.com/vc3er
Microsoft MVP - Visual Developer ASP/ASP.NET
AspInsider
"AJAX for ASP.NET" Coming Soon!
ADO.NET Book: http://url123.com/vc2bu
865-693-3004
118 Durwood Rd.
Knoxville, TN 37922
http://www.scalabledevelopment.com/
Blog: http://weblogs.asp.net/wallym/

Have you looked at theservices quickstarts? They have examples on doing this.

David


I have not seen any examples on integrating with things like membership,
authentication, and authorization. Do you have a URL?

Wally

wrote in message news:1196178@.66.129.67.202...
> Have you looked at the services quickstarts? They have examples on doing
> this.
>
> David
>
I have not seen any examples on integrating with things like membership,
authentication, and authorization. Do you have a URL?

Wally

wrote in message news:1196178@.66.129.67.202...
> Have you looked at the services quickstarts? They have examples on doing
> this.
>
> David
>
Sorry, I misunderstood your reference to "asp.net services" as meaning calling asmx asp.net web services from script. Let me check whether there is a sample relating to auth and membership.

The current integration with Membership and Forms authentication is limited to two methods on Web.Services.AuthenticationSerivce:

login

validateUser

The first method accepts a username, password and clientside event hookups for completion, errors and timeouts. Back on the server it validates the credentials with thedefault Membership provider. Assuming the call to ValidateUser succeeds, the "login" method returns a forms authentication cookie by calling FormsAuthentication.SetCookie(). When the call to ValidateUser succeeds, the result from "login" is true - failed credentials result in a "false" return value and no cookie.

The code for this looks something like:

function OnSubmitLogin() {
//Use the built in Atlas authentication service to make a call to the server.
//This call will verify credentials, and if the credentials are good, the server will
//issue a forms authentication cookie.
Web.Services.AuthenticationService.login(username.value, password.value, OnLoginComplete);
return false;
}

//The asynchronous completion event where you process the result of calling the server
function OnLoginComplete(result) {
password.value = '';

//On success there will be a forms authentication cookie in the browser.
if (result) {
username.value = '';
textLoggedIn.style.visibility = "visible";
textNotLoggedIn.style.visibility = "hidden";

buttonLoginLogout.innerText = "Click me to logout!";
buttonLoginLogout.onclick = OnSubmitLogout;
}
else {
textLoggedIn.style.visibility = "hidden";
textNotLoggedIn.style.visibility = "visible";
}
}

The "validateUser" works similarly to "login", but no forms auth cookie is set.


Awesome info. I had been scanning through the Atlas.js file and I was
trying to understand the difference between login and validateUser. That
info really helps.

Wally

wrote in message news:1197028@.66.129.67.202...
> The current integration with Membership and Forms authentication is
> limited to two methods on Web.Services.AuthenticationSerivce:
>
> login
>
> validateUser
>
> The first method accepts a username, password and clientside event hookups
> for completion, errors and timeouts. Back on the server it validates the
> credentials with the default Membership provider. Assuming the call to
> ValidateUser succeeds, the "login" method returns a forms authentication
> cookie by calling FormsAuthentication.SetCookie(). When the call to
> ValidateUser succeeds, the result from "login" is true - failed
> credentials result in a "false" return value and no cookie.
>
> The code for this looks something like:
>
> function OnSubmitLogin() {
> //Use the built in Atlas authentication service to make a call to the
> server.
> //This call will verify credentials, and if the credentials are good,
> the server will
> //issue a forms authentication cookie.
> Web.Services.AuthenticationService.login(username.value,
> password.value, OnLoginComplete);
> return false;
> }
>
> //The asynchronous completion event where you process the result of
> calling the server
> function OnLoginComplete(result) {
> password.value = '';
>
> //On success there will be a forms authentication cookie in the
> browser.
> if (result) {
> username.value = '';
> textLoggedIn.style.visibility = "visible";
> textNotLoggedIn.style.visibility = "hidden";
>
> buttonLoginLogout.innerText = "Click me to logout!";
> buttonLoginLogout.onclick = OnSubmitLogout;
> }
> else {
> textLoggedIn.style.visibility = "hidden";
> textNotLoggedIn.style.visibility = "visible";
> }
> }
>
> The "validateUser" works similarly to "login", but no forms auth cookie is
> set.
>
No problem. I had hoped that there was something I was missing in the
quickstarts. :-)

Wally

wrote in message news:1196977@.66.129.67.202...
> Sorry, I misunderstood your reference to "asp.net services" as meaning
> calling asmx asp.net web services from script. Let me check whether there
> is a sample relating to auth and membership.
>

IntelliSense doesnt always recongizes ASP AJAX.NET tags

I have installed the AJAX.NET Extensions. They work fine. I've also tried the Scott's To Do List (making modifications for testing).

The problem is, that sometimes the IntelliSense Sometimes!?!? does not recongizes asp Ajax tags. All AspAjax tags are underlined as if they were errors, and they appear in the error list. I can still compile and run the program without any problem. But the problem is that for example, any controls that I put inside a UpdatePanel are displayed as error, and I don't get any IntelliSense code Aids and auto Code Completion. This only "little" problem, is one hell of a BIG problem, because IntelliSense is an excellent productivity tool, and I don't want to loose it.

Any suggestions or ideas? Did anyone had the same problem?

Thank You

ckhro

Check out your web.config. The url below has some details on what should be included

http://codebetter.com/blogs/jay.kimble/archive/2006/05/19/144952.aspx

This article also references a problem if you have installed previous versions of Ajax.NET

http://weblogs.asp.net/scottgu/archive/2007/01/23/asp-net-ajax-1-0-released.aspx

HTH


I think i know what your problem is. I had something just like that.

I solved it by going to the html code and cutting out the update panel and putting it next to the closer of it so it removes all the bugs, it recognizes the objects then i moved the update panel code back where it was. after that the problem was gone.

As a second solution for new items I intend to put my objs first out side the of the update panel and then drag it in to update panel sometimes i relaized that it doesnt recognize items that gets created in the update panel.

And also if i add an id tag with runat server coding i had to do the first option where i cut out the update panel to make it recognize the new id.

Hope that will help.


"I solved it by going to the html code and cutting out the update panel and putting it next to the closer of it so it removes all the bugs, it recognizes the objects then i moved the update panel code back where it was. after that the problem was gone."

LOL. I do the same way when my IntelliSense doesn't come up. However, lately it comes back. Weird.

Anyway, this is a known issue.


Seehttp://weblogs.asp.net/scottgu/archive/2006/11/16/gotcha-lost-html-intellisense-within-asp-net-ajax-controls.aspx, and SP1 fixes this.


i have sp1. :-P iguess i was following this post little different. i have a problem where the id doesnt get recognized by the backend coding. Thats why i do what i do in my prior post.

Steve Marx:

Seehttp://weblogs.asp.net/scottgu/archive/2006/11/16/gotcha-lost-html-intellisense-within-asp-net-ajax-controls.aspx, and SP1 fixes this.

This is an excellent workarround Steve! It solves the problem. The lack of Intellisense problem was only in content pages (that means, that they depend on a master page). If we have both the master and the content page open, the problem is fixed.

I haven't installed SP1 yet, but for now this works just fine.

Thanks a lot

Intellisense not updating UpdatePanel changes until...

I've just started using ASP.Net AJAX 1.0 in Visual Studio 2005 (Using VB.Net code editor). I've noticed that when I make a control change within an UpdatePanel (e.g. adding a new server control, or changing the ID of an existing server control), the intellisense in my code file is not updated until I close and reopen the .aspx file.

Is there a way to force this to refresh without having the close/reopen the .aspx file?

Thanks!

--Michael

Have you installed SP1 for VS 2005 and the Vista Update for that (if you are running vista)?


I'm not running Vista, and I have installed SP1.

Thanks


The lastest Visual Studio hotfix addressing intellisense issues has fixed the issue for me,

https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=9436

Saturday, March 24, 2012

Internet Explorer freezes after using AJAX

Hi

I have a weird problem. I have created an ASP.NET site which is displayed as a popup in another website.
The popup shows a treeview with which the user can update some data via an webservice. After selecting a treenode, a webservice is called in the code behind.
When I open this popup two times it will freeze all Internet Explorer windows which belongs to the current website. Only restarting the Internet Explorer helps. There is no javascript error or any other exception.

I have made tests with similar websites without ajax without any problem., so I think this may have to do with ASP.NET AJAX. The problem occurrs with Internet Explorer 6 and 7.

This is the code of the popup website:

<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div id="header">
<h1>
<asp:Label runat="server" Text="folder choice" ID="LaHeader"></asp:Label>
</h1>
</div>
<div id="haupt">
<div id="navi">
<asp:UpdatePanel runat="server" ID="UpPaTreeView" ChildrenAsTriggers="true">
<ContentTemplate>
<asp:TreeView runat="server" ID="TrViStructure" DataSourceID="XmDaSoStructure" OnSelectedNodeChanged="TrViStructure_SelectedNodeChanged">
<DataBindings>
<asp:TreeNodeBinding DataMember="Root" PopulateOnDemand="True" TextField="Name" ValueField="GUID" />
<asp:TreeNodeBinding DataMember="Folder" TextField="Name" ValueField="GUID" />
<asp:TreeNodeBinding DataMember="Underfolder" TextField="Name" ValueField="GUID" />
</DataBindings>
<NodeStyle CssClass="TreeItem" />
<HoverNodeStyle CssClass="TreeItemHovered" />
<SelectedNodeStyle CssClass="TreeItemSelected" />
</asp:TreeView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div id="content">
<asp:UpdatePanel ID="UpPaStatus" runat="server" ChildrenAsTriggers="true">
<ContentTemplate>
<asp:Panel ID="PaButton" runat="server" Visible="false">
<div id="controls">
<asp:Button OnClientClick="closewindow()" runat="server" CssClass="button" Text="Close"
ID="BuClose" />
</div>
</asp:Panel>
<asp:Panel ID="PaMessage" runat="server" Visible="false">
<div id="label">
<asp:Label ID="laErrorHeader" runat="server" Text="Header"></asp:Label><br />
<asp:Label ID="laErrorMessage" runat="server" Text="Label"></asp:Label>
</div>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpPaTreeView">
<ProgressTemplate>
<div id="update">
<img src="img/ajax-loader-blueBg.gif" />
</div>
</ProgressTemplate>
</asp:UpdateProgress>
</div>
</div>
<asp:XmlDataSource runat="server" ID="XmDaSoStructure" DataFile="~/XML/Folders.xml">
</asp:XmlDataSource>
</form>

<script type="text/javascript">
function closewindow()
{
window.opener = this;
window.close();
}

</script>

</body>


Hi c.kr

It is not recommended to add the line number in your source code. Would you please modify it and provide more C# code and XML file related to your page ?


Hi, sorry for the line numbers, I removed it.

This is the used xml file for the treeview:

<Folder Name="foobar" GUID="some guid">
<Folder Name="foobar2" GUID="some guid2"></Folder>
<Folder Name="foo" GUID="5871D39C-7DD0-DB11-A445-0003FF6D5330">
<Folder Name="bar" GUID="E8C495C8-7DD0-DB11-A445-0003FF6D5330">
</Folder>
</Folder>
</Folder>
 This is the code behind file for the webpage:
public partialclass FolderChoice : System.Web.UI.Page
{
string _objectId =string.Empty;
CrmService _service;

private SessionData sessionData
{
get {return Session["SessionData"] ==null ?null : (SessionData)Session["SessionData"];
}
set { Session["SessionData"] =value;
}
}

protected void Page_Load(object sender, EventArgs e)
{
sessionData = CRMplusServiceConnector.GetSessionData(Request.ServerVariables["HTTP_ACCEPT_LANGUAGE"]);
_objectId = Server.UrlDecode(Request.QueryString["oId"].ToString());

LaHeader.Text = sessionData.Translation["folderchoice.LaHeader"];
BuClose.Text = sessionData.Translation["folderchoice.BuClose"];
}

private void ConnectToCrm()
{
_service =new CrmService();

_service.Url = CRMplusServiceConnector.Configuration["crmServiceUrl"];
_service.Credentials = System.Net.CredentialCache.DefaultCredentials;

//----------------------
// Gets the Current User's Information
//---------------------- WhoAmIRequest userRequest =new WhoAmIRequest();
WhoAmIResponse userResp = (WhoAmIResponse)_service.Execute(userRequest);

//----------------------
// Set UserId of current User as CallerId
//---------------------- _service.CallerIdValue =new CallerId();
_service.CallerIdValue.CallerGuid = userResp.UserId;

//----------------------
// Cache credentials so we don't have to re-authenticate on each request.
//---------------------- _service.PreAuthenticate =true;
}

protected void TrViStructure_SelectedNodeChanged(object sender, EventArgs e)
{
this.PaMessage.Visible =false;

PaButton.Visible =false;
TrViStructure.Enabled =false;
TrViStructure.EnableClientScript =false;

SelectFolder();

TrViStructure.Enabled =true;
TrViStructure.EnableClientScript =true;
PaButton.Visible =true;
}

private void SelectFolder()
{
try { ConnectToCrm();// Create the target object for the request TargetRetrieve<someEntitiy> targetDoc =new TargetRetrieve<someEntity>();

// Set the target object's IDstring guiddoc = _objectId.Replace('{',' ');
guiddoc = guiddoc.Replace('}',' ');
guiddoc = guiddoc.Trim();
targetDoc.EntityId =new Guid(guiddoc);

// Create the request object RetrieveRequest reqDoc =new RetrieveRequest();

// Set the request object's properties reqDoc.Target = targetDoc; reqDoc.ColumnSet =new AllColumns();

// Execute the request RetrieveResponse retDoc = (RetrieveResponse)_service.Execute(reqDoc); <someEntity> curDoc =new <someEntity>();
if ( retDoc.BusinessEntity !=null )
{
curDoc = (<someEntity>)retDoc.BusinessEntity;
}
else { Environment.Exit(1); } curDoc.new_documentfolderid =new Lookup();
curDoc.new_documentfolderid.type = EntityName.new_folder.ToString();
curDoc.new_documentfolderid.Value =new Guid(TrViStructure.SelectedNode.Value.ToString());
_service.Update(curDoc);
}
catch ( System.Web.Services.Protocols.SoapException exc )
{
ShowException(exc);
}
}

private void ShowException(System.Web.Services.Protocols.SoapException exc)
{
this.PaMessage.Visible =true;
this.laErrorHeader.Text = sessionData.Translation["folderchoice.LaError"];
this.laErrorMessage.Text = exc.Detail.InnerText;
}
}

I replaced one of our classes with <someEntity>. The service which is called belongs to Microsoft Dynamics CRM.

Hi c.kr,

Sorry for the delay.I'm failed to reproduce your problem after wholly copied your code into a new project. The best way to indicate the exact root cause is dubugging it step by step in VS2005. By the way, Treeview control is not support very well inside UpdatePanel.http://ajax.asp.net/docs/overview/UpdatePanelOverview.aspx please focus on "Controls that Are Not Compatible with UpdatePanel Controls ".

If you has found it , please share it with us.

Internet Explorer Mobile & ATLAS

Hi all,

I have a webservice and ASP.NET ATLAS enabled, and working with IE6. There is not ATLAS controls, it is very simple call from javascript, passing 3 arguments.

I am tying to make it works in Internet Explorer Mobile in a Smartphone with Windows Mobile 5.0, but when I press the button, nothing happens...

In theory, Explorer Mobile supports HTML 4.01 CSS and Extensible HTML (XHTML), and XMLHTTP Request...

Have any try this or something with similar scenario?

Thanks in advance

David

I don't believe the mobile version of internet explorer supports the xmlhttprequest object or has any AJAX support for that matter.

Please, see this bloghttp://blogs.msdn.com/iemobile/archive/2005/11/15/493200.aspx

If IE Mobile supports AJAX and this sentence
xmlHttpReq = new ActiveXObject("Msxml2.XMLHTTP");
, I can't undestand why ATLAS will not support IE Mobile....

This is the function inside WebResource.axd generated by ATLAS that creates XMLHTTPRequest object

window.XMLHttpRequest = function() {
var progIDs = [ 'Msxml2.XMLHTTP', 'Microsoft.XMLHTTP' ];

for (var i = 0; i < progIDs.length; i++) {
try {
var xmlHttp = new ActiveXObject(progIDs[i]);
.....

Very similar no? I think that is imperative that ATLAS works for IE Mobile...


hello.

i really don't understand much about mobile devices...is there any sniffer that can capture the traffic between the browser and the server? (something like fiddler, that is)

Invalid Argument

Hi there

I get an odd error when I publish my website to a 2003 server box with the latest asp.net ajax dll installed.

Currently my only page that uses the toolkit has a usercontrol containing a DragPanelExtender. When it loads I get an 'Invalid Argument' client javascript exception. If I try to debug, it breaks into the client side script at

a.left=c+"px"

where c is an invalid number (NaN)

This works fine locally on my dev box.

thanks in advance

Found it!! After tearing what little hair I have left out. I found that certain web servers (I am still looking into the exact detail that causes this to happen!) seem to a cause IIS/IE/ASP NET AJAX to have a problem with frame attributes like frameborder when their values are set to "yes" or "no" rather than "1" or "0".

Once I updated all of them the problem went away.

Hope this helps someone