AJAX :: Results From A Webservice Call Can Be Processed In Different Browsers Same Time?

Jan 12, 2010

in fact I have 2 webservice calls, one returns 8 results and the other one 4 results. So the same webservice is called twice but with different arguments and on different pages(browsers).What happens? even though I call on one page only one webservice(arguments1), I also get the results from webservicearguments2) which should be only on PAGE2to be more clear: I get both webservice results in both the pages, when I expect one for each page, it's like they share webservice results somehow,

View 3 Replies


Similar Messages:

Get Time Processed For A User Control?

Jan 21, 2011

I have a page that has a bunch of user controls. I would like to be able to see which user controls are performing badly. I would like to be able to see this in the trace. any way to do this.

View 2 Replies

AJAX :: Async Call Without Results?

Feb 23, 2011

I want to make an async call to the server when an achor tag is clicked and then have the browser advance to the href without waiting for the async call to return a result. I am using System.Web.UI.ICallbackEventHandler. My server code is not executing. The server code only executes if the GetCallbackEventReference call specifies a clientscript value which means the page has to wait before advancing. What am i doing wrong?

My client code is:

<script type="text/javascript">
function ReceiveServerData(arg, context) {
}
function DoAsyncTask(arg)
{
CallServer(arg, '');
return false;
}
</script>

View 3 Replies

AJAX :: AutoComeple Does Not Call Webservice?

Feb 17, 2011

I have am trying to implement a simple AutoComplete function yet i am having difficulty. It looks like the AutoComplete control is not even calling the method (webservice). If i load the webservice from the browser, i can see my Method, click on it, enter in the prefix, click on Invoke and it returns a SQL STRING. Below is the string the webservice returns.

<?xml version="1.0" encoding="utf-8"
?>

View 4 Replies

Javascript - Apostrophe In Ajax Webservice Call?

Jan 28, 2011

I'm calling a webservice using jQuery with .ajaxHere are the data parameters for the call:

var parameters = "{'Titre':'" + Titre + "','Description':'" + Description + "','Contact':'" + Contact + "','VilleId':'" + VilleId + "','QuartierId':'" + QuartierId + "','UserId':'" + UserId + "'}";
It works fine. But when parameters Description or Titre contain the ' character , no call!!!

Does anyone have an idea how can i make it work even with apostrophe character in Titre and/or Description?

View 4 Replies

JQuery :: AJAX Call To Webservice Is Not Working?

Nov 20, 2010

I have a webservice "DataService.asmx" which I am using for AJAX calls for insert, update, delete and some other tasks. All the pages are calling webservice smoothly but this new page I added and calling my webservice using the same ajax method not working. Strange thing is that neither its going on SUCCESS nor FAILURE...and put a breakpoint on my webservice but its not going into the webservice...plz help as its been 6 hours now figuring what the problem is..here is the code.

[Code]....

here is my webservice

[Code]....

and here is the Code behind

[Code]....

View 5 Replies

AJAX :: Call A Webservice Method Fom Javascript?

Mar 10, 2010

I am trying to call a webservice method fom javascript.Every thing goes fine. But,problem is that, I can't return any value from the function.

View 3 Replies

AJAX :: Call Webservice Using Javascript And Scriptmanager Not Working

May 13, 2010

Configuration : Windows Vista,VS 2005,Ajax v1.0.61025 My Html Page

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<script language="javascript" type="text/javascript">
function fnCall()
{
try
{
var ans= Sim.Service.HelloWorld(OnMethodSucceeded, OnMethodFailed);
}
catch(e)
{
alert(e.message);
}
}
function OnMethodSucceeded(result)
{
alert('a');
}
function OnMethodFailed(result)
{
alert('b');
}
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" ><Services>
<asp:ServiceReference Path="http://localhost/ajaxtest/service.asmx" /></Services>
</asp:ScriptManager>
<div><input id="Button1" type="button" value="button" onclick="fnCall();" /></div>
</form>
</body>
</html>
Web Service CS.
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web.Script.Services;
namespace Sim
{
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// 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 Service : System.Web.Services.WebService
{
public Service()
{
//Uncomment the following line if using designed components
//InitializeComponent();
}
[WebMethod,ScriptMethod(UseHttpGet=true)]
public string HelloWorld()
{
return "Hello World";
}
}
}

But i am getting Sim is not defined. Error. post ur comments. I have reviewed most of the forums. I am not able to clear

View 13 Replies

AJAX :: Looking For A Real Time Example For Webservice

Apr 2, 2010

Iam new to webservices,Till now I did not use web service.Anybody can you give a real time example for webservice.Please it will be very useful for me.

View 3 Replies

AJAX :: Webservice Call From Javascript Fails If Masterpage In Force?

Mar 2, 2010

I am calling a web service via Javascript. I tried it first in a web page that does not have a Masterpage and it worked perfectly. Then I moved everything over to a web page that does use a Masterpage, and I get a "Microsoft JScript runtime error: Object required" on the javascript statement that calls the web service. My javascript statements look like so:

[Code]....

The web service looks like:

[Code]....

The page source is:

[Code]....

View 5 Replies

Make A JQuery Ajax Call To A Webservice That Needs To Return JSON

Jun 19, 2010

Actually I am trying to learn jQuery Ajax calls to asp.Net webservices.

I have been trying to call the webmethod below:

[code]....

Do I need to serialize my object in some way before setting the 'data' attribute, so that I can call $.ajax() function?

View 2 Replies

AJAX :: Call Webservice Method From External Javascript File

Jan 8, 2011

I have a web user control. That I load dynamicaly inside a modalpopup window using dynamic populate extender. User control has a external javascript file linked to it. Problem: I cannot make call to webservice method from this external javascript file. When I make a call -- servicename.methodname() I get servicename not defined error.

View 2 Replies

AJAX :: ModalPopupExtender - Display Loading Indicator During WebService Call

Dec 16, 2010

On one of my pages I've got a popup window implemented using the ModalPopupExtender. The content html of the popup is retrieved from a webservice dynamically (using DynamicServicePath, DynamicServiceMethod properties of the extender). Everything works fine, however there is a minor problem: web service call takes about 2 seconds and the popup panel is blank during this time, which confuses the users. I would like to display 'Loading...' message in the popup window (or an animated image, does not really matter) during the webservice call. Is there a way to do it?

View 2 Replies

Ajax - Call An ASMX Webservice In Javascript Without Resetting Authentication Timers

Nov 23, 2010

Pinging back to a webservice in ajax from the client keeps the user's session alive, I don't want this to happen. More extensive summary For a website we're developing, we need the client to ping back (in js) to a webservice (ASMX) on the server (IIS7.5). This happens to let the server know that the user is still on the site, and hasn't browsed away to another site. This is as our customer wants to let users lock records, but if they browse away to other sites, then let other people take over those locked records. Perhaps the distinction between the client being on the site but inactive and on another site seems unimportant, but that's kinda irrelevant, I don't get to write the UI spec, I just have to make it work.

My problem is this, the ping stops the user from being timed out on the server through the standard forms authentication timeout mechanism. Not surprising as there is that 30 second ping in the background keeping the session alive. Even though we want to know if the user is still on the site, we want the normal forms authentication timeout mechanism to be honoured. I thought I might be able to fix this by removing the ASP.NET_SessionId and .ASPXAUTH cookies in the XMLHttpRequest that is the server ping, but I can't figure out how to do this. This is how my web service & method are defined:

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ScriptService]
public class PingWS : WebService
{
[WebMethod]
public void SessionActive(string sessionID)
{
// does stuff here
}
This is how I'm calling it in js (request is over HTTPS, :
$.ajax({
type: "POST",
url: "PingWS.asmx/SessionActive",
data: 'sessionID=' + aspSessionID + '}',
beforeSend: function (xhr) {
xhr.setRequestHeader('Cookie', '');
xhr.setRequestHeader('Cookie', 'ASP.NET_SessionId=aaa; .ASPXAUTH=bbb;');
},
dataType: "json"
});

I was trying with the setRequestHeader, but that just appends to the header rather than overwrites the header, and IIS is happy to ignore that junk I added. I'm thinking maybe I should be trying to do this at the server end, someone take PingWS.asmx out of the loop so that it doesn't keep the session active, but I'm not sure how to do this. Although the title of the question is focused on clearing the cookie in the header, I'd be super happy if anyone points out that I'm being really stupid and there is actually a much better way of trying to do what I'm doing.

I'm thinking at this stage maybe I need to add something to the webmethod that says how long this particular page has been inactive, and use that knowledge to timeout manually. That actually sounds pretty easy, so I think I'll do that for now. I'm still convinced that there must be an easy way to do what I originally wanted to do though. Update I'm thinking I'm pretty screwed in terms of cookie manipulation here as both the .ASPXAUTH and ASP.NETSessionId cookie are HttpOnly, which means the browser takes them out of your hands, you can't access them via the document.cookies object. So I would say that leaves me with:

Updating my SessionAlive webmethod to track each request so I can tell how long the user has been sitting idle on a page and timeout if needs be Marking the .asmx page somehow on the server end so that it's taken out of the normal authentication/session tracking flow I know how to do 1. so I'll start there but 2. seems much cleaner to me.

View 3 Replies

Ajax - How To Call A Function Automatically After A Certain Time Has Elapsed

Jan 19, 2011

Let's say I have a Label on my page. In PageLoad() it's Text parameter is set to "This is my first text".

After, for example, 1 minute I want this Label to change it's text parameter to "This is my second text" (completely automatically, without any interaction of a user with this site).

View 1 Replies

AJAX :: Throw Exception Message "Authentication Failed" When Call Webservice Form Javascript

Aug 16, 2010

I was created webservice which has a Method:

[Code]....

Then, in my aspx page, i call that method in javascript, but i get a Exception message is "Authentication Failed", code below:

[Code]....

How to resolve this problem?

View 3 Replies

Way To Redirect To The Login Page When The Session Time Out And When A Ajax Call Is Made

Apr 4, 2011

I am having problem in session time out in Asp.net with Ajax Call.Once the session times out,when a control calls asynchrous this is notredirecting to login page.(I am using forms Authentication)In the same page if i try to redirect(in Preinit) to login page if session expired..the login page appears with the previous page(because of the ajax call).Please let me know the way to redirect to the login page when the session time out and when a ajax call is made.

View 1 Replies

State Management :: Session Countdown Time In Browsers Status Bar?

Mar 7, 2010

I want to show countdown time in the status bar of browser like: You session will timeout in 40:00 minutes. You session will timeout in 39:99 minutes. I mean it should countdown to 0 and popup a window if user click Popup's Ok button then it should show a redirected page. No ajax support required. I want manually coding therefore I am not allowed to write anything in web.config also.

View 49 Replies

Web Forms :: Hide The Date / Time Head / Footer And The URL Of The Browsers?

Nov 10, 2010

When I try to print you get the date / time, footer / header, and URL.

How do I hide all this with C #?

View 3 Replies

C# - Call A Webservice In The Same Website?

Jan 11, 2010

I have to call a webservice published in the same website the caller aspx is. When I try to "Add a Web Reference" the editor does not show the webservice methods from the generated namespace. Do I have to use the "Add Web Reference" or is there another way because the webservice is in the same website? Visual Studio 2005, C#

View 3 Replies

C# - Call Webservice From Different Project?

Feb 8, 2011

I have two solutions in .net (solution "A" and solution "B") which both have web services. I want to call a web service method in solution "B" from solution "A". I am very new to C#.

View 3 Replies

Why Does A Call To Webservice Cause ThreadAbortException

Sep 14, 2011

I have a web app that makes a call to a webservice, and it is causing a ThreadAbortException. Why is this? This does not happen when calling the webservice in a windows form application.

View 1 Replies

Call Web Methods Of WebService In Javascript

Nov 5, 2010

I'm doing a project in asp.net with a web services. My web services and my asp.net project is separate and my asp.net projet have a reference of my web services. i'm using visual studio 2008 framework 3.5 and my service web is in vb.net. i want to call the web methods of my web services in javascript my script manager is declared

<asp:ScriptManager runat="server" ID="scriptManager" EnablePageMethods="true" >
<Services>
<asp:ServiceReference path="http://localhost:2931/ServiceCompas.asmx"/>
</Services>
</asp:ScriptManager>
the javascript fuctions
<script type="text/javascript">
function test() {
alert('test');
Service1.Liste_Carte(Onsucced);
}
function Onsucced(resultat) {
alert('je suis passée');
}
</script>

service1 is the class of my Webservice and i call the function test with my button <input name="btnRecherche" class="btnRechercher" type="button" value="Rechercher un emplacement" onclick="test()" /> the problem is : JavaScript say Service1 is not defined but why .... What's the problem ? I've checked many forums and videos every body did it
sorry for the french variable

View 3 Replies

JQuery :: Call Webservice With Parameter?

Sep 13, 2010

how to call web service with jquery in asp.net with param value

View 7 Replies

Call External Json Webservice From C#?

Jan 15, 2010

I need to make a call to a json webservice from C# Asp.net. The service returns a json object and the json data that the webservice wants look like this:

"data" : "my data"

This is what I've come up with but I can't understand how I add the data to my request and send it and then parse the json data that I get back.

string data = "test";
Uri address = new Uri("http://localhost/Service.svc/json");
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(address);
request.Method = "POST";
request.ContentType = "application/json; charset=utf-8";
string postData = "{"data":"" + data + ""}";

How can I add my json data to my request and then parse the response?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved