Wednesday, March 28, 2012

ajax Calendar

how do i reduce the ajax Calendar height and width?

thanks.

Hi,

have a loot at the following post ,
http://forums.asp.net/1605173/ShowThread.aspx

please also see the blog, to understand the styles of calendar extender control

http://community.bennettadelson.com/blogs/rbuckton/archive/2007/02/02/Skinning-model-for-Calendar-and-Tabs-in-Ajax-Control-Toolkit.aspx

cheers

Ajax CaledarExtender

Hi,

I have a problem with CalendarExtender, the calendar is not set under the textbox, its position depends on the position of the scroll. How can I force the calendar to appear always under the textbox?

Thanks.

Your problem may be related to other CSS styles that you have on the page that may be effecting the calendar. Also, make sure IE6 is rendering in standards mode vs. quirks mode (seehttp://en.wikipedia.org/wiki/Quirks_mode for more info on Quirks Mode) since the AJAX Control Toolkit assumes IE is rendering pages in standards mode.

-Damien


Thanks, but I placed Calendar above everything, where it couldn't be affected by any CSS style and it was the same. I am using IE7 and it's not working either.

Monika


IE7 can also be pushed in quirks mode, could this be happening? Are you using absolute positioning or something that may be causing the issue?

I think there still may be some style causing you problems, try looking at the applied styles using the IE Developer Toolbar or Firebug for Firefox, both are free.

-Damien


I actually filed a bug against something virtually identical to this at CodePlex and then created and documented all the code that would fix it. Both the PopupExtender which it relies on, and the CalendarExtender need patches. The problem arises because the PopupExtender tries to calculate the position where it should appear based on scroll positions and page size. That's fine for the PopupExtender, but not for the CalendarExtender. The fix was to add a property to PopupExtender that would cause this calculation to be bypassed and then specify true for this default false property in the CalendarExtender. The CodePlex ID is 9099 and it may fix 8970 as well.

In my case I created a new custom Ajax ToolKit control by copying all the code and modifying the namespace so that it could not conflict with or get overwritten by a future update that did not have a fix. All my code is in 9099 if you do this. If this is not the cause then it is another calculation that I missed, and you would need to modify the JavaScript source in the toolkit.

As a general fix to this problem, the proper fix is probably to add an attribute to the CalendarExtender that would turn this on if you needed it, but would not break previous projects when not specified.


I have the same issue. I tried to look into issues 9099 and 8970 in CodePlex but the system could not find them.

Are these the correct issue IDs or is it just my user account lacking sufficient privileges?


Not sure how you're looking for issues but if you go to the Ajax Toolkit project, click on Issue Tracker and go to the Advanced View, there is a "Go to Isssue #" on the right

AJAX Calander Behind other Controls

Hi All,

I am using the Ajax Calander Control, I have it working in all and I have it writing to a textbox. I have this placed on a form where there are dropdown lists. It seems that the Cal. control always appears behind these dropdownlists instead of infront, therefore making it not visible.

Any work arounds?
Thanks in advance!!!
Tim

Hi tbraga,

I do not notice this behavior and I use VS.NET 2005 sp1 / Ajax Extentions 1 / AjaxControlToolkit 10920.

Can you post code that replicates this behavior?

Kind regards,
wim


Hi Tbraga,

As far as I know, this is a common issue. We suggest that you should upgrade your AJAX Control Toolkit to the latest version. If this doesn't work, you can set its zIndex properties. For example, $find("CalendarExtender's BehaviorID")._popupDiv.zIndex = large enough number.

function pageLoad(){
$find("CalendarExtender's BehaviorID").add_shown(resetZIndex);
}

function resetZIndex(){

$find("CalendarExtender's BehaviorID")._popupDiv.zIndex = value.

}

I hope this help.

Best regards,

Jonathan

AJAX Bug?

I have a page with an upper UpdatePanel that has 3 collapsible panel's and a lower UpdatePanel that has 2 gridviews in it. What happens is you select a list of employees and different training items in the upper UpdatePanel and a cross-tab grid is displayed in the lower UpdatePanel. Once the data is loaded into the cross-tab, it goes through every cell to update the text data to a graphical view of the data. So instead of 0 you would see a blank checkbox, and instead of 2 you would see a checked checkbox. The gridview columns are created dynamically based on what training selections were made. There can be as many as 400 training items at once and a couple hundred employees as well, so you can imagine how big the cross-tab grid can become if everything is selected. This page worked GREAT before I implemented ajax on it(I have my reasons), but now with AJAX in the page the cross-tab will only show if only a small number of employees or trainig items are selected. If you try to select every training item and every employee the whole program crashes in a very nasty way. Imagine losing the whole IE menu bars and start button, quickstart buttons, etc. The WHOLE screen becomes a jumbled mess. Any suggestions? Is this a bug or am I just trying to access too much data through AJAX?

JavaScript just flat out sucks with large amounts of data when looping.

You are probably causing JavaScript to have to loop through 1000's of form elements to figure out what is selected and build a string of that data to be posted. The freezing is the browser eating your CPU trying to crunch all of that data.

Eric


Thanks for the reply. I am starting to understand that this is the reason. Can you think of any workarounds? The only reason AJAX is being used on the page is to get the browser back button to work correctly so that the user can't click back and have someone's employee trained status revert to the previous state. Is there another way around this? Thanks.
hi.
i'm not sure if you're using updatepanels or are you wroking directly with javascript?
Here is a good post on JavaScript performance recommendations:http://blogs.msdn.com/ie/archive/2006/08/28/728654.aspx
Using Ajax
using Ajax.net with Update Panels.

ajax bridge

Initially, I would like to access the web services (cross-domain) in the client side only.

I watched the sample here and try to run the code. but it fails using RC
http://www.asp.net/learn/videos/view.aspx?tabid=63&id=66
error code: cant found "Samples"

I would like to ask if anyone runs the code succesfully in RC?

will there be any similar method that could archiveit and when will it be release?

thx a lot

Try to take a look at the following instructions when calling web service through javascript in the client side.
Now that we've talked about setting up the ScriptManager and how the proxy functionality works, let's take a look at how developers will leverage this technology. We'll look at passing both simple and complex data type and handling errors. During the demos, we'll take a look at the network traffic being passed to and from the server.
?
"Fire and Forget" Invocation?

If the web service class on the server includes a web method that does not return data, you can call the web service without having to handle a response. This is the simplest web method call that can be made from the client. For example, your application has the following web method:
?
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[Microsoft.Web.Script.Services.ScriptService]
public class Parts : System.Web.Services.WebService
{
[WebMethod]
public void NoReturn()
{
//do work here
System.Threading.Thread.Sleep(2000);
}
}
?
The following JavaScript can be used to invoke that web method
?
function RunWebService()
{
Parts.NoReturn();
}
?
If the webservice is in a custom namespace, you would need to fully
qualify the call to the webservice. For example, if the WebService
has a namespace of MyCustomNameSpace.WebServices, the above JavaScript
becomes:
?
function RunWebService()
{
MyCustomNameSpace.WebServices.Parts.NoReturn();
}
?
Getting a return value?
In a scenario where the web method has a return value, then the asynchronous invocation model requires providing a callback function that will be called when the web service call returns. The callback function has an input parameter that contains the results of the web service call.
?
The server-side AJAX stack will appropriately serialize the return value from the web method, and the client-side AJAX stack will deserialize the data to an appropriate JavaScript type to be passed to the callback function.
?
On the Server-side, there is a WebMethod that returns a string:
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[Microsoft.Web.Script.Services.ScriptService]
public class Parts : System.Web.Services.WebService
{
[WebMethod]
public string DynamicDropdown()
{
string tmpDropDown;
tmpDropDown = "<select id=test name=test><option value=Part1>Part1</option><option value=Part2>Part2</option></select>";
return tmpDropDown;
}
}
?
When you call the web service in client script, the call will need to have a callback function specified to handle the return value. The following script demonstrates calling the DynamicDropdown WebMethod of the Parts Web Service and specifies OnComplete as the callback function. The OnComplete function has an input paramter which is the return object from the web service call, in this case, this will be the string value. The OnComplete function then takes the return value and inserts it as the innerHTML property of a span with ID DynamicArea. The result is that a dropdown appears on the page.
function InsertDropdown()
{
Parts.DynamicDropdown(OnComplete);
return false;
}
function OnComplete(result)
{
DynamicArea.innerHTML += result;
}
Passing primitive type parameters to web method
If the web method takes input parameters, then the JavaScript invocation of the method will take corresponding JavaScript parameters. The parameter values will be serialized by the AJAX stack into JSON and packaged in the body of the request and then de-serialized as .Net types corresponding to the signature of the web method.
?
For example, given the following server method that accepts a string parameter and returns a string:
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[Microsoft.Web.Script.Services.ScriptService]
public class Parts : System.Web.Services.WebService
{
[WebMethod]
public string EchoString(String s)
{
return s;
}
}
?
You would use the following JavaScript to call the web service, pass the string parameter and include the callback function:
?
function CallEchoString()
{
Parts.EchoString(form1.GetString.value, OnCallBack);
}
function OnCallBack(results)
{
alert(results);
}
?
The call to the EchoString web method on the Parts.asmx web service is taking the value from a textbox named GetString in a form with ID of "form1" to pass as the input parameter and specifying OnCallBack as the callback function. The OnCallBack function has an input parameter of "results" which is the return type from the EchoString web method. The JavaScript then displays that in a popup box.
Specifying a callback for failure cases?
If the request to the web method is unsuccessful, whether because of error, timeout, or if server code aborts the request, then the callback specified for successful completion will not be called. A second callback function can be specified in the call to the web service for failure cases, receiving an error object as parameter, as in the following javascript:
?
function CallService()
{
PeopleServices.ThrowError(OnCallBackThrowError, OnError);
}
function OnCallBackThrowError(result)
{
alert("OnCallbackThrowError: " + result);
}
function OnError(result)
{
alert("OnError: " + result.get_message());
alert(result.get_stackTrace());
}
?
In the code sample, the ThrowError method of the PeopleServices web service does not take any input parameters. The method call passes the callback function "OnCallBackThrowError" and a method for handling any error condition called "OnError". The OnError method takes an input parameter which is a error object that contains the error message and stack information passed from the server if a .NET Exception was thrown. In this case, the information is displayed in popup windows, but once you have the errors in the browser, you can notify the user in any manner you feel is appropriate.
Using the same callback from multiple callers?
You can leverage the same callback function on the client for multiple web service calls. This allows you to avoid having to write a client function for each callback. In order to differentiate the calls, you pass a user context object that contains information that can be used to tell the requests apart. The user context object can be any JavaScript primitive type, array, or object.
?
For example, let's say you have a web service that contains a web method that you need to call multiple times from the client. You need to know which response corresponds to each call. For example, the first call's return value is placed in Span1 and the second call is in Span2. In order to do this, you can associate context information with the request and you can use the context information to distinguish which request is providing the response. This information is not passed to the server by default. If you want to pass this information to the web service, you would need to pass it as an input parameter to the remote method.
?
On the server, you have the following web service method that is taking in the a string which should be a stock symbol and returning a string:
?
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[Microsoft.Web.Script.Services.ScriptService]
public class Parts : System.Web.Services.WebService
{
[WebMethod]
public string UserContextSample(string stockSymbol)
{
string returnValue = String.Empty;
//do work here to look up stock symbol info
return returnValue;
}
}
?
On the client, you create a JavaScript object to store context specific information and pass that as the last parameter to the web service call. In the sample below, we're creating a dictionary object on the client with a key of contextKey and a value of a stock quote. The syntax for the web service call is:
?
WebService.Method(InputParams, CallBackMethod, ErrorMethod, contextInfo);
?
function CallServicesTest()
{
var userContext1 = {contextKey:"MSFT"};
Parts.UserContextSample("MSFT", OnCallBack, OnError, userContext1);
var userContext2 = {contextKey:"AAPL"};
Parts.UserContextSample("AAPL", OnCallBack, OnError, userContext2);
}
In the callback function, you add a second input parameter that contains the context passed in the web service call. This way you get the results of the web service call in the first input parameter and the context information in the second parameter. In this case, we're checking the context information and inserting text into specific spans on the page along with the response from the web service.
?
function OnCallBack(results, userContext)
{
switch(userContext.contextKey)
{
case "MSFT":
SPAN1.innerHTML = "Microsoft " + results;
break;
case "AAPL":
SPAN2.innerHTML = "Apple " + results;
break;
}
}
Using the same callback for different web methods?
This scenario is similar to using the same callback for multiple calls with the exception that you have two separate web service methods on the client that are using the same callback method. In this scenario, you include a third input parameter on the callback function to receive the web service call that the response is associated to.
?
For example, you have two Web Methods that your function needs to call, but you want to have a single callback method. You can tell which web method is returning by accessing the optional third input parameter to the callback function.
?
On the server you have:
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[Microsoft.Web.Script.Services.ScriptService]
public class Parts : System.Web.Services.WebService
{
[WebMethod]
public string EchoString(String s)
{
return s;
}
[WebMethod]
public string AnotherEchoString(String s)
{
return s;
}
}
?
On the client you have a button that has an onclick method calling GetEcho() function in JavaScript:
?
function GetEcho()
{
Parts.EchoString("This is echo number 1", OnCallBack);
Parts.AnotherEchoString("Another echo string!", OnCallBack);
}
function OnCallBack(results, userContext, sender)
{
alert(results + "\n" + sender);
}
?
When OnCallBack runs, you will get an alert dialog with the string you passed to the web service along with Parts.EchoString or Parts.AnotherEchoString.
Passing and receiving a server type?
As mentioned previously, the AJAX networking stack will generate proxy scripts for any server type that is referenced as an input or output parameter by the web methods contained in linked web services. This allows a developer to access these types on the client in a similar fashion as they would on the server. The types are serialized using JSON serialization which is covered in the next lesson.
?
For example, let's say you have the following web service called PeopleServices. This web service has a method called NewPerson that takes in 3 parameters; 2 Person objects and 1 object of type bool. The return value is also of type Person.
?
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[Microsoft.Web.Script.Services.ScriptService]
public class PeopleServices : System.Web.Services.WebService
{
?
[WebMethod]
public Person NewPerson(Person parent1, Person parent2, bool female)
{
Person _newPerson = new Person();
//Do other work
return _newPerson;
}
}
When you add this web service to the ScriptManager, the client will make a request for the proxy script as discussed in the Proxy Generation section. The result is that the Proxy script will have the web service method as well as the properties for the Person class. The person class is defined as the following on the server:
?
public class Person
{
public string Name
{
get { return _name; }
set { _name = value; }
}
public int Age
{
get { return _age; }
set { _age = value; }
}
public int Height
{
get { return _height; }
set { _height = value; }
}
}
?
On the client, you would need to generate two objects of type Person and pass them as parameters to the web service. In the callback script, the result parameter will be of type Person. Here's a sample JavaScript function that takes the values of textboxes on the page and creates two Person objects, then calls the NewPerson object on the above web service.
?
function GetNewPerson()
{
var person1 = new Person();
var _name = document.getElementById('p1FirstName');
var _age = document.getElementById('p1Age');
var _height = document.getElementById('p1Height');
person1.Name = _name.value;
person1.Age = _age.value;
person1.Height = _height.value;
?
var person2 = new Person();
_name = document.getElementById('p2FirstName');
_age = document.getElementById('p2Age');
_height = document.getElementById('p2Height');
?
person2.Name = _name.value;
person2.Age = _age.value;
person2.Height = _height.value;
PeopleServices.NewPerson(person1, person2, true, OnCallbackGetNewPerson, OnError);
}
?
Here is a sample callback function that handles the return type from the NewPerson method. The result parameter is a Person object and you can directly access the properties. In this case NewPerson is the ID on a Div in the page.
?
function OnCallbackGetNewPerson(result)
{
var newPerson = result;
NewPerson.innerHTML = "New Person <br/>";
NewPerson.innerHTML += "Name: " + newPerson.Name + "<br />";
NewPerson.innerHTML += "Age: " + newPerson.Age + "<br />";
NewPerson.innerHTML += "Height: " + newPerson.Height + "<br />";
}
When you run pages that make these calls and check out the network traffic, you'll see the following:
Web service call is a POST to …/PeopleService.asmx/js/NewPerson. Since the request ends in /js/NewPerson, the AJAX HttpHandler will handle the request to the web service. The Content-Type of the request is application/json.
Request Body contains all the data to create the Person object on the server. The main piece is the __type parameter which tells the server what type to create:
?
{"parent1":{"__type":"Person","Name":"Name1","Age":"12","Height":"60"},"parent2":{"__type":"Person","Name":"Name2","Age":"24","Height":"72"},"female":true}
The response also has a Content-Type of application/json and has a similar body containing the __type parameter and values necessary to create the Person object on the client:
?
{"__type":"Person","Name":"Name1name2ella","Age":23,"Height":71}
?Demo is FireForgetDemo.aspx
?
Wish the above can help you.

AJAX breaks URL rewriting : Microsoft JScript runtime error: Sys is undefined

Hey all,

My development machine is Windows XP. I'm using Intelligencia's URLRewriter.NET httpmodule to handle URL rewriting. I'm also using ScottGu's Form Control Adapter trick to catch postbacks.

Here's the problem - Sometimes, AJAX will fail. The controls inside the UpdatePanels will work. However, they will cause the whole page to refresh instead of just the area inside the UpdatePanels. This bug happens randomly. After days of working on this problem, I have not found a way to reproduce the bug. This has been very, very frustrating.

When I attach the Visual Studio debugger to IE, the page will break on this line :
Sys.WebForms.PageRequestManager._initialize('ScriptManager1', document.getElementById('form1'));

This is the error that I get :
Microsoft JScript runtime error: 'Sys' is undefined

When I try to debug the page in Firefox using the FireBug plugin, I get the five following errors :

I'll get three errors for the following line :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
One of those errors comes from WebResource.axd, and two of them come from ScriptResource.axd

I'll get a "Sys is not defined" error from my index.aspx, although FireBug apparently doesn't know which line is throwing the error.

Finally, I'll get a "Sys is not defined" error from this line in my index.aspx:
Sys.WebForms.PageRequestManager._initialize('ScriptManager1', document.getElementById('form1'));

I can solve the problem temporarily by disabling the UrlRewriter. There's a line in web.config that specifies when the URLRewriter should rewrite a URL. After I take this line out of the web.config, I'll reload a page on the site, and AJAX will be working fine again. I'll then put the line back in web.config, thus enabling the URLRewriter. AJAX will continue to work fine. In other words, by taking out the URLRewriter and putting it back in again, the problem will be solved until the next time it randomly happens again. Weird, huh?

If you have any insight at all into the nature of this problem, please let me know. Likewise, if you can tell me how to debug this monster, please let me know, as I am at an utter loss at this point.

I believe UrlRewriter allows you to add exclusions based on header data. If so, exclude any requests with the request header "X-MicrosoftAjax: Delta=true". That will prevent it from interfering with any partial postbacks.

Thanks for the advice! This bug has driven me *insane!* I swear, I must have spent at least 2 1/2 days on this thing.

Fortunately, I think I made a breakthrough today.

URLRewriter.NET requires that you specify which URLs to intercept. Naively, I had given it the following configuration :
<rewrite url="(.*)" to="${UrlTransformer($1)}" /
Basically, I had told it to intercept all incoming URLs. I think this was a mistake.

Somebody on a forum suggested that, if you get the "Sys is undefined" error, you should try to take the URL for the ScriptResource.axd file and paste it into your address bar and see what happens. When I did that, instead of being offered the opportunity to download ScriptResource.axd, I noticed that URLRewriter had picked up on the URL and was trying to do a rewrite! This could mean that IIS never properly received the request for ScriptResource.axd, and thus the client never recieved it. This would explain the JScript error and subsequent AJAX failure.

I went ahead and entered the following new configuration for URLRewriter :
<rewrite url="^(.*\.aspx)$" to="${UrlTransformer($1)}" />

So now, it's only picking up URLs that end in .aspx. So far, everything is working exactly as it should. However, I am hesitant to close the case on this for two reasons :

1) This bug has been incredibly hairy, and there have been a few other occasions where I was *sure* I had solved the problem. Thus I am hesitant to call it prematurely.
2) The incredibly random nature of the bug. This is really what made this bug so difficult; the fact that there was no reliable way to reproduce it. Even if I am correct about the cause of the bug, why in the world would it occur so randomly? I know that the browser will cache the ScriptResource.axd code. Could the bug's occurance coincide with the browsers' cache being flushed? Was this problem really more likely to occur when the network was slow, or was I just imagining things? Why would removing the line from the web.config and then replacing it again make a difference?

I may never know the answers to these questions.

In any case, thank you for your help. Your suggestion will be the first thing that I try if my current solution doesn't work.

AJAX Breaks the asp:Treeview

It is also a generally unstable browsing and development experience, but there's enough posts on that already.

I have the .Net AJAX RC installed. Create a simple AXAJ enabled web site, add a Label to display the selected node values, and a treeview using an xmldatasource. The XML has to be somewhat deeply nested to get the bug, about 6 levels deep. Wrap it all in an update panel and watch it explode when you try to navigate the tree.

protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
{
this.TreeNodeValue.Text = TreeView1.SelectedNode.Value + "::" + TreeView1.SelectedNode.Text;
}

<body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <asp:UpdatePanel ID="updTreeView" runat="server"> <ContentTemplate> <asp:Label ID="TreeNodeValue" runat="server" /> <div> <asp:XmlDataSource ID="dsTreeview" runat="Server" XPath="entity" DataFile="~/App_Data/ReportsTree.xml" /> <asp:TreeView ID="TreeView1" runat="Server" DataSourceID="dsTreeview" ExpandDepth="2" NodeIndent="8" OnSelectedNodeChanged="TreeView1_SelectedNodeChanged"> <RootNodeStyle CssClass="RootNode" /> <ParentNodeStyle CssClass="ParentNode" /> <LeafNodeStyle CssClass="LeafNode" /> <HoverNodeStyle CssClass="HoverNode" /> <SelectedNodeStyle CssClass="SelectedNode" /> <NodeStyle CssClass="Node" /> <DataBindings> <asp:TreeNodeBinding DataMember="entity" TextField="name" ValueField="SubjectID" PopulateOnDemand="true" ToolTipField="name" ImageToolTipField="ResourceType" /> </DataBindings> </asp:TreeView> </div> </ContentTemplate> </asp:UpdatePanel> </form></body>
 
 
<entity SubjectID="1" ResourceType="Company" ImageURL="images/ResourceIcons/Company.gif" name="Company"><entity SubjectID="2" ResourceType="Application" ImageURL="images/ResourceIcons/Application.gif" name="Impact Analysis"><entity SubjectID="3" ResourceType="Scope" ImageURL="images/ResourceIcons/assembly.gif" name="Horizon"><entity SubjectID="4" ResourceType="Namespace" ImageURL="images/ResourceIcons/namespace.gif" name="Bip.Horizon.Holding"><entity SubjectID="5" ResourceType="ClassList" ImageURL="images/ResourceIcons/Folder.gif" name="Classes"><entity SubjectID="6" ResourceType="Class" ImageURL="images/ResourceIcons/Class.gif" name="Bip.Horizon.Holding.Holding" Modifier="Public" ClassType="Class"><entity SubjectID="7" ResourceType="MethodList" ImageURL="images/ResourceIcons/Folder.gif" name="Methods"><entity SubjectID="8" ResourceType="Method" ImageURL="images/ResourceIcons/Method.gif" name=" 'BIP.Horizon.Holding.Holding.GetProfileMarketCapAllocations" Modifier="Public"><entity SubjectID="9" ResourceType="Return Type" ImageURL="images/ResourceIcons/Class.gif" name="Return Type" DataType="System.Data.DataTable"></entity><entity SubjectID="10" ResourceType="Argument List" ImageURL="images/ResourceIcons/Folder.gif" name="Arguments"><entity SubjectID="11" ResourceType="Argument" ImageURL="images/ResourceIcons/Column.gif" name="dsRebalanceAdjustedHoldingsByAccount" DataType="BIP.Horizon.Holding.RebalanceAdjustedHoldingsByAccountDS" type="BIP.Horizon.Holding.RebalanceAdjustedHoldingsByAccountDS" Modifier="ByRef"></entity><entity Modifier="ByRef" SubjectID="12" ResourceType="Argument" ImageURL="images/ResourceIcons/Column.gif" name="dsProductMarketCapRange" DataType="BIP.Core.Product.ProductMarketCapRangeDS" type="BIP.Horizon.Holding.RebalanceAdjustedHoldingsByAccountDS"></entity><entity Modifier="ByRef" SubjectID="13" ResourceType="Argument" ImageURL="images/ResourceIcons/Column.gif" name="intMarketCapRangeID" DataType="int" type="int"></entity></entity><entity SubjectID="14" ResourceType="Call List" ImageURL="images/ResourceIcons/Folder.gif" name="Callers"><entity SubjectID="15" ResourceType="Method" ImageURL="images/ResourceIcons/Method.gif" name="BIP.Horizon.Web.UI.Account.aspx.cs"></entity></entity><entity SubjectID="16" ResourceType="Callee List" ImageURL="images/ResourceIcons/Folder.gif" name="Callees"><entity SubjectID="17" ResourceType="Method" ImageURL="images/ResourceIcons/Method.gif" name="BIP.Horizon.Product.GetMarketCapRanges"></entity></entity><entity SubjectID="18" ResourceType="Data Object List" ImageURL="images/ResourceIcons/Folder.gif" name="Data Objects"><entity SubjectID="19" ResourceType="DataObject" ImageURL="images/ResourceIcons/Database.gif" name="spbip.Horizon.Product.GetMarketCapRanges"></entity></entity></entity></entity></entity></entity></entity></entity></entity></entity>

 
 

The treeview control is not supported in the updatepanel by the docs. I hope this will be change in the future or we'll get a new real ajax treeview. I am using the treeview in updatepanel since the first ctps. I have some problems with it (for example with EnableClientScript="true"), but with some hacks it works for me.

The main problem for me that the treeview+updatpanel could be very slow, because the treeview needs enableviewstate="true" to works properly.Sad

First I world try to turn off any extra on the treeview especially this:

PopulateOnDemand="true" ->PopulateOnDemand="false"
I didn't try your code by I suppose that populating the nodes on the client side then expanding/collapsing/selecting a node could be easilystay out of the sync with the viewstate/server side.That was my problem with EnableClientScript="true".


AJAX breaks AdRotator control rendering

Hi,

Does anyone know how to resolve the issue I'm experiencing with AJAX breaking the AdRotator control?

My AdRotators reside in a master page and display fine until a AJAX UpdatePanel is introduced. Once an UpdatePanel is added the AdRotators start to render their HTML output at the very beginning of the page's HTML (before the

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
in my case).

Image without AJAX problem:http://x.yougodo.com/screenshot-good.jpg

Image with AJAX problem:http://x.yougodo.com/screenshot-bad.jpg

Any help would be greatly appreciated.

Cheers

I can't seem to find any other users with your issue. You may want to give this approach a try:http://www.seesharprun.net/2007/08/09/AnAdrotatorAlternative.aspx. Where is your AdRotator located on your MasterPage? I'm assuming you are adding your UpdatePanel inside the Master's ContentTemplate?

Perhaps you can post a small snippet of code that will replicate the issue?

-Damien


Hi Damien,

Thanks for your suggestion, much appreciated - I will take a look.

Was puzzled myself why no-one else seemed to have encountered the same problem?!?

The UpdatePanel is actually located in the *.aspx page rather than the *.master - I'll try and create a small example to re-create later as everything is too intertwined in my current project to post something useful.

P.S. The Google Ads in the screenshots are not in AdRotators, only the image ads you see.


How bizarre... I've not been able to recreate problem creating a simple AJAX / master page scenario?!?

Maybe it's down to some of my non-standard controls - all pages are inherited from my own Page class that adds a bunch of extra properties and methods useful for my project. The control triggering the AJAX callback is also my own roll-your-own page number selecting control.

Quite puzzled as both these own-code-rolled controls successfully use AJAX functionality on other pages. It's jut when the AdRotator is introduced that bizarre results occur. Quite puzzled!


That's interesting that you can't reproduce it. I think your assumption may be correct with your non-standard controls. Do you perhaps have an un-closed element or something? This could be causing some issues. You also may just want to make sure your AJAX environment is setup correctly, you can refer to these common problems/fixes:http://blogs.visoftinc.com/archive/2007/09/23/asp.net-ajax--updatepanel-not-working--common-problems.aspx.

Hope you find your problem!

-Damien


Hi Damien,

Cheers once again for your help - much appreciated. Doesn't seem to be any of the issues described in the link you gave though.

Very bizarre, the output would suggest that somehow the AdRotator is getting to render it's output before the *.master or *.aspx files do?!? No html at all is output to the locations where the AdRotator is placed, only at the top of the page before all other html. Very puzzling.

I've abandoned trying to find a solution for now, coding my own temporary random ad selector for now. The AdRotators were only ever going to be a temporary measure until a fully functioning ad management system is plugged in.

Gavin.

AJAX books

Hello,I'm totally new to AJAX.Can any body plz help me by providing any free e-books sites where I can find books on AJAX with reference to ASP.NET2.0 ??

Plz HELP....!!!!!!!!!!!!!!!

I have always used Amazon.com

You can search a book, check the user ratings, check total ratings and find the book you.

You can also check Barnes and Noble..

In my opinion, you dont a book to start with AJAX. There are plenty of web sites and plenty of videos to get you started.

http://www.asp.net/learn/

Once you get to know the basics, then you can start looking for a book.

Thats just my opinion.

Ajax beta2 -> RTM > JSON Serialization exception when calling a dataservice

Hi all, I must migrate an application from Ajax beta2 to RTM version and I experienced a serious problem.This application uses xml-script that calls some webservices (more specifically dataservices) to fill in objets. These calls throw json serialization exceptions, whatever the returned type.I then wanted to try with a "fresh" web project, I thus created a new project, and then created a small web service inherited from the dataservice class. I placed a typical example of a sample dataservice from internet into my dataservice. Then I used Fiddler to emulate the dataservice call from the script (ie doing a POST with loadmethod parameters etc…), and this simple code produces a serialization exception.The only information I found is herehttp://www.oreilly.com/catalog/atlas/update/version1.0-update.pdf (chapter 9). This chapter is about the same subject, and the author is experience the same trouble in the same circumstances. Christophe Below is the complete exception:

{"Message":"A circular reference was detected while serializing an object of type \u0027System.Reflection.Module\u0027.","StackTrace":" à System.Web.Script.Serialization.JavaScriptSerializer.SerializeValueInternal(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse)\r\n à System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse)\r\n à System.Web.Script.Serialization.JavaScriptSerializer.SerializeCustomObject(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse)\r\n à System.Web.Script.Serialization.JavaScriptSerializer.SerializeValueInternal(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse)\r\n à System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse)\r\n à System.Web.Script.Serialization.JavaScriptSerializer.SerializeCustomObject(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse)\r\n à System.Web.Script.Serialization.JavaScriptSerializer.SerializeValueInternal(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse)\r\n à System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse)\r\n à System.Web.Script.Serialization.JavaScriptSerializer.SerializeCustomObject(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse)\r\n à System.Web.Script.Serialization.JavaScriptSerializer.SerializeValueInternal(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse)\r\n à System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse)\r\n à System.Web.Script.Serialization.JavaScriptSerializer.SerializeCustomObject(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse)\r\n à System.Web.Script.Serialization.JavaScriptSerializer.SerializeValueInternal(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse)\r\n à System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse)\r\n à System.Web.Script.Serialization.JavaScriptSerializer.SerializeEnumerable(IEnumerable enumerable, StringBuilder sb, Int32 depth, Hashtable objectsInUse)\r\n à System.Web.Script.Serialization.JavaScriptSerializer.SerializeValueInternal(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse)\r\n à System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse)\r\n à System.Web.Script.Serialization.JavaScriptSerializer.SerializeCustomObject(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse)\r\n à System.Web.Script.Serialization.JavaScriptSerializer.SerializeValueInternal(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse)\r\n à System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse)\r\n à System.Web.Script.Services.RestHandler.InvokeMethod(HttpContext context, WebServiceMethodData methodData, IDictionary`2 rawParams)\r\n à System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData)","ExceptionType":"System.InvalidOperationException"}

The latest release does not support DataSet, DataTables or the Xml Script. You have to add the Preview to work with these objects.


Have you install framework 2.0?


I am using Microsoft.Web.Preview from the the "ASP.NET Futures May 2007" package (assembly version 1.1.61025.0).

I do not use complex objets like Dataset, Datatables,...

The sample code was picked up fromhttp://aspalliance.com/1302_Unveil_the_Data_Binding_Architecture_inside_Microsoft_ASPNET_Ajax_10__Part_2#Page2, but even a string does not serialize !

Note that the call stack shows an exception within System.Web.Script.Serialization, which is in Ajax Extensions, not in futures ...

Christophe.


No, we have no answer at this time.


Hi chrisrodri,

Has your problem been resolved yet ? Would you share your solution(resolved) or new findings?


Hi all,

I finally solved this issue. I have to add these threw following lines into the web.config (in jsonSerialization/converters section):

<addname="DataSetConverter"type="Microsoft.Web.Preview.Script.Serialization.Converters.DataSetConverter"/>
<addname="DataRowConverter"type="Microsoft.Web.Preview.Script.Serialization.Converters.DataRowConverter"/>
<addname="DataTableConverter"type="Microsoft.Web.Preview.Script.Serialization.Converters.DataTableConverter"/>

I do not understand why these lines are needed because i do not use any DataTable or DataRow, just generics Lists that are not dependant of these ones.... but it works !

Ajax Beta WebService with Sessions

Hello all, I need help here. I have a little app that requires getting the session within a webservice. I can't seem to access the session object. Here is my little webservice:

[WebMethod (EnableSession =true)]

[ScriptMethod]

publicstaticArrayList getProductsData()

{

return (ArrayList)Session["productsAL"];

}

Here is my call to the service:

[Microsoft.Web.Script.Services.ScriptMethod]

publicstaticint GetProductCount()

{

returnQuickShipService.getProductsCount();

}

I'm getting a compilation error. With this setup I get the error

Error 1 An object reference is required for the nonstatic field, method, or property 'System.Web.Services.WebService.Session.get' C:\Projects\TMR\POSOrdering\POSWWW\App_Code\Retail\QuickShipService.cs 31 27 C:\...\POSWWW\

It compiles if I remove the static keyword from the service, but then the webservice callreturnQuickShipService.getProductsCount(); is invalid.

Thanks f

or

your method is static, try

return (ArrayList)HttpContext.Current.Session["productsAL"];

Ajax Beta V.1: Strange behaviour with treeview inside the update panel (Again!)

I have a treevew control ( with dynamically created nodes) that was working great with July CTP. The control no longer works with beta any more:

1. Does not maintain the expanded state during ajax post back ( the nodes expand collapse unexpectly).

2. Strange behaviour if nodes are dynamically populated. This bug was present with the earlier atlas CTP's but was fixed with July CTP.

I have to use the same work around referenced in post:http://forums.asp.net/thread/1203662.aspx

------------------------

Similar issue, I didn’t want the tree to update always. The workaround that I am using is ,

Put tree in update panel (with conditional update).

- Add "TreeNodePopulate" event as a trigger in your update panel

- Turn off the client behaviour of tree expand ( putPopulateNodesFromClient = false ) and let atlas take care of it.

- Use Populate on demand = true.

-------------------------

Is any body else is having similar problem?

You might want to look at the CSS Adapters Beta 3 - they have what appears to be a 'ajaxified' treeview control that does not do full postbacks and retains viewstate on the client side... However, warning... if you do not need the other adaptewrs do not install them in your project as they override everything automatically and there is no method I know of to not allow the adapters controls it targets dynamically or explicitly...

The cool thing though is they provide all the source for it - so it may mean you can at least write an custom extender control for treeview that will integrate nicely with ajax...

Just a suggestion - and as usual unsure if I ever know what I am talking about...

ajax beta 2, treenode collapsing?

Greetings,

I downloaded and im using the ajax tookit 2. I have a problem with putting a treeview in a datagrid and getting it to work properly. I found other threads on this issue (mainly when navagating to other pages), but none of them seemed to address (or at least address and provide a solution for) the problem I have. Here is the issue.

I have a treeview with nodes that post back. On the post back, I simply collapse the node if its expanded and vice versa. It works good outside of an updatepanel, but when I put it inside an updatepanel, the expanded state does not save. Is there a simple solution? Is there someway I can call the javascript that the +/- control uses (so I dont have to expand/collapse in the code)?

Heres some code to show you my simple example

<%

@dotnet.itags.org.PageLanguage="C#"AutoEventWireup="true"CodeFile="Default.aspx.cs"Inherits="_Default" %>

<%

@dotnet.itags.org.RegisterAssembly="AjaxControlToolkit"Namespace="AjaxControlToolkit"TagPrefix="cc1" %>

<!

DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.1//EN""http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<

htmlxmlns="http://www.w3.org/1999/xhtml">

<

headrunat="server"><title>Untitled Page</title>

</

head>

<

body><formid="form1"runat="server"><asp:ScriptManagerID="ScriptManager1"runat="server"/><div> <asp:UpdatePanelID="UpdatePanel1"runat="server"><ContentTemplate> <br/><asp:TreeViewID="TreeView"runat="server"OnSelectedNodeChanged="select2"><Nodes><asp:TreeNodeText="New Node1"Value="New Node11"Expanded="False"><asp:TreeNodeText="New Node12"Value="New Node12"></asp:TreeNode></asp:TreeNode><asp:TreeNodeText="New Node2"Value="New Node2"Expanded="False"><asp:TreeNodeText="New Node21"Value="New Node21"><asp:TreeNodeText="New Node22"Value="New Node23"></asp:TreeNode></asp:TreeNode></asp:TreeNode><asp:TreeNodeText="New Node31"Value="New Node31"Expanded="False"><asp:TreeNodeText="New Node32"Value="New Node32"><asp:TreeNodeText="New Node33"Value="New Node33"></asp:TreeNode></asp:TreeNode></asp:TreeNode><asp:TreeNodeText="New Node4"Value="New Node4"Expanded="False"></asp:TreeNode><asp:TreeNodeText="New Node5"Value="New Node5"Expanded="False"></asp:TreeNode></Nodes></asp:TreeView><br/> </ContentTemplate></asp:UpdatePanel></div> <br/><br/></form>

</

body>

</

html>

-------------------

using

System;

using

System.Data;

using

System.Configuration;

using

System.Web;

using

System.Web.Security;

using

System.Web.UI;

using

System.Web.UI.WebControls;

using

System.Web.UI.WebControls.WebParts;

using

System.Web.UI.HtmlControls;

public

partialclass_Default : System.Web.UI.Page

{

protectedvoid Page_Load(object sender,EventArgs e)

{

}

protectedvoid select2(object sender,EventArgs e)

{

TreeNode selected = TreeView.SelectedNode;if ((bool)selected.Expanded)

{

selected.Collapse();

}

else

{

selected.Expand();

}

selected.Selected =

false;

}

}

While we work closely with the ASP.NET AJAX team when developing the Toolkit, they're the real experts on general ASP.NET AJAX issues. Your problem doesn't seem to be directly related to the Toolkit, so we'd appreciate if you considered posting to one of theother newsgroups such asAJAX Discussion and Suggestions. Your post will be more helpful to others looking for similar advice if it's in the right place. Thank you!

ajax beta 2, resizable textbox?

Hey,

Trying to adapt my app to beta 2..

And my resizable textboxes don't work anymore :/

Here is an extract of the code: (worked for atlas)

------------------------------------------------

<asp:PanelID="resizeActionPanel"runat="Server"Height="100%"Width="100%"BorderStyle="Outset"BorderWidth="1px">

<asp:TextBoxTextMode="multiline"ID="itm_action"CssClass="normal"Width="100%"Height="100%"Text=<%#Container.DataItem("item_action") %>runat="server"ReadOnly="<%#CheckEditRights() %>"></asp:TextBox></asp:Panel><ajaxToolkit:ResizableControlExtenderID="ResizableControlExtender5"runat="server"TargetControlID="resizeActionPanel"resizablecssclass="resizingText"HandleCssClass="handle2"HandleOffsetX="0"HandleOffsetY="10"MinimumHeight="57"MinimumWidth="299"MaximumWidth="299"MaximumHeight="300"onclientresizing="ResizeTextBox"/><scripttype="text/javascript">function ResizeTextBox(sender, eventargs)

{

var element = sender.control.element;

element.children[2].style.height = element.style.height;

returnfalse;

}

</script>

------------------------------------------------

> Does anyone know if getting a resizable textbox is still possible?

By adapting the code above? Or another way...?

Regards,

NNM

A quick search of the forum suggests this post is a favorite answer for this question:http://forums.asp.net/thread/1404868.aspx

Yeah, and I started that thread too, but that does not work with ajax 2 anymore.


What are the errors you are seeing? Could you post the new aspx file?

The code is in the first post!

Worked with atlas, doesn't work with ajax beta 2...


I'm having the same problem. I was trying to use your solution from the first post with beta 2 and I can't get it to work. Any ideas? Anyone??

The sample code in the first post here has script errors under the latest ASP.NET AJAX. I made the following changes to remove them:

var element = sender.get_element();
element.childNodes[3].style.height = element.style.height;


Thanks but i'm still getting the following error:

'DataItem' is not a member is not a member of 'System.Web.UI.Control'


My post should have addressed the original sample - maybe you want to post one, too?

found out that the multiline textbox in update panel does not render properly in firefox.

Anyone has a workaround?


i got it working..

heres the simple workaround.

<script type="text/javascript">
function ResizeTextBox(sender, eventargs)

{
var browserName=navigator.appName;
if (browserName=="Microsoft Internet Explorer")
{

var element = sender.get_element();
element.childNodes[2].style.height = element.style.height;

// element.children[2].style.width = element.style.width;

return false;

}
}

</script>

dont forget to keep the text height and width to 100%...

this will work in both firefox and IE

Cheers...

AJAX Beta 2 web.config

Is there any documentation describing the sections needed in the web.config file to implement asp.net ajax into a site? I have installed it and am using it happily but I want an explanation of each element that is in that web.config template and why it is required, what I dont know worries me!

Thanks!

This is an excellent question.

I am going to give an explaination off my head:

First off:DOCS.

<configSections>
<sectionGroup name="microsoft.web" type="Microsoft.Web.Configuration.MicrosoftWebSectionGroup, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<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>

^^ This just defines how the config sections are laid out in the following markup in the config file.

The important stuff we should concentrate about is the inner section webServices and the sections below that (the outer ones just defines the layout of the config kinda (dumb sections that does nothing but define themselves ))

--

jsonSerialization,profileService,authenticationService are all on the same level. These actually have usable elements you can configure.

You should read the docs on what the classes are (they are vague though) but web.config found in C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025

has an actual section + comments:

<microsoft.web>
<scripting>
<webServices>
<!-- Uncomment this line to customize maxJsonLength and add a custom converter -->
<!--
<jsonSerialization maxJsonLength="500">
<converters>
<add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/>
</converters>
</jsonSerialization>
-->
<!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. -->
<!--
<authenticationService enabled="true" requireSSL = "true|false"/>
--
<!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved
and modified in Atlas applications, you need to add each property name to the setProperties and
getProperties attributes. -->
<!--
<profileService enabled="true"
readAccessProperties="propertyname1,propertyname2"
writeAccessProperties="propertyname1,propertyname2" />
-->
</webServices>
</scripting>
</microsoft.web>

jsonSerialization section can have defined custom converters, if you have an object that you want to provice your own notation for, do it here.

I don't know too much about the other stuff, but it seems pretty straight forward...

--

Moving on:

<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>

^^ <controls> will map the prefix 'asp' to the AJAX controls (mainly updatepanel, scriptmanager, updateprogress etc) GLOBALLY across the whole site, so you don't have to provide it in the directive on each page ( This is VERY useful to use on your own controls, this is a true blessing!)

The <tagmapping> will replace the stock ASP.NET validator controls with the ASP.NET AJAX ones. This is to override the original stock validator controls to make them work properly.

--

<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>

First one replaces all requests (post, get (etc?)) to asmx files to the ScriptHandlerFactory. This factory is undocumented, but I can tell that it switches between 2 handler factories (it wraps them on a condition)

First one of them is RestHandlerFactory (undocumented), this will get chosen if it is a rest (if pathinfo starts with "/js").

If not, it will choose the stockWebServiceHandlerFactory class.

ScriptResource,axd axd is AJAX' own handler for processing script resources. This seems to be well documented (compared to other ajax stuffStick out tongue).

--

<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>


^^ This is the section for IIS 7.0 (or any web server that reads this section. maybe cassini?).

This will remove WebServiceHandlerFactory-ISAPI-2.0 and inject the script handlers / modules.

Some is documented, some is not. But this is probably to make the script stuff work, to use regular English. Big Smile

This is only from the top of my head. Some are facts, some are just my assumptions!

Anyway, hope it helps, and if it really is an answer to you,mark it as answer, thanks!


hello.

the final section will only be used by IIS 7 (and i do think that the web.config that comes with ajax beta 2 is not complete).

btw,?EmilChristopherMelar is there any contest with cool prizes or something like that? why are you asking for your answer to be marked at the end ofyour posts?
Because then you can see that a thread is really answered, so people can see that it doesn't need any more attention, duh.
hello.

well, didn't really know that there are people on this forum trying to find threads that need attention...

It's not about that. It's about aknowledging the answer so I don't have to follow it up anymore.

It is common sense and usage of news / forums to give a response on a successful / unsuccessful answer.

And what's the point of answering if it's not read / acknowledged? What would the motivation for helping be if your answer is blatantly ignored?

Ajax beta 2 is not working with iis 6

i downloaded the ajax beta 2 from ajax.asp.net and install it in the production server which has iis 6, and i publish the site which is running well in the development server, ajax is not working any more, with any pages action they page refresh itself, i dont know what's is going on!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

OK!Have you deployment it?
Can you actually respond with actual errors it would help US help you..

Hi,

As my knowledge it wills works without any errors,

Please go through your code, you might be did mistakes in the code.

Or can you send the code then only forum can help you.

Maximum problem with your code only..

Pradeep Kumar Bura


the pages dosn't display any error message, the situation is that the page has update panel , so when user click on a search button it should display the result inside the update panel without refreshing the page, and thiss happen in the development server, but on the production page the same page server when user click on the search button, the pages is refreshed :(


Hi,

Have you checked event log for errors?

Pradeep Kumar Bura


Hi. I had a similar problem. After Installation on productive server, the sites were'nt executable because the webserver didn't found one the assemblies which will be installed while the extension installation (Microsoft.Web.Extension and Microsoft.Web.Extension.Design).

I installed and registered the assemblies whith gacutil and the aplication was running again.


I've deployed AJAX Beta 2 to four servers running IIS6. On two of the four I ran into the same issue that Michael63 describes. For me Microsoft.Web.Extension.Design was not added to the GAC. You can either register it in the GAC or you can copy it to your site's bin directory. I did the GAC way on one server and copied it into the bin folder on another - both work fine. The other thing you may want to check is that a new entry in the web.config is required. Check out the readme included with the installations for instructions.
Your site has to be running in full trust mode to be able to run the dlls in the bin folder.

i did that, and i checked that the assemply is added to the GAC , but still the site working very well in dvelopment server, but on production server, it's not the only differnce is that the development server has atlas component before but i uninstalled it before install ajax, but it was the only differnce


http://forums.asp.net/thread/1485037.aspx
follow this threadhttp://forums.asp.net/thread/1485037.aspx

Ajax Beta 2 in medium trust...... is it possible ?

Hi all !

I'm french so excuse me by advance for my english...

I have created a photo gallery with ajax beta 2 and then, i've the medium trust security exception problem like à lot of people.

My webhoster (aspnix.com) use the medium trust security level like others and i don't want how to do... I made the time test at this adress but doesn't work...

http://www.ktchup.info/Default.aspx


Anyone has an idea ?

Thanks !

hello.

you acn only do that if the extensions dll is on the GAC. if you're putting in the bin, i think that your web app has to have full trust.

AJAX Beta 2 apps on shared hosting

Hi guys,

I'm interested in developing some ASP.Net AJAX Beta 2 apps to be hosted on a shared host that supports .Net 2.0. However, since the library for AJAX Beta 2 is installed in the GAC, does this mean that the server I host my apps on have to install it as well? Can I still use the traditional /bin alternative?

Cheers and thanks in advance for any feedback.


Kind regards,

Ethan

You can deploy Ajax website and traditional website in a shared host.They can work fine and don't affect each other.If you want deploy a Ajax enabled website in a server,you need to install .net framework and Ajax framework first.Otherwise you can not run Ajax enabled website.
Try to take a look at this reading about Ajax from here - http://ajax.asp.net/docs/Default.aspx
Wish this can help you.

AJAX Beta 2 and Toolkit 61102 released but missing CalendarExtender, TabPanel and TabConta

Any idea if these are likely to be put back in as I finally got them working?

Calendar and Tabs currently only exist in the Development branch as they are not yet stable for release. I believe that the beta2 changes in the Release branch will be merged back into the Development branch soon.

I have 55 pages using Tabs now and about 40 other pages that need the fixes in the Beta2 release.

This now makes it difficult to decide whether to temporarily code out all the Tab panels somehow and replace them with something else or wait until Tabs are back in the Toolkit.

Any idea when the Tabs will be back in? Guess?

Help...please...Crying


I'm looking at migrating Tabs right now, but keep in mind tabs is currently still in development and is not fully stable enough for the release branch. Its implementation may still change slightly before it hits the release.
Thanks. Much appreciated.

AJAX Beta 2 and Custom Controls

I just finished installing Beta 2 and now none of my user controls validate.

For example:

<%@dotnet.itags.org.RegisterSrc="PageTop_Icons.ascx"TagName="Icons"TagPrefix="Toolbar" %>

<Toolbar

:IconsID="m_Icons"runat="server"/>

...immediately generates this error:

Error 103 Unknown server tag 'Toolbar:PageTop_Icons'.

The control in question is just a bunch of hyperlinks -- nothing fancy.

I've tried deleting the registration and the control and dragging & dropping a new one. It's automatically assigned the uc1 TagPrefix, the control is visible in the Design window, but still generates the error.

This is happening on every page that uses a User Control. Everything worked fine before I upgraded to Beta 2. Does anyone know what's going on?

That's an interesting one. I can't say based on what you have hear, but if it helps I can tell you that it's not a general problem; I have user controls working just fine w/ Beta 2.

Offhand, I'd probably look at the ascx files and make sure they're not referencing anything in the old Atlas stuff that might now be causing them a compilation error. Failing that, the web.config would be the next place I looked, to make sure all the changes were done correctly.


hello.

any chances of building a simpler control + page and post it here so that we can reproduce your problem?


I wish I had that kind of time. We're trying to get this .net conversion released asap, so the Ajax stuff will have to wait.


Well, like I said, the control in question is nothing more than a set of hyperlinks. Per your suggestion, I spent a good hour rechecking the webconfig and didn't see anything out of place. I tried commenting out some of the new Ajax entries (like the tag mapping) and that just made things even worse. I've since rolled back to working versions. We'll revisit Ajax later on after our initial release.

AJAX Beta 2 - Could not load type Microsoft.Web.UI.UpdateProgress from assembly Microsoft.

Hi...

I'm experiencing a problem with the new AJAX Beta 2. When I try and put the UpdateProgess on a simple page, I get the below

Could not load type 'Microsoft.Web.UI.UpdateProgress' from assembly 'Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.TypeLoadException: Could not load type 'Microsoft.Web.UI.UpdateProgress' from assembly 'Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

Source Error:

Line 13: </head>
Line 14: <body>
Line 15: <form id="form1" runat="server">
Line 16: <div>
Line 17:


Source File:C:\Inetpub\wwwroot\Auction\TEST.aspx Line:15

Stack Trace:

[TypeLoadException: Could not load type 'Microsoft.Web.UI.UpdateProgress' from assembly 'Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.]
ASP.test_aspx.__BuildControlform1() in C:\Inetpub\wwwroot\Auction\TEST.aspx:15
ASP.test_aspx.__BuildControlTree(test_aspx __ctrl) in C:\Inetpub\wwwroot\Auction\TEST.aspx:1
ASP.test_aspx.FrameworkInitialize() in C:\Inetpub\wwwroot\Auction\TEST.aspx.vb:912307
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +40
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.test_aspx.ProcessRequest(HttpContext context) +29
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

For the below code

<%@dotnet.itags.org. Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %
<%@dotnet.itags.org. Register Assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="Microsoft.Web.UI" TagPrefix="asp" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager id="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdateProgress id="UpdateProgress1" runat="server">
<progresstemplate>
<IMG src="Template/loading.gif" /> Working ... <asp:Image id="LoadingImage" runat="server" ImageUrl="Template/loading.gif"></asp:Image>
</progresstemplate>
</asp:UpdateProgress>
<asp:UpdatePanel id="UpdatePanel1" runat="server">
</asp:UpdatePanel>
</div
</form>
</body>
</html>
Please can you help, this is driving me nuts...Wink

Thanks,
Clint

Clint,

Did you try to add the assemby reference to the web.config file? You don't need to register it in the page, and you don't need it in the BIN folder.
Also, it seems that your copy of the assembly is still Beta 1, have you uninstalled Beta 1 and, then, reinstalled Beta 2? That will install the correct assembly in the GAC.

Cheers,

Juan


Hi Juan, thanks for your help.

I've uninstalled the Beta 2 and reinstalled a fresh copy from the internet, and I've also deleted the files in the BIN directory and the reference in the .aspx page.
In addition, I've replaced my web.config with the one that is created from a new web project including AJAX (I've included it below) But I am still getting this error.

Server Error in '/Auction' Application.

Could not load type 'Microsoft.Web.UI.UpdateProgress' from assembly 'Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.TypeLoadException: Could not load type 'Microsoft.Web.UI.UpdateProgress' from assembly 'Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

Source Error:

Line 8: </head>
Line 9: <body>
Line 10: <form id="form1" runat="server">
Line 11: <div>
Line 12: <asp:ScriptManager id="ScriptManager1" runat="server">


Source File:C:\Inetpub\wwwroot\Auction\Default2.aspx Line:10

Stack Trace:

[TypeLoadException: Could not load type 'Microsoft.Web.UI.UpdateProgress' from assembly 'Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.]
ASP.default2_aspx.__BuildControlform1() in C:\Inetpub\wwwroot\Auction\Default2.aspx:10
ASP.default2_aspx.__BuildControlTree(default2_aspx __ctrl) in C:\Inetpub\wwwroot\Auction\Default2.aspx:1
ASP.default2_aspx.FrameworkInitialize() in C:\Inetpub\wwwroot\Auction\Default2.aspx.vb:912307
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +40
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.default2_aspx.ProcessRequest(HttpContext context) +29
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64


Here is my code...

<%@. Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager id="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdateProgress id="UpdateProgress1" runat="server">
<progresstemplate>
<IMG src="Template/loading.gif" /> Working ... <asp:Image id="LoadingImage" runat="server" ImageUrl="Template/loading.gif"></asp:Image>
</progresstemplate>
</asp:UpdateProgress>
<asp:UpdatePanel id="UpdatePanel1" runat="server">
</asp:UpdatePanel>
</div
</form>
</body>
</html>

And here is my new web.config

<configuration>
<configSections>
<sectionGroup name="microsoft.web" type="Microsoft.Web.Configuration.MicrosoftWebSectionGroup, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<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>
<connectionStrings>
<remove name="AuctionConnectionString"/>
<add name="AuctionConnectionString" connectionString="Data Source=ALEPPO;Initial Catalog=Auction;Persist Security Info=True;User ID=sa;Password=" providerName="System.Data.SqlClient"/>
<add name="SMSINTv2ConnectionString" connectionString="Data Source=ALEPPO;Initial Catalog=SMSINTv2;Persist Security Info=True;User ID=sa;Password=" providerName="System.Data.SqlClient"/>
</connectionStrings>
<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"/>
</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>
<microsoft.web>
<scripting>
<webServices>
<!-- Uncomment this line to customize maxJsonLength and add a custom converter -->
<!--
<jsonSerialization maxJsonLength="500">
<converters>
<add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/>
</converters>
</jsonSerialization>
-->
<!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. -->
<!--
<authenticationService enabled="true" requireSSL = "true|false"/>
-->
<!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved
and modified in Atlas applications, you need to add each property name to the setProperties and
getProperties attributes. -->
<!--
<profileService enabled="true"
readAccessProperties="propertyname1,propertyname2"
writeAccessProperties="propertyname1,propertyname2" />
--></webServices>
</scripting>
</microsoft.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>

Hi...

I've managed to fix it thanks ...

I tried creating a new project and copying the files across to it, and it worked!? Very Strange!?

Any Idea why this would be, even after I copied the entire now working project files back to the original folder that wasn't working, it still did not work??

Thanks for your help,
Clint


I don't know if this helps any or not, but I was originally getting the same error and this is how i resolved it:

*I should first mention I had Beta1 and the ValueAdd CTP implemented prior to Beta2. (I had implemented them simply by copying the Microsoft.Web.Extensions.dll and Microsoft.Web.Preview.dll to the app's Bin folder):

To implement Beta2 I followed the doc instructions (web.config modification), and deleted the 2 dll's from the Bin folder (and removed the web.config references to the ValueAdd piece).

That's when I started getting the same error you were.

UNTIL I restarted IIS. I'm guessing it (or ASP.NET) had the old dll's cached somewhere since I originally had them in the bin folder??

Hope it helps-

Kenneth


The assemblies are in the GAC, cached, etc. Restarting IIS as suggested below worked for me too.

AJAX Beta 1-Shame

I’ve been pushing Atlas at work to my boss, and even wrote portal just to show how cool it was. Well , I'm not sure what to do after this beta 1 release. It seems MS has changed rules during the game. PageMethods don't work. Controlstoolkit is... I even don't what to look into... I don't know. I should have been smarter and kept quiet about Atlas.

Shame on you Atlas team.

It's 4:00 AM and I’m going to bed. Tomorrow I’ll say sorry to my boss and move my app to SAP.

What a waste of time.

-A

Shame on you Atlas team? Are you familiar with acronyms? Are you familiar with Microsoft's CTP acronym? It stands for Community Technology Preview. You were implementing a CTP techology when you were implementing Atlas into your system. The risk you take with that is having to update your application with the changes once the technology has been improved (which it definitely has been in this case). Shame on you for pointing fingers at Microsoft's Atlas team when really you're the ONLY one to blame. Next time take five minutes of your precious time (I don't care if it is 4:00am) and search the forums for an answer to your problem because there was one posted before you submitted this infuriating trash.

- Chris


I’m all familiar with these words.

Also I familiar with words as: compatibility, and consistency, and before I wrote my post, I read other posts on this website and other blogs. Not one post offered solution toPageMethods problem, and if you search this forum,you’ll find many angry developers and not one will tell they liked what MS done with this beta.

If this framework was made available to us, with all this videos and tutorials (advertisement), at least MS should keep it consistent.


Yea, one more thing .

I’ve been pro (support) MS since day one.

I like almost every product they released, and I’ve worked with beta products too, but this been so far biggest disappointment for me.

For the rest of you, be very careful when you use this product in your projects at work. You might loose your job.

-A


I am as dissapointed as the rest with the changes from Atlas to the new Beta...

Why? I had to change my perception of thinking and the way I was providing a solution...

Guess what: When you deal with Beta - pre-release - you expect that and understand there are a team of developers that are working to provide 'solutions'. Granted they may not be what 'we expect' from what we 'are accustomed to' but BETA, Alpha, pre-release etc.. being an early adopter means that there is more to the community than just youself. One aspect I sympathise with the Asp.Net Team is that they deall with thousands of us - all wanting one thing or the other all for different reasons. Those of us trying to embrace new technology have to realize its BETA, ALPHA, CARLIE, ZEBRA or whatever.. until its a RTM - then what have you may...

The one thing about Scott Guthrie's Team is they ARE on the forefront. They didn't wait until MagicAjax, or other suddenly had marketshare... instead they have been almost rogue like in the Microsft enviroment in bucking the trends and reacting to developers needs... You can *** to no end about how pre betas change what the current Beta's entail-- however you would be hardpressed to excuse them as not trying. It is very hard on the business side to provide the best in features withou sacrificing other customers.. it a given... but in actual true fashion - they provide documentation.. examples.. blog posts from real experts... and do actually respond to and devlope against customer feedback. We may not see it al the time and most of us do not have the ability to pop up a laptop in each of their office to demonstrate a problem... Look at the bigger pictiure... constructive critism is great... tell al of us (the devs using the techonology and those at MSFT programming it) what your issues are.. but slamming for the mere aspect that code from July qand the Beta release breaks... gimme me a break... Its great to have opinions but unless you desire to part of the solution - we all are part of the

problem... I find great resentment in your post merely becuase its so - uggh single minded...You took the same risks as we all did and each of us has the ability to influence the outcome in a POSITIVE MANNER...Try to get this level of product support for something BETA from IBM , Oracle or the likes...

They listen - and due to volume may not be able to respond to all of us (and believe me I which they would to my concerns)but none the less this is a 'community forum'...

Lets just say we ecided to take whatever pill we decided.. but until somthing is actually released as 'productiion' ready... its all BETA and the only thing we can do is positively outline what our needs and concerns are...


hello

kdpo:

I’ve been pushing Atlas at work to my boss, and even wrote portal just to show how cool it was. Well , I'm not sure what to do after this beta 1 release. It seems MS has changed rules during the game. PageMethods don't work. Controlstoolkit is... I even don't what to look into... I don't know. I should have been smarter and kept quiet about Atlas.

Shame on you Atlas team.

It's 4:00 AM and I’m going to bed. Tomorrow I’ll say sorry to my boss and move my app to SAP.

What a waste of time.

-A

yes, it's true: there are no more page methods, at least instance ones. I've already spend half a day trying to explain why we are better off without them, but it still seems like there are lots of guys using it. I must say that i never thought that so many people were using instance page methods...and, as I already saidhere, I don't really think there's any justification for using them since the penalty you pay is to high and I still haven't found any good justification for using those methods.

make no mistake about it: in the previous i'm saying that instance page methods should be back because it seems like there are lots of guys which depend on it. To me, this dependency still means lack of knowlegder in javascript or will to write some javascript code and use a web method or a static method to do the same work.

I mean, most guys just forget that AJAX means writing javascript and went straight away to page methods without even thinking in the consequences of those actions...


The real "shames" of the new pagemethod areSmile:

- Lack of support of the old method, both would be nice. (However the new one is better for me...)

- The annoying codebehind bug.

Check the descriptionhere, it's missing from the whitepaper.


hello.

i know that...and as i said, maybe there's space for both. in my opinion, no serious ajax page should use the old instance page methods...


Have to say I agree with others on this thread who are making the point that this isPre-Release software.

By all means look at it to get afeelfor where Microsoftmight be going with AJAX but I certainly wouldn't stake my job on it until it's gone RTM.

I for one think that the community involvement in this project is very valuable and worthwhile and will result in a much better end product than if MS had worked on this behind closed doors and only released it when it went RTM.


Migrating my app from July CTP to the new beta is requiring a lot of work, I assume it since it is prerelease software. But in my opinion, the really bad thing is: the beta has more bugs than the July CTP. I expected much more quality from this beta. I wonder why the ajax team guys have named it beta, I think they should just called it CTP.


Betaused to mean that a product was not to be used in production and was only being tested. Nowadays the rules have changed as Betas are made public and are in production. For example, Gmail is still marked as Beta but everyone uses it and it works pretty well. There are many examples of beta products being in production. The effect of this, unfortunately, is that the term beta has lost its meaning.

Because MSFT encourages developers to adopt pre-release products - it gives them some responsibility to make the products somewhat stable. My frustration is not the changes in the product but the bugs. Its not really usable.


Jesús:

Migrating my app from July CTP to the new beta is requiring a lot of work, I assume it since it is prerelease software. But in my opinion, the really bad thing is: the beta has more bugs than the July CTP. I expected much more quality from this beta. I wonder why the ajax team guys have named it beta, I think they should just called it CTP.

are you sure about this? i think this is not correct, specially if you concentrate on the core bits...

i think the main problem people are facing is that this beta is a complete new product which reuses several ideas of the ctp. so, it's as if we had to learn everything from the begining again. however, it's not fair to say that this release is worst that the previous one.


rsalit:


Because MSFT encourages developers to adopt pre-release products - it gives them some responsibility to make the products somewhat stable. My frustration is not the changes in the product but the bugs. Its not really usable.

hello.

i'm sure there are bugs, but it would help us all if we got a list (lke the one garbin developed) where everyone could put the bugs. btw, i've already seen 2 posts saying that this release has more bugs, but i see no one giving info on thebugs and on how to reproduce them.


[quote user="Luis Abreu] i'm sure there are bugs, but it would help us all if we got a list (lke the one garbin developed) where everyone could put the bugs. btw, i've already seen 2 posts saying that this release has more bugs, but i see no one giving info on thebugs and on how to reproduce them.
[/quote user="Luid Abreu]

bug description, repro, wokaround, and fix:

http://forums.asp.net/thread/1437484.aspx


[quote="Luis Abreu"] but i see no one giving info on thebugs and on how to reproduce them. [/quote="Luis Abreu"]

Bug description, repro and workaround:

http://forums.asp.net/thread/1440876.aspx