<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>ASP.NET AJAX Networking and Web Services</title><link>http://forums.asp.net/1009.aspx</link><description>Discuss your issues with the client and server interaction in AJAX using web services and other transports used by AJAX</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Binding dataView to webservice call fails.</title><link>http://forums.asp.net/thread/3526315.aspx</link><pubDate>Sun, 22 Nov 2009 14:01:38 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3526315</guid><dc:creator>Nemesis116</dc:creator><author>Nemesis116</author><slash:comments>2</slash:comments><comments>http://forums.asp.net/thread/3526315.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1009&amp;PostID=3526315</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;&lt;p&gt;I&amp;#39;m trying to get something really easy to work.&lt;/p&gt;&lt;p&gt;I hope someone can help. I really don&amp;#39;t see it :)&lt;/p&gt;&lt;p&gt;WebService:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;pre name="code" class="c-sharp"&gt;    [WebService(Namespace = &amp;quot;http://tempuri.org/&amp;quot;)]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)] 
    [System.Web.Script.Services.ScriptService]
    public class BucketList : System.Web.Services.WebService {

        [WebMethod]
        public List&amp;lt;Member&amp;gt; GetMembers() {
           List&amp;lt;Member&amp;gt; members = new List&amp;lt;Member&amp;gt;(){
               new Member{FirstName = &amp;quot;Jef&amp;quot;, LastName = &amp;quot;Claes&amp;quot;},
               new Member{FirstName = &amp;quot;Kristien&amp;quot;, LastName = &amp;quot;Behets&amp;quot;}
           };

           return members;
        }
    }&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;Client:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;pre name="code" class="xhtml"&gt;&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;
&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot; &amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;title&amp;gt;Movies&amp;lt;/title&amp;gt; 
 
  &amp;lt;script src=&amp;quot;Scripts/Start.js&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt; 

      Sys.require([Sys.components.dataView, Sys.components.dataContext], function () {         
          Sys.create.dataView(&amp;quot;#membersView&amp;quot;,
            {
                dataProvider: &amp;quot;http://localhost:2892/BucketList.asmx&amp;quot;,
                fetchOperation: &amp;quot;GetMembers&amp;quot;, 
                autoFetch: true
            }
        );

      });
 
  &amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
 
  &amp;lt;h1&amp;gt;Bucketlist&amp;lt;/h1&amp;gt;
 
  &amp;lt;ul id=&amp;quot;membersView&amp;quot;&amp;gt;
    &amp;lt;li&amp;gt;{{FirstName}} - {{LastName}}&amp;lt;/li&amp;gt;
  &amp;lt;/ul&amp;gt;
 
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description></item><item><title>Asp.Net WebService Jquery Progress Indicator</title><link>http://forums.asp.net/thread/3525197.aspx</link><pubDate>Sat, 21 Nov 2009 06:26:03 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3525197</guid><dc:creator>suryagaadu</dc:creator><author>suryagaadu</author><slash:comments>1</slash:comments><comments>http://forums.asp.net/thread/3525197.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1009&amp;PostID=3525197</wfw:commentRss><description>&lt;p&gt;Hai all,&lt;/p&gt;&lt;p&gt;I will explain it in Simple&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I have a Default Page with a button, upon clicking invokes a Web Service through jquery.ajax which runs a background process(like for 60 secs).&lt;/p&gt;&lt;p&gt;I want to show the real process of the Background Process on the Default Page.&lt;/p&gt;&lt;p&gt;I have created a handler which reads process status from WebService to Update the Default page.&lt;/p&gt;&lt;p&gt;I have made another jquery.ajax call to the handler to retrieve the current status.&lt;/p&gt;&lt;p&gt;But the Problem is the second ajax call returns values only after the First one completes.&lt;/p&gt;&lt;p&gt;Can you please guide me to show the status with out waiting for the background process to complete.&lt;/p&gt;&lt;p&gt;Thanks&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;img style="border:medium none;position:absolute;z-index:2147483647;opacity:0.6;display:none;" id="myFxSearchImg" height="24" width="24" alt="" /&gt;&lt;/p&gt;</description></item><item><title>JSON Deserialization balking on this json string</title><link>http://forums.asp.net/thread/3524622.aspx</link><pubDate>Fri, 20 Nov 2009 19:10:40 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3524622</guid><dc:creator>mikeclagett</dc:creator><author>mikeclagett</author><slash:comments>2</slash:comments><comments>http://forums.asp.net/thread/3524622.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1009&amp;PostID=3524622</wfw:commentRss><description>&lt;p&gt;Hi --&lt;/p&gt;
&lt;p&gt;I&amp;#39;m wondering if anyone has any insight on the following JSon string that is causing JSon deserialization to return an incompletely hydrated object.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the string:&lt;/p&gt;
&lt;p&gt;{&amp;quot;ResponseID&amp;quot;:&amp;quot;WPFTestJson client&amp;quot;,&amp;quot;Status&amp;quot;:{&amp;quot;Address&amp;quot;:&amp;quot;&lt;a href="mailto:mclagett@jmsonline.com%22,%22AttemptDetails%22:%22%22,%22Status%22:0"&gt;mclagett@jmsonline.com&amp;quot;,&amp;quot;AttemptDetails&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;Status&amp;quot;:0&lt;/a&gt;}}&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Here&amp;#39;s the types I am attempting to deserialize into:&lt;/p&gt;&lt;pre class="c-sharp" name="code"&gt;&lt;pre class="c-sharp" name="code"&gt;    [DataContract]
    public enum EmailAttemptStatus
    {
        EmailAttempt_Succeeded,
        EmailAttempt_Failed
    }
    
&lt;/pre&gt;&lt;br /&gt;    [DataContract]
    public class EmailRequestStatus
    {
        [DataMember]
        public string Address { get; set; }

        [DataMember]
        public EmailAttemptStatus Status { get; set; } 

        [DataMember]
        public string AttemptDetails { get; set; }
    }

    [DataContract]
    public class SendEmailResponse
    {
        [DataMember]
        public EmailRequestStatus RequestStatus { get; set; }

        [DataMember]
        public string ResponseID { get; set; }
    }
   
&lt;/pre&gt;
&lt;p&gt;Notice that the&amp;nbsp;SendEmailResponse structure&amp;nbsp;contains&amp;nbsp;an EmailRequestStatus, which itself contains an EmailAttemptStatus.&amp;nbsp; So far I have tried deserializing this using the&amp;nbsp;HttpContent.ReadAsJsonDataContract&amp;lt;SendEmailResponse&amp;gt; method, the DataContractJsonSerializer.ReadObject method and the JavaScriptSerializer.Deserialize&amp;lt;SendEmailResponse&amp;gt; method.&amp;nbsp; They all return a wellformed SendEmailResponse object, but with the RequestStatus field set to Null.&amp;nbsp;&amp;nbsp; But the Json string I pasted in above is what gets returned from HttpContent.ReadAsString(), so I know it&amp;#39;s getting returned to the client intact.&lt;/p&gt;
&lt;p&gt;The odd thing is that when I do the List&amp;lt;SendEmailResponse&amp;gt; version of this and deserialize the returned Json into the following structure it works like a charm:&lt;/p&gt;&lt;pre class="c-sharp" name="code"&gt;    [DataContract]
    public class SendEmailListResponse
    {
        [DataMember]
        public List&amp;lt;EmailRequestStatus&amp;gt; RequestStatuses { get; set; }

        [DataMember]
        public string ResponseID { get; set; }
    }
    
&lt;/pre&gt;
&lt;p&gt;Help!&amp;nbsp; I&amp;#39;m so close to being able to use this technology I can taste it (and about five days away from my project deadline).&amp;nbsp; But this one baffles me.&amp;nbsp; Any insights?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;Mike&amp;nbsp;&lt;/p&gt;</description></item><item><title>Passing a javascript object to a webservice</title><link>http://forums.asp.net/thread/3524727.aspx</link><pubDate>Fri, 20 Nov 2009 20:16:10 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3524727</guid><dc:creator>robrichard</dc:creator><author>robrichard</author><slash:comments>1</slash:comments><comments>http://forums.asp.net/thread/3524727.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1009&amp;PostID=3524727</wfw:commentRss><description>&lt;p&gt;This seemed easier than it has turned out...&lt;/p&gt;
&lt;p&gt;I have a javascript object that I assign values to and want to pass that object to a C# webservice.&amp;nbsp; What is the proper definition for the webservice in my &amp;quot;wsOpportunityService.asmx.cs&amp;quot; file&amp;nbsp;so that is can accept the object and get the properties?&amp;nbsp; The&amp;nbsp;javascript code is included:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="xhtml" name="code"&gt;        var opportunity =
            {
                OpportunityID: null,
                CustomerName: null,
                CurrencyID: null,
                PotentialValue: null,
                ExpectedCloseMonth: null,
                ExpectedCloseYear: null,
                OpportunityTypeID: null,
                OpportunityProbabilityID: null,
                ActionNote: null,

                create: function() {
                    var obj = new Object();

                    obj.OpportunityID = &amp;quot;&amp;quot;;
                    obj.CustomerName = &amp;quot;&amp;quot;;
                    obj.CurrencyID = &amp;quot;&amp;quot;;
                    obj.PotentialValue = &amp;quot;&amp;quot;;
                    obj.ExpectedCloseMonth = &amp;quot;&amp;quot;;
                    obj.ExpectedCloseYear = &amp;quot;&amp;quot;;
                    obj.OpportunityTypeID = &amp;quot;&amp;quot;;
                    obj.OpportunityProbabilityID = &amp;quot;&amp;quot;;
                    obj.ActionNote = &amp;quot;&amp;quot;;

                    return obj;&lt;/pre&gt;&lt;pre class="xhtml" name="code"&gt;                    }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;/pre&gt;&lt;pre class="xhtml" name="code"&gt;&lt;pre class="c-sharp" name="code"&gt;        function SaveOpportunity() {
            var objOpportunity = opportunity.create();
            objOpportunity.OpportunityID = &amp;#39;1&amp;#39;;

            objOpportunity.CustomerName = &amp;#39;Something&amp;#39;;
            objOpportunity.CurrencyID = &amp;#39;1&amp;#39;
            objOpportunity.PotentialValue = &amp;#39;100000&amp;#39;;
            objOpportunity.OpportunityStageID = &amp;#39;1&amp;#39;;
            objOpportunity.ExpectedCloseMonth = &amp;#39;1&amp;#39;;
            objOpportunity.ExpectedCloseYear = &amp;#39;2010&amp;#39;;
            objOpportunity.OpportunityTypeID = &amp;#39;1&amp;#39;;
            objOpportunity.OpportunityProbabilityID = &amp;#39;5&amp;#39;;
            objOpportunity.ActionNote = &amp;#39;Something here&amp;#39;;

            wsOpportunityService.SaveOpportunity(objOpportunity, OnSaveOpportunityComplete, OnSaveOpportunityError, OnSaveOpportunityTimeOut);

        }

        function OnSaveOpportunityComplete(args) {
        }

        function OnSaveOpportunityTimeOut(args) {
            alert(args._message);
        }
        function OnSaveOpportunityError(args) {
            alert(args._message);
        }
&lt;/pre&gt;&lt;/pre&gt;&lt;pre class="xhtml" name="code"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="xhtml" name="code"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>extenders using webservice fails</title><link>http://forums.asp.net/thread/3523239.aspx</link><pubDate>Fri, 20 Nov 2009 05:48:03 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3523239</guid><dc:creator>vijji</dc:creator><author>vijji</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3523239.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1009&amp;PostID=3523239</wfw:commentRss><description>&lt;p&gt;my ajax extenders fails while using webservices but runs correctly with the auto webmethod(inside the .cs file).&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;i juss followed the help&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a title="extender link" href="http://forums.asp.net/p/1482353/3470762.aspx"&gt;http://forums.asp.net/p/1482353/3470762.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;i did mentioned the service&amp;nbsp; path inside the service manager,still failed to perform.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Autocomplete using webservice</title><link>http://forums.asp.net/thread/3519700.aspx</link><pubDate>Wed, 18 Nov 2009 12:52:54 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3519700</guid><dc:creator>MrDean</dc:creator><author>MrDean</author><slash:comments>2</slash:comments><comments>http://forums.asp.net/thread/3519700.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1009&amp;PostID=3519700</wfw:commentRss><description>&lt;p&gt;Hello all - as per my other posts,&amp;nbsp;excuse my ignorance, I am&amp;nbsp;new to this and finding myself quite&amp;nbsp;out of my depth at the moment!&lt;/p&gt;
&lt;p&gt;Ok, I have set up a text box with an auto complete extender attached that is populated using a web service, et voila:&lt;/p&gt;&lt;pre class="c-sharp" name="code"&gt;&amp;lt;asp:ScriptManager ID=&amp;quot;ScriptManager1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;
        &amp;lt;Services&amp;gt;
        &amp;lt;asp:ServiceReference InlineScript=&amp;quot;false&amp;quot; Path=&amp;quot;~/GetProd.asmx&amp;quot; /&amp;gt;
        &amp;lt;/Services&amp;gt;
        &amp;lt;/asp:ScriptManager&amp;gt;
        
        
        &amp;lt;asp:TextBox ID=&amp;quot;txtProDesSearch&amp;quot; AutoComplete=&amp;quot;off&amp;quot; Autocompletetype=&amp;quot;Search&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt;
         
         
        &amp;lt;cc1:AutoCompleteExtender ID=&amp;quot;txtProDesSearch_AutoCompleteExtender&amp;quot; 
            runat=&amp;quot;server&amp;quot; 
            DelimiterCharacters=&amp;quot;&amp;quot; 
            TargetControlID=&amp;quot;txtProDesSearch&amp;quot;
            Enabled=&amp;quot;True&amp;quot; 
            ServiceMethod=&amp;quot;GetProdDesSearch&amp;quot; 
            ServicePath=&amp;quot;~/GetProd.asmx&amp;quot;
            CompletionSetCount=&amp;quot;10&amp;quot; EnableCaching=&amp;quot;true&amp;quot; MinimumPrefixLength=&amp;quot;3&amp;quot; 
            CompletionInterval=&amp;quot;10&amp;quot;&amp;gt;
        &amp;lt;/cc1:AutoCompleteExtender&amp;gt;

---------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;

/// &amp;lt;summary&amp;gt;
/// Summary description for GetProd
/// &amp;lt;/summary&amp;gt;
[WebService(Namespace = &amp;quot;http://tempuri.org/&amp;quot;)]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
[System.Web.Script.Services.ScriptService]
public class GetProd : System.Web.Services.WebService
{

    public GetProd()
    {

        //Uncomment the following line if using designed components 
        //InitializeComponent(); 
    }

    [WebMethod]
   
    [System.Web.Script.Services.ScriptMethod]

    public static string[] GetProdDesSearch(string prefixText, int count)
    {
        try
        {
            TORDataContext dbac = new TORDataContext();
            return dbac.tblOnlineReportingCOMPLETEWeights
                .Where(r =&amp;gt; r.MemberId == &amp;quot;FM00012&amp;quot; &amp;amp;&amp;amp; r.UnitDescription.StartsWith(prefixText))
                .OrderBy(r =&amp;gt; r.UnitDescription)
                .Select(r =&amp;gt; r.UnitDescription)
                .Distinct()
                .Take(count)
                .ToArray();

        }

        catch
        {
        }
        return null;
    }
}&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;Now, I know the webmethod itself works as origianlly tested the functionality in a test solution...however, I can&amp;#39;t get this version to work at all and it is driving me mad. I am assuming I have incorrectly set up the web service but I&amp;#39;m just a but stuck.&lt;/p&gt;
&lt;p&gt;If someone can point me in the right direction, I would really appreciated. Again, apologies for being thick.&lt;/p&gt;</description></item><item><title>[Microsoft.Web.Script.Services.ScriptService()]  -  The type or namespace name 'Web' does not exist in the namespace 'Microsoft'</title><link>http://forums.asp.net/thread/1553658.aspx</link><pubDate>Mon, 29 Jan 2007 17:26:58 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1553658</guid><dc:creator>NetSpike</dc:creator><author>NetSpike</author><slash:comments>21</slash:comments><comments>http://forums.asp.net/thread/1553658.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1009&amp;PostID=1553658</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I'm trying to use the [Microsoft.Web.Script.Services.ScriptService()]&amp;nbsp; in my web service, but when I compile I receive the following error message:&lt;/p&gt;
&lt;p&gt;Error&amp;nbsp;1&amp;nbsp;The type or namespace name 'Web' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)&lt;/p&gt;
&lt;p&gt;Any suggestions how to fix this problem?&lt;/p&gt;
&lt;p&gt;Thanks in advance!&lt;/p&gt;
&lt;p&gt;Regards&lt;br /&gt;Edward&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Getting Data from a chat srever through ajax functions</title><link>http://forums.asp.net/thread/3516870.aspx</link><pubDate>Tue, 17 Nov 2009 06:48:35 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3516870</guid><dc:creator>net.hitesh</dc:creator><author>net.hitesh</author><slash:comments>1</slash:comments><comments>http://forums.asp.net/thread/3516870.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1009&amp;PostID=3516870</wfw:commentRss><description>&lt;p&gt;I want to develop an application like these images&lt;/p&gt;&lt;p&gt;
&lt;span&gt;&lt;span style="font-size:8.5pt;line-height:115%;"&gt;&lt;a href="http://img340.imageshack.us/i/maindxv.jpg/" target="_blank"&gt;http://img340.imageshack.us/i/maindxv.jpg/&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="font-size:8.5pt;line-height:115%;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:8.5pt;line-height:115%;"&gt;&lt;br /&gt;
&lt;span&gt;&lt;a href="http://img338.imageshack.us/i/datat.jpg/" target="_blank"&gt;http://img338.imageshack.us/i/datat.jpg/&lt;/a&gt;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;&lt;a href="http://img22.imageshack.us/i/sendingz.jpg/" target="_blank"&gt;http://img22.imageshack.us/i/sendingz.jpg/&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:8.5pt;line-height:115%;"&gt;&lt;span&gt;In this application I want to develop a chatbot like application.which will coneect to some prespecified chatservers.for eg http://en.babel.com&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:&amp;#39;times new roman&amp;#39;,&amp;#39;new york&amp;#39;,times,serif;font-size:medium;"&gt;&lt;span&gt;in this page&lt;/span&gt; all the requests are passed through certain Ajax pages, EX.&lt;br /&gt;
&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;a rel="nofollow" href="http://en.babel.com/ajax/" target="_blank"&gt;http://en.babel.com/ajax/&lt;/a&gt;&lt;/span&gt;&lt;span style="font-weight:bold;"&gt;Index.Community.Chat.Web.AjaxLib.UserManager.ajax&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I have to use the functions on this page like &lt;/span&gt;&lt;span style="font-family:&amp;#39;times new roman&amp;#39;,&amp;#39;new york&amp;#39;,times,serif;font-size:medium;"&gt;function&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold;font-style:italic;text-decoration:underline;"&gt;GetConnectedUsers&lt;/span&gt; ,which will return with the data (&lt;span style="font-weight:bold;"&gt;&amp;nbsp;ID&lt;/span&gt;,&amp;nbsp;&lt;span style="font-weight:bold;"&gt;Nickname&lt;/span&gt;, avatar . etc... ) of the users in&amp;nbsp;&lt;span style="font-weight:bold;"&gt;this page&lt;/span&gt;&amp;nbsp;soI need to fetch pages and repeat the process get all the online users on the server.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:&amp;#39;times new roman&amp;#39;,&amp;#39;new york&amp;#39;,times,serif;font-size:medium;"&gt;Can anybody help how should I do that , any sample code help would be very helpful to me&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Webservice calling another webservice</title><link>http://forums.asp.net/thread/3512918.aspx</link><pubDate>Sat, 14 Nov 2009 18:01:46 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3512918</guid><dc:creator>marstave</dc:creator><author>marstave</author><slash:comments>4</slash:comments><comments>http://forums.asp.net/thread/3512918.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1009&amp;PostID=3512918</wfw:commentRss><description>&lt;p&gt;Hi I am trying to let my webservice(asmx type)&amp;nbsp;&amp;nbsp;call another remote webservice (with identical input parameters and return types) by using HttpWebRequest and GetRequestStream.&lt;/p&gt;
&lt;p&gt;Then I need to feed the HttpWebrequest with a post of Json serialized parameters and handle the deserialisation myself as would normally be done by javascrip on the client side. &lt;/p&gt;
&lt;p&gt;Calling and getting the response from the remote webservice works perfectly. My only problem is that I want to pass the JSON parameter line invoking my webservice and pass that on to the next webservice without&amp;nbsp;extra serializing in between. Likewise I like to use the returned JSON serilized response to be fed directly back to the client side.&lt;/p&gt;
&lt;p&gt;I have tried to write back Context.Response.Write(”{\”d\”:\”xx\”}”);&lt;/p&gt;
&lt;p&gt;But it always returns missing d …&lt;br /&gt;Likewise I have no idea on how to pick up the input Json parameters&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any ideas would be welcome&lt;/p&gt;
&lt;p&gt;Regards&lt;br /&gt;Martin&lt;/p&gt;</description></item><item><title>Getting started with web service... help with parameters</title><link>http://forums.asp.net/thread/3518470.aspx</link><pubDate>Tue, 17 Nov 2009 21:20:27 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3518470</guid><dc:creator>jase81</dc:creator><author>jase81</author><slash:comments>2</slash:comments><comments>http://forums.asp.net/thread/3518470.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1009&amp;PostID=3518470</wfw:commentRss><description>&lt;pre class="vb.net" name="code"&gt;&amp;lt;WebMethod()&amp;gt; _
Public Function NewOrder(ByVal a As String, ByVal b As String, ByVal c As String, ByVal d As String, ByVal e As String, ByVal f As String) As String

&amp;#39; Validate and enter into DB

End Function&lt;/pre&gt;
&lt;p&gt;Hi everyone,&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I&amp;#39;ve made a simple web service in VB.NET&amp;nbsp;which uses an SQL Server DB.&lt;/p&gt;
&lt;p&gt;Currently I am accepting some string&amp;nbsp;parameters just as I&amp;#39;ve shown in the example code. In my WSDL parameters show up like:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="xhtml" name="code"&gt;&amp;lt;s:element minOccurs=&amp;quot;0&amp;quot; maxOccurs=&amp;quot;1&amp;quot; ... /&amp;gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But I need&amp;nbsp;one parameter&amp;nbsp;to come up as maxOccurs=&amp;quot;unbounded&amp;quot;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;How do I do this in VB.NET?&lt;/p&gt;</description></item><item><title>Autocomplete Extender Issue</title><link>http://forums.asp.net/thread/3519830.aspx</link><pubDate>Wed, 18 Nov 2009 14:00:34 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3519830</guid><dc:creator>MrDean</dc:creator><author>MrDean</author><slash:comments>2</slash:comments><comments>http://forums.asp.net/thread/3519830.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1009&amp;PostID=3519830</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;PLEASE IGNORE THIS&amp;nbsp;POST AND IF POSSIBLE, REFER TO MY PREVIOUS POST.&lt;/p&gt;
&lt;p&gt;Hello all - I&amp;#39;m unsure if my previous post has been submitted.&lt;/p&gt;
&lt;p&gt;I am having issues with an autocomplete extender brought through using&amp;nbsp;a web service:&lt;/p&gt;&lt;pre class="c-sharp" name="code"&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;


/// &amp;lt;summary&amp;gt;
/// Summary description for GetProd
/// &amp;lt;/summary&amp;gt;
[WebService(Namespace = &amp;quot;http://tempuri.org/&amp;quot;)]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
[System.Web.Script.Services.ScriptService]
public class GetProd : System.Web.Services.WebService
{

    
    [WebMethod]
   
    [System.Web.Script.Services.ScriptMethod]

    public static string[] GetProdDesSearch(string prefixText, int count)
    {
        try
        {
            TORDataContext dbac = new TORDataContext();
            return dbac.tblOnlineReportingCOMPLETEWeights
                .Where(r =&amp;gt; r.MemberId == &amp;quot;FM00012&amp;quot; &amp;amp;&amp;amp; r.UnitDescription.StartsWith(prefixText))
                .OrderBy(r =&amp;gt; r.UnitDescription)
                .Select(r =&amp;gt; r.UnitDescription)
                .Distinct()
                .Take(count)
                .ToArray();

        }

        catch
        {
        }
        return null;
    }
}

------

&amp;lt;asp:TextBox ID=&amp;quot;txtProDesSearch&amp;quot; AutoComplete=&amp;quot;off&amp;quot; Autocompletetype=&amp;quot;Search&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt;
         
         
        &amp;lt;cc1:AutoCompleteExtender ID=&amp;quot;txtProDesSearch_AutoCompleteExtender&amp;quot; 
            runat=&amp;quot;server&amp;quot; 
            DelimiterCharacters=&amp;quot;&amp;quot; 
            TargetControlID=&amp;quot;txtProDesSearch&amp;quot;
            Enabled=&amp;quot;True&amp;quot; 
            ServiceMethod=&amp;quot;GetProdDesSearch&amp;quot; 
            ServicePath=&amp;quot;GetProd.asmx&amp;quot;
            CompletionSetCount=&amp;quot;10&amp;quot; EnableCaching=&amp;quot;true&amp;quot; MinimumPrefixLength=&amp;quot;3&amp;quot; 
            CompletionInterval=&amp;quot;10&amp;quot;&amp;gt;
        &amp;lt;/cc1:AutoCompleteExtender&amp;gt;


&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;Now, the webmethod works, as I did a trial in a solution, but I must be going wrong with setting up the web service.&lt;/p&gt;
&lt;p&gt;Can someone point out the error in my ways as this has been driving me nuts!&lt;/p&gt;</description></item><item><title>How to get XML data from server on request?</title><link>http://forums.asp.net/thread/3513669.aspx</link><pubDate>Sun, 15 Nov 2009 11:24:56 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3513669</guid><dc:creator>saad ahmed khan</dc:creator><author>saad ahmed khan</author><slash:comments>2</slash:comments><comments>http://forums.asp.net/thread/3513669.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1009&amp;PostID=3513669</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;I am in a situation where I need to get XML string of each product from server side on request, but only those tags that are added to XML at server side after the last client request. How can I determine at server side and return only newly added tags of XML of requested product to client so that only latest and relevant information could be shown at client side. And is there any way to save and keep on updating that XML data&amp;nbsp;retrieved for each product&amp;nbsp;on client side?&lt;/p&gt;</description></item><item><title>architecture question regarding long-polling</title><link>http://forums.asp.net/thread/3517464.aspx</link><pubDate>Tue, 17 Nov 2009 11:46:55 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3517464</guid><dc:creator>tristan_c</dc:creator><author>tristan_c</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3517464.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1009&amp;PostID=3517464</wfw:commentRss><description>&lt;p&gt;Hi, &lt;/p&gt;
&lt;p&gt;I have an ajax call being made in a long-polling&amp;nbsp;fashion - a new call is instantly&amp;nbsp;made each time data&amp;nbsp;has been returned.&amp;nbsp;Up till now I have just been returning random data in the callback but want now to plug into my real data, which arrives to a windows service say 10 times per second. &lt;/p&gt;
&lt;p&gt;Given my Ajax call is transient, how should I wire it up to the windows service? I have several windows services talking to each other over TCP/IP sockets but I&amp;#39;m worried that creating a socket each time there is an Ajax call is going to create a big overhead. In the old COM/COM+ days I would have had a component instantiated in Component Services which would have stayed active with regular requests and could have stayed connected to the windows service. How can I put in such an extra tier in .net 2.0 / 3.5?&lt;/p&gt;
&lt;p&gt;Don&amp;#39;t worry about a precise answer - any tips for connecting asp.net pages to windows services would be helpful. &lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;TC&lt;/p&gt;</description></item><item><title>An AJAX MDI?</title><link>http://forums.asp.net/thread/3516557.aspx</link><pubDate>Tue, 17 Nov 2009 02:31:37 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3516557</guid><dc:creator>Snixtor</dc:creator><author>Snixtor</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3516557.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1009&amp;PostID=3516557</wfw:commentRss><description>&lt;p&gt;What I&amp;#39;m wanting to create is basically an MDI (Multiple Document Interface) in ASP.NET.&lt;/p&gt;
&lt;p&gt;Each document would essentially be in a tab page, so along the top of the page I would have a series of tabs listing the currently open views.  The user can click on these to quickly switch between their open documents, close one of them, save changes, open a new one (which will introduce a new tab), etc.&amp;nbsp; The interface for each of these documents will be fairly complex, including data-bound grids and other server based controls.&lt;/p&gt;&lt;p&gt;For the sake of performance, I&amp;#39;m wanting to avoid using one great big UpdatePanel that loads down the entire document each time the user switches to a new &amp;quot;window&amp;quot;.&amp;nbsp; Instead I&amp;#39;m wanting to keep them client-side cached, I suspect the best approach for this is by setting the CSS display property of the hidden ones accordingly, and the one the user has clicked on as visible, this way once the documents have been loaded to the client they can switch between them almost instantly as there will be no server callbacks.&lt;/p&gt;&lt;p&gt;The part I&amp;#39;m having a hard time wrapping my head around though, is loading in the new windows.&amp;nbsp; I&amp;#39;ve seen examples using ICallbackEventHandler to fetch data from the server, or jquery fetching from the page or a web service.&amp;nbsp; I&amp;#39;ve seen client-side templates being populated by fetching JSON formatted data from the server, cloning the template and filling in the fields by parsing.&amp;nbsp; But none of these examples are dynamically creating server controls.&lt;/p&gt;&lt;p&gt;For an example of what I&amp;#39;m trying to achieve:&amp;nbsp; The user starts with a &amp;quot;search&amp;quot; input on the page.&amp;nbsp; They enter in some text, and results are returned in a grid.&amp;nbsp; This grid is a server-side object, data-bound, using callbacks for paging, sorting and filtering.&amp;nbsp; The user then enters in another search criteria and a new tab is loaded with the results from that search.&amp;nbsp; The user can then switch between the two tabs (effectively instantaneously), and re-sort each of the grids thanks to server-side data binding.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Call Webservice from javascript async</title><link>http://forums.asp.net/thread/3514004.aspx</link><pubDate>Sun, 15 Nov 2009 19:09:20 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3514004</guid><dc:creator>larger_uk</dc:creator><author>larger_uk</author><slash:comments>2</slash:comments><comments>http://forums.asp.net/thread/3514004.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1009&amp;PostID=3514004</wfw:commentRss><description>&lt;p&gt;I&amp;nbsp;am making four calls to a webservice via javascript asynchronously and each call is going to the same webmethod but retrieving different data from the database. I am not using the built in .net ajax javascript as I have created my own.&lt;/p&gt;
&lt;p&gt;All it does is call the webmethod from the webservice and pass through the parameters using SOAP.&lt;/p&gt;
&lt;p&gt;All four calls are working fine and retrieving data, however if any of them take time to query the database, the other javascript calls wait till the previous one finishes querying the database before it then does the same.&lt;/p&gt;
&lt;p&gt;Is there anyway to make all the calls asynchronous on the webservice so if one of them does take a long time in retrieving its data it won&amp;#39;t effect the other calls.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t think there is a problem with the javascript, but more to do with the server and how it handles multiple calls. I have looked into threading but not sure how to handle this seeing as the calls are coming from javascript.&lt;/p&gt;
&lt;p&gt;Any help would be greatly appreciated.&lt;/p&gt;
&lt;p&gt;Mike&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Question about multiple cascading drop downs using one web service.</title><link>http://forums.asp.net/thread/3502847.aspx</link><pubDate>Mon, 09 Nov 2009 21:11:23 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3502847</guid><dc:creator>jwelsh</dc:creator><author>jwelsh</author><slash:comments>3</slash:comments><comments>http://forums.asp.net/thread/3502847.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1009&amp;PostID=3502847</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve got a page that has three sets of drop down lists that use&amp;nbsp;Ajax cascading drop down extenders.&amp;nbsp; All three sets function exactly the same way, and all three&amp;nbsp;use the same XML file to populate their values.&amp;nbsp; I am&amp;nbsp;wondering if it is possible to use one web service for all three sets or if I&amp;nbsp;need to have a web service for each set?&lt;/p&gt;
&lt;p&gt;I&amp;#39;m asking because I&amp;#39;m getting strange results when I try this.&amp;nbsp; Everything works fine when I wire up the first set of drop downs.&amp;nbsp; When I wire up the second set it works, but&amp;nbsp;the first set no longer works (the first drop down box shows what I assume to be &amp;#39;Method Error&amp;#39; - the box is not big enough to show the entire message).&amp;nbsp; If I remove the cascade from the second set, the first set&amp;nbsp;works again.&lt;/p&gt;
&lt;p&gt;Thanks for your help!&lt;/p&gt;</description></item><item><title>How to edith Name.asmx</title><link>http://forums.asp.net/thread/3508992.aspx</link><pubDate>Thu, 12 Nov 2009 15:05:48 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3508992</guid><dc:creator>gissah</dc:creator><author>gissah</author><slash:comments>3</slash:comments><comments>http://forums.asp.net/thread/3508992.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1009&amp;PostID=3508992</wfw:commentRss><description>&lt;p&gt;Can anyone&amp;nbsp;tell me how to&amp;nbsp;edith my webserver .asmx file. I can edith .asmx.cs&lt;/p&gt;
&lt;p&gt;everything looks fine but i am getthing this errors:&lt;/p&gt;
&lt;p&gt;&amp;lt;%@ WebService Language=&amp;quot;C#&amp;quot; CodeBehind=&amp;quot;Name.asmx.cs&amp;quot; class=outthebox.web.services.&lt;strong&gt;Service1&amp;nbsp;&lt;/strong&gt;%&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I want to change &lt;strong&gt;Service1&lt;/strong&gt; to&amp;nbsp;&lt;strong&gt;Name&lt;br /&gt;&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Strange Problem: only IE fires up error [XmlHttp] 12152</title><link>http://forums.asp.net/thread/3500105.aspx</link><pubDate>Sun, 08 Nov 2009 00:27:19 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3500105</guid><dc:creator>johngrinder</dc:creator><author>johngrinder</author><slash:comments>3</slash:comments><comments>http://forums.asp.net/thread/3500105.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1009&amp;PostID=3500105</wfw:commentRss><description>&lt;p&gt;Hi Folks,&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;i have a very very strange error on my application:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;i&amp;#39;m using a .NET webservice, which sends some data, nothing complex: its just about firing two numbers to the webservice and receiving the values. Nothing complex, no SSL/HTTPS, nothing. Just a damn simple webservice.&lt;/p&gt;&lt;p&gt;So, in FireFox everything works fine. But, when users with IE are trying to get the page, all of them receive error &amp;quot;12152&amp;quot;. The strangee thing is: this seems to be purely an IE issue.&lt;/p&gt;&lt;p&gt;I&amp;#39;ve googled already: all people having the same error are driving with SSL/encryption and stuff like that. In my scneario, all these conditions don&amp;#39;t fit in.&lt;/p&gt;&lt;p&gt;The funny thing is:&lt;br /&gt;i went over to webservices when i read about the &amp;quot;page overload&amp;quot; (when handling/processing a full ASP.net page). I though, OK lets move this few functions to a webservice, so the server wouldn&amp;#39;t have to instantiate a full ASPX page to process this stuff; but, honestly, the &amp;quot;old version&amp;quot; (via ASPX page) worked out completely uncomplicated, now i have this strange problems. And all this is because i _thought_ a webservice would be more performant.&lt;/p&gt;&lt;p&gt;Additional info is:&lt;br /&gt;i build my webservice based on Dino Espositos Book, and yes, i followed the text in the book; but now.... thats really strange.&lt;/p&gt;&lt;p&gt;Can anyone point me to a usefull information?&lt;/p&gt;&lt;p&gt;Regards&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>ASP.NET AJAX and Forms Authentication generate a HTTP 401 sporatically</title><link>http://forums.asp.net/thread/3495111.aspx</link><pubDate>Thu, 05 Nov 2009 02:28:14 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3495111</guid><dc:creator>pmourfield</dc:creator><author>pmourfield</author><slash:comments>3</slash:comments><comments>http://forums.asp.net/thread/3495111.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1009&amp;PostID=3495111</wfw:commentRss><description>&lt;p&gt;I have a situation where I&amp;#39;m using clientside ASP.NET AJAX requests to a WebService in the same web site. The WebService folder is protected by&amp;nbsp;FormsAuthentication.&amp;nbsp;It seems to work fine, execpt when I load test the website using VS2008 Test Edition, a majority of the web service calls are generating HTTP 401 responses.&amp;nbsp; Any ideas what I can look at?&lt;/p&gt;
&lt;p&gt;Thanks!&amp;nbsp;&lt;/p&gt;</description></item><item><title>Forms auth cookie is cleared from response when AJAX web service call returns exception</title><link>http://forums.asp.net/thread/3497039.aspx</link><pubDate>Thu, 05 Nov 2009 22:26:21 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3497039</guid><dc:creator>mike.macarthur</dc:creator><author>mike.macarthur</author><slash:comments>1</slash:comments><comments>http://forums.asp.net/thread/3497039.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1009&amp;PostID=3497039</wfw:commentRss><description>&lt;p&gt;I have an ASP.NET AJAX application that uses forms authentication.&amp;nbsp; There are no postbacks in this application; all server functionality is&amp;nbsp;on &lt;font size="2"&gt;Page_Load or in&amp;nbsp;&lt;/font&gt;web service calls made directly from the Javascript (via the AJAX toolscripts).&amp;nbsp; On each page load or web service call, the forms authentication ticket is updated by calling a simple utility method:&lt;/p&gt;&lt;pre class="c-sharp" name="code"&gt;        public static FormsAuthenticationTicket RenewFormsAuthTicket()
        {            
            FormsAuthenticationTicket oldTicket = ((System.Web.Security.FormsIdentity)HttpContext.Current.User.Identity).Ticket;
            FormsAuthenticationTicket newTicket = new FormsAuthenticationTicket(oldTicket.Version + 1, oldTicket.Name, DateTime.Now, DateTime.Now.AddMinutes(((System.Web.Configuration.AuthenticationSection)System.Configuration.ConfigurationManager.GetSection(&amp;quot;system.web/authentication&amp;quot;)).Forms.Timeout.Minutes), oldTicket.IsPersistent, oldTicket.UserData);
            HttpCookie newCookie = new HttpCookie(System.Web.Security.FormsAuthentication.FormsCookieName, System.Web.Security.FormsAuthentication.Encrypt(newTicket));
            HttpContext.Current.Response.Cookies.Add(newCookie);
           
            return newTicket;
        }
&lt;/pre&gt;
&lt;p&gt;This &amp;quot;RenewFormsAuthTicket()&amp;quot; method is called from the web service base class&amp;#39;s constructor so each individual web service doesn&amp;#39;t have to worry about&amp;nbsp;handling the session details.&amp;nbsp; &lt;strong&gt;It works great ... except&lt;/strong&gt; when the web service throws an exception that is intended to go out to the AJAX error handler routine (in the Javascript).&amp;nbsp; &lt;/p&gt;
&lt;p&gt;What I found is that&amp;nbsp;when the web service throws an exception, the new auth cookie that was added to the&amp;nbsp;Response.Cookies collection in the above code does not make it into the response.&amp;nbsp; That makes&amp;nbsp;sense to me, actually -- but I still need to&amp;nbsp;keep the forms auth ticket timeout updated because the&amp;nbsp;application is, in fact, being actively used.&amp;nbsp; In cases where the page has a list of items that are being submitted to a web service one at a time, the session sometimes does expire in the middle of making the web service calls, because the&amp;nbsp;exceptions being returned from the web service calls are preventing updates to the authentication cookie.&lt;/p&gt;
&lt;p&gt;I thought a solution might be as simple as doing a Response.Flush right after updating the cookie with the above code.&amp;nbsp; This got the cookie updated just fine, but that resulted in the &amp;quot;On Success&amp;quot; Javascript callback function being invoked, and the actual web service exception was not handled.&lt;/p&gt;
&lt;p&gt;Does anyone have ideas on getting the forms auth cookie added to the response even when the web service throws an exception?&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Webservice .ASMX file not found error</title><link>http://forums.asp.net/thread/3488726.aspx</link><pubDate>Mon, 02 Nov 2009 07:59:08 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3488726</guid><dc:creator>TimBue</dc:creator><author>TimBue</author><slash:comments>16</slash:comments><comments>http://forums.asp.net/thread/3488726.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1009&amp;PostID=3488726</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;I have created a simple webservice in VS 2005.&amp;nbsp; I added a cascadingdropdownlist extender in an update panel, as well as a single drop down list, and a scriptmanager.&amp;nbsp; When copy and paste the name of the asmx file including the asmx extension, and paste it into the property of the service path, it comes up saying it cannot find the service, even thought the web service is there.&amp;nbsp; The codebehind in VB includes a simple webmethod function which returns the datarow values and names for each row specified by the dataset&amp;#39;s tableadapter method.&amp;nbsp; &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I tried, adding a new webservice to the root, and that has not worked.&lt;/p&gt;&lt;p&gt;I also made sure the scriptingservice decoration was listed right about the class. &lt;/p&gt;&lt;p&gt;I also have tried closing and reopening Visual studio to no luck, &lt;/p&gt;&lt;p&gt;I have also checked to make sure the webconfig file has the appropriate tags in place as well.&lt;/p&gt;&lt;p&gt;Finally, I have rebuilt the project, however the servicepath attribute still cannot find the webservicefile specified.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Ajax Preview6 Date object serialization bug</title><link>http://forums.asp.net/thread/3490680.aspx</link><pubDate>Tue, 03 Nov 2009 05:37:53 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3490680</guid><dc:creator>chenpengli</dc:creator><author>chenpengli</author><slash:comments>1</slash:comments><comments>http://forums.asp.net/thread/3490680.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1009&amp;PostID=3490680</wfw:commentRss><description>&lt;p&gt;Looks like Preview6 introduces a bug for the Date object. I didn&amp;#39;t have problem in Preview5, but in this release, &lt;/p&gt;
&lt;p&gt;Date.format(...) function returns an error &amp;quot;Object doesn&amp;#39;t support this property or method&amp;quot;. After debugging, I found &lt;/p&gt;
&lt;p&gt;out that Date is serialized as a string instead of a Date object: /Date(1256918400000+0800)/&amp;nbsp; &lt;/p&gt;</description></item><item><title>RenderControl causes The ScriptManager must appear before any controls that need it.</title><link>http://forums.asp.net/thread/3494493.aspx</link><pubDate>Wed, 04 Nov 2009 18:15:11 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3494493</guid><dc:creator>tgaughan</dc:creator><author>tgaughan</author><slash:comments>3</slash:comments><comments>http://forums.asp.net/thread/3494493.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1009&amp;PostID=3494493</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m loading a user control in a service handler (.ashx).&amp;nbsp; In the user control I have a few collapseable panel extenders, a filter text box extender and a modal popup extender.&lt;/p&gt;&lt;p&gt;We&amp;#39;re using a master page that has a ScriptManager defined in the layout.&lt;/p&gt;&lt;p&gt;Here&amp;#39;s some code:&lt;/p&gt;&lt;p&gt;public void ProcessRequest(HttpContext context)&lt;br /&gt;{&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; HtmlTextWriter writer = new HtmlTextWriter(new System.IO.StringWriter());&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; MyNamespace.Web.PageBase pageBase = new MyNameSpace.Web.Base.PageBase();&lt;br /&gt;&amp;nbsp;&amp;nbsp; pageBase.CancelVerifyRenderingInServerForm = true;&lt;br /&gt;&amp;nbsp;&amp;nbsp; pageBase.EnableEventValidation = false;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; ItemRatesCtl itemRatesCtl = (ItemRatesCtl)pageBase.LoadControl(&amp;quot;/Booking/Rates/ItemRatesCtl.ascx&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp; itemRatesCtl.RenderControl(writer);&lt;/p&gt;&lt;p&gt;}&lt;br /&gt;&lt;/p&gt;&lt;p&gt;On the RenderControl execution:&lt;/p&gt;&lt;p&gt;The control with ID &amp;#39;CollapsiblePanelExtenderRentBreakdown&amp;#39; requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.&lt;/p&gt;&lt;p&gt;I;ve tried putting a ScriptManagerProxy control in the user control and registering the service (which BTW get&amp;#39;s called on page load).&amp;nbsp; That does not help...same error.&amp;nbsp; I tried registering the extenders with the Master ScriptManager when the control loads but then it tells me that the controls are already registered.&lt;/p&gt;&lt;p&gt;We&amp;#39;re doing this type of thing a bunch of places but this is the fist that has a control using AJAX toolkit extenders.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;Tom&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Download a file via Webservice?</title><link>http://forums.asp.net/thread/3494214.aspx</link><pubDate>Wed, 04 Nov 2009 15:46:09 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3494214</guid><dc:creator>hbcontract2002</dc:creator><author>hbcontract2002</author><slash:comments>1</slash:comments><comments>http://forums.asp.net/thread/3494214.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1009&amp;PostID=3494214</wfw:commentRss><description>&lt;p&gt;Hi, I have a webservice method which is going to download a file (pop up window with Open or Save the file). I notice webservice might not accept HttpContext.Current.Response?? I have below method which doesn&amp;#39;t work for me and prompt error &amp;quot;System.Xml.XmlException: Data at the root level is invalid&amp;quot; .. .but if i created another method just return a test string value, pass to my ASPX page and print it out, it works ... :( It just doesn&amp;#39;t print the line from the webmethod. Any idea or workaround this?&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;[WebMethod] &amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void DownloadFile(string fileName)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string filepath = fileName;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileInfo file = new FileInfo(filepath);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (file.Exists)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HttpContext.Current.Response.ClearContent();&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HttpContext.Current.Response.AddHeader(&amp;quot;Content-Disposition&amp;quot;, &amp;quot;attachment; filename=&amp;quot; + file.Name);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HttpContext.Current.Response.AddHeader(&amp;quot;Content-Length&amp;quot;, file.Length.ToString());&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HttpContext.Current.Response.ContentType = ReturnExtension(file.Extension.ToLower());&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HttpContext.Current.Response.TransmitFile(file.FullName);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HttpContext.Current.Response.End();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Different Behavior Between IE, FireFox, and Safari with a PageMethod</title><link>http://forums.asp.net/thread/3061738.aspx</link><pubDate>Fri, 03 Apr 2009 19:11:02 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3061738</guid><dc:creator>pianoman1962</dc:creator><author>pianoman1962</author><slash:comments>9</slash:comments><comments>http://forums.asp.net/thread/3061738.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1009&amp;PostID=3061738</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I hope this is the correct location for this post; if not I apologize...I have an AJAX web form with a hyperlink and an asp button.&amp;nbsp; The hyperlink uses the onclick event to call a javascript function while the asp button calls the same javascript function in the onclientclick event. The button uses the postbackurl to post back to another site.&amp;nbsp;  The javascript function in turn calls a pagemethod. &lt;/p&gt;&lt;p&gt;My problem is the call to the pagemethod only works successfully with IE but not FireFox or Safari.&amp;nbsp;&amp;nbsp; Any help is appreciated; my code is below:&amp;nbsp;&lt;/p&gt;&lt;pre class="coloredcode"&gt;ASPX Code&lt;br /&gt;&amp;lt;%@ Page Language=&lt;span class="st"&gt;&amp;quot;C#&amp;quot;&lt;/span&gt; AutoEventWireup=&lt;span class="st"&gt;&amp;quot;true&amp;quot;&lt;/span&gt; CodeBehind=&lt;span class="st"&gt;&amp;quot;Default.aspx.cs&amp;quot;&lt;/span&gt; Inherits=&lt;span class="st"&gt;&amp;quot;PageMethodExperiment._Default&amp;quot;&lt;/span&gt; EnableSessionState=&lt;span class="st"&gt;&amp;quot;ReadOnly&amp;quot;&lt;/span&gt; %&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="st"&gt;&amp;quot;-&lt;span class="cmt"&gt;//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;html xmlns=&amp;quot;&lt;/span&gt;http:&lt;span class="cmt"&gt;//www.w3.org/1999/xhtml&amp;quot; &amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;    Untitled Page&lt;br /&gt;&lt;br /&gt;    &amp;quot;text/javascript&amp;quot;&lt;/span&gt; language=&lt;span class="st"&gt;&amp;quot;javascript&amp;quot;&lt;/span&gt;&amp;gt;
    function JScriptTest()
    {    
&lt;span class="cmt"&gt;//    alert(&amp;#39;before&amp;#39;);&lt;/span&gt;
        PageMethods.TestPageMethod(&lt;span class="st"&gt;&amp;#39;passed this text&amp;#39;&lt;/span&gt;,onSuccess, onFailure);    
&lt;span class="cmt"&gt;//    alert(&amp;#39;after&amp;#39;);&lt;/span&gt;
    }
    function onSuccess(result)
    {
&lt;span class="cmt"&gt;//        alert(&amp;#39;successful&amp;#39;);&lt;/span&gt;
        alert(result);
    }
    
    function onFailure(result)
    {
        alert(&lt;span class="st"&gt;&amp;#39;failed&amp;#39;&lt;/span&gt;);
        alert(result.get_message());
    }
    &lt;br /&gt;    &lt;br /&gt;    &amp;quot;form1&amp;quot; runat=&lt;span class="st"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&amp;gt;&lt;br /&gt;        &amp;quot;ScriptManager1&amp;quot; EnablePageMethods=&lt;span class="st"&gt;&amp;quot;true&amp;quot;&lt;/span&gt; runat=&lt;span class="st"&gt;&amp;quot;server&amp;quot;&lt;/span&gt; /&amp;gt;&lt;br /&gt;    &lt;div&gt;&lt;br /&gt;    &lt;br /&gt;    &lt;/div&gt;&lt;br /&gt;        &amp;quot;Button1&amp;quot; runat=&lt;span class="st"&gt;&amp;quot;server&amp;quot;&lt;/span&gt; Style=&lt;span class="st"&gt;&amp;quot;z-index: 100; left: 125px; position: absolute;&lt;br /&gt;            top: 160px&amp;quot;&lt;/span&gt; Text=&lt;span class="st"&gt;&amp;quot;Button&amp;quot;&lt;/span&gt; OnClientClick=&lt;span class="st"&gt;&amp;quot;return JScriptTest();&amp;quot;&lt;/span&gt; PostBackUrl=&lt;span class="st"&gt;&amp;quot;http:&lt;span class="cmt"&gt;//www.sequencesoftware.com&amp;quot; /&amp;gt;&lt;/span&gt;&lt;br /&gt;        &amp;lt;a href=&amp;quot;&lt;/span&gt;#&lt;span class="st"&gt;&amp;quot; onclick=&amp;quot;&lt;/span&gt;JScriptTest();&lt;span class="st"&gt;&amp;quot; id=&amp;quot;&lt;/span&gt;test&lt;span class="st"&gt;&amp;quot;&amp;amp;gt;hyper link&amp;lt;/a&amp;gt;&lt;br /&gt;    &amp;lt;/form&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;br /&gt;ASPX.CS&lt;br /&gt;using System;&lt;br /&gt;using System.Data;&lt;br /&gt;using System.Configuration;&lt;br /&gt;using System.Collections;&lt;br /&gt;using System.Web;&lt;br /&gt;using System.Web.Security;&lt;br /&gt;using System.Web.UI;&lt;br /&gt;using System.Web.UI.WebControls;&lt;br /&gt;using System.Web.UI.WebControls.WebParts;&lt;br /&gt;using System.Web.UI.HtmlControls;&lt;br /&gt;using System.Web.Services;&lt;br /&gt;&lt;br /&gt;namespace PageMethodExperiment&lt;br /&gt;{&lt;br /&gt;    public partial class _Default : System.Web.UI.Page&lt;br /&gt;    {&lt;br /&gt;        protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;        {&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        [WebMethod]&lt;br /&gt;        public static string TestPageMethod(string inputString)&lt;br /&gt;        {&lt;br /&gt;            return &amp;quot;&lt;/span&gt;Hello world - &amp;quot; + inputString;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;/pre&gt;</description></item></channel></rss>