AJAX :: Webservice Returns Wrong Data?

Jun 25, 2010

So I have a WebMethod that I call using jQuery. The method is supposed to return a unique URL to a image file created dynamicly.

The WebMethod is called in a for loop so anywhere from 1 to 50 calls gets fired async.

The problem is that the webservice seems to be using the same instance of the object, so that it returns the same value to a couple of the requests.

[Code]....

Shouldn't the WebMethod create a new instance of the class for each call, so that all values are stored individually in memory?

[Code]....

View 3 Replies


Similar Messages:

Forms Data Controls :: Grouping Gridview With Gridhelper Returns Wrong Row Index?

Oct 15, 2010

I'm using a GridView and GridViewHelper Class [URL] for grouping the grid by desired field. On the grid I also include an "edit" RowCommand.

Example:

ID ... Name ... Company ... Year ... RowCommand

GROUP1
1 ... Alex ... Comp1 ... 1999 ... Edit
2 ... Jane ... Comp2 ... 1999 ... Edit

GROUP 2
3 ... Mike ... Comp1 ... 1999 ... Edit

Now when I click edit in the second row of the grid (ID=1, the Group itself is shown in the first row) I have the following code on RowCommand:

[Code]....

and the index returned is 0 instead of 1. Why? And how can I fix this, because the edit command returns error or points to the wrong records??

View 11 Replies

State Management :: Data Being Saved To Wrong Table In Wrong Instance Of Sqlserver Of Wrong Database?

Aug 1, 2010

I have a weird thing happening. I have two identical databases installed on one virtual machine but under two different instances of SQLServer. For some reason, periodically when saving from one it will save to the other instead. Using debug, I have verified that the connection string is correct and when the item saves, it still saves to the wrong database.I use session variable, and am of the belief that it might have something to do with it...and t hat when I go from one to the other it is still getting the connection string form the other for some reason.To make sure that it isn't a problem, I make sure that I completely close out one database before opening the other in a new IE window.I assume that when I completely close out an internet explorer window that it abandons all session states. Is that true?

View 7 Replies

Any Webservice That Returns JSON?

May 11, 2010

Does anyone know of free webservice that returns a list in the form of JSON? I have searched many webservice sites but they all return xml. Geonames.org is not required.

View 3 Replies

WCF / ASMX :: Webservice With Multiple Returns?

Feb 3, 2011

I am working with a .net 2.0 asmx webservice (code below)I need to return 4 "items", which will be based on the success of failure of the webservice, and the actual XML imput itself.The Webservice needs to be asyncronous.I have included the code below, but am happy for someone to re-do it as it's been built up on tutorials and examples.At present, I don't believe the async is working, and the returns don't seem to be getting done.I have also built a test harness, and testing, which allows me to send some custom XML and then receive the response.

[Code]....

Harness:

[Code]....

View 1 Replies

WCF / ASMX :: Webservice Returns Xml As A String?

Nov 22, 2010

i work with visual studio 2005 and asp net 2.0 and i must to create a webservice who returns a xml as a string

this string must be use by an application java as i know ..

ok i can create the asmx and my web method who run a sql command BUT how i can return a xml as a string ?

View 3 Replies

Webservice Returns HTTP Error 500 After Deployment?

Nov 2, 2010

I have a webservice (ASMX) which I have tested locally using built-in VS web server. It works fine in the Dev environment, and there was no configuration of anything in IIS for this kind of webservice to work.

Today when I deployed my site on the live server, I got a 500 error when the webservice is being called. The website doesn't work, and unfortunately the client did not test this on staging (same server)

Here's the sample call to my service.

$.ajax({
type: "POST",
url: 'http://www.mydomain.com/services/someservice.asmx/MyMethod',
data: "someid=564",
dataType: "xml",
success: function(msg){
}

In Firebug, http://www.mydomain.com/services/someservice.asmx/MyMethod returns error 500 internal server.

I called the service using jQuery AJAX, the live server is Windows Server 2008 Standard.

View 1 Replies

WCF / ASMX :: How To Work With A Webservice Call That Only Returns Xml Nodes

Jul 20, 2010

I'm working with a webservice call after doing

[Code]....

[Code]....

View 1 Replies

WCF / ASMX :: Webservice Returns Object With Date Property?

Jul 28, 2010

Some strange problem have occured while developing application. Some WCF webservice returns object with date property.On client this web service is called using Jquery.ajax.Then result is parsed using json2.For date I simply use following expressions:
var reMsAjax = /^/Date((d|-|.*))[/|\]$/;
a = reMsAjax.exec(value);
if (a)
var b = a[1].split(/[-+,.]/);
return new Date(b[0] ? +b[0] : 0 - +b[1]);
unfortunatelly if browser timezone differs simple new Date with milliseconds not works.Time will be based on timezone.

View 1 Replies

ADO.NET :: Data Saving To Wrong Database On Wrong Instance Of Sqlserver

Aug 1, 2010

I have a very weird thing happening. I have two databases that have exactly the same tables but different database names on the same virtual machine, but in different instances of SQL Server. For some reason, when using one of them, it will save to the other. In debug, looking at my connection string..I have verified that it is correct, yet when I allow the save, I look in the table and it isn't there, it is in the other database that is in a table with a completely different name and in a different instance of SQL Server.

View 1 Replies

WCF / ASMX :: Webservice In Https Returns Undefined But Works On Http?

Jul 20, 2010

We have a problem regarding webservices when it runs in https. it say's that the service is undefined. BUT when we try it in http it runs okay...

View 1 Replies

AJAX :: Tabcontainer Shows Wrong Tab Data After Postback

Feb 22, 2011

My setup is as follows: I have 4 tabs of data, all of which are invisible when the page loads. The user enters some search criteria, hits the search button, and then the first tab fills up a gridview with data and becomes visible. One of the columns in this grid is a linkbutton named 'detail'. When they click on 'detail', the 3 remaining tabs go and get their data from the database and become visible. On tab#2, I have a listview which allows editing/adding of data. Here is my problem: When I click the imagebutton on the listview that puts the listview into edit mode, the data from the first tab is now shown on the second tab.

So the correct tab (tab#2) remains selected, but the other tab's data is being displayed. Has anyone else run across this? I have tried numerous combinations of update panels and triggers but I always get the same results. Also, the last 3 tabs each contain a usercontrol. I don't know if that has anything to do with it.

View 6 Replies

Security :: WebService Returns "The Request Failed With HTTP Status 401: Unauthorized"?

Jan 7, 2010

I wrote a web services with Windows authentication, when i consume this WS from my app inside my network all work great, but when I consume this WS outside my network the WS return "The request failed with HTTP status 401: Unauthorized"I'd try the URL in an explorer page and all works great.In my app I use this:

webservice.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;

What alternatively can I use to get credential inside and outside of my net?

View 4 Replies

AJAX :: Wcf Based Web Service Returns Data In JSON?

Jul 7, 2010

I want to make a web servcie(.svc) that returns JSON data after entering the input.....which is resulted as in the downloaded filein JSON format.i want something like that-http://209.62.6.226/GracoRest/service.svc/Rest/WheretoBuyplease help me for the above but....step by step...i m trying WCF very 1st time

View 3 Replies

AJAX :: Broadcast New Data Using Webservice?

Jun 8, 2010

I am working on an application just like any fast food restaurant uses for example McDonalds.

Basically, application consists of three parts.

1) Web Application # 1 to take orders (Used by the clerk(s))

2) Web Application # 2 to process orders (used by the chef back in the kitchen)

3) WebService returns new orders (with PENDING status) to Web Application # 2.

Write now, Application # 1 adds new orders to the database. Application # 2 calls the WebService to get new ordes by REFRESSHING the page again and again. Refreshing the page over and over again is the problem.

I want the WebService to automatically send new data (oredrs with PENDING status) to Web Application # 2 whenever Application #1 add new order.

Application # 1 can call WebService (sending true flag) to let it konw that something has been added so the WebService can broadcast new date to Application # 2

Here is the flow which I am trying to achieve

Application # 1 (Takes new Order)
Application # 1 then call WebService (sending true)

WebService (if true is received), send new data to WebApplication # 2, cause postback on Applicatin # 2 automatically

For Example just imagine when you walk in McDonalds

Clerk takes your order -> New order is automatically send to the Kitchen (to process order)

Here is the breakdown

Application # 1 = Clerk taking order
WebService = Mechanism which is sending new order to Kitchen
Application # 2 = Monitor in the Kitchen receiving orders.

View 6 Replies

How To Save Data Through Ajax Webservice Without Postback

Mar 15, 2010

Or is there any simpler solution ?

View 1 Replies

AJAX :: How To Automatically Update Data When WebService Change

Nov 16, 2010

My scenario is create a webservice(regional weather prediction, or currency rate), and a client application having a updatepanel and then consume that service.Now, when webservice changes its data(temperture goes up or down, rate changes)I want to ask is there any way client can aware that webservice has changed so it will update properly.

View 3 Replies

AJAX :: Fastest Way To Retreive Data From Database From Webservice?

Jan 25, 2010

I'm using Webservice which will return the data from the database through datatable and I'll convert the datatable into byte array. In front end, I'll reconvert the bytearray to datatable and used ajaxloader to display it in the form.. It is dynamic loading. So, for each click, it is taking 10 seconds to retreive the data regardless of the size of the data. So, I used static datatable and I've loaded all data in that datatable in page load event. But, no reaction. It is taking only same time. Even, there is no data to retreive, the ajax loader is going on loading for 10 seconds. Problem is with Ajax or my webservice?? Plz, tell me some other idea??!!

[Code]....

View 1 Replies

AJAX :: Data From WebService Is Not Retained In Page History

Jan 19, 2011

I am using a web service to pass back search results. To do this I am using ToolkitScriptManager with a ServiceReference to my web service and calling the web service up with javascript. The javascript call looks something like this:

WebService.GetResults("search term", OnSuccessGetData, OnFail);

If the request is successful the "OnSuccessGetData" function is fired and the results are inserted into a DIV tag. Because the resulting search results can be large I wrote the service to only pass back the first 20 results on the first trip. After that I make calls again to the service to return the next 5 results and continue to do this until all the results are loaded. This all works wonderful. You can see it in action at www.lsbio.com and use the search term "human mouse". My problem is that when the user clicks on a product and then hits the 'Back' button the search results have to be fetched again from the webservice.

Is there a way to keep the search results in the DIV tag to remain as part of the page so when the user navigates away from the search page and uses the 'Back' button to navigate back the search results are still there without having to hit the webservice again?

If I didn't make myself clear enough on what I am trying to do, go ahead and test the site www.lsbio.com, use the search terms human mouse, click on a product and then hit the back button.

View 1 Replies

AJAX :: ModalPopupExtender Posting To Wrong Form

Feb 4, 2010

I have a page with two forms on it. The first form is a "Search" form and does not have the runat="server" attribute. It is merely meant to post some search criteria to another page on the site. The second form is the standard "aspnetForm". Inside that form I have a ModalPopupExtender... Within the ModalPopupExtender there are two buttons that should postback to the server when they are clicked by the user. My problem is that when the buttons are clicked the page posts back to the "Search" form... The only clue I have is that if I move the form to the bottom of the page (after my ModalPopupExtender), everything works fine. It seems that the extender uses the first form it can find on the page. Is there anyway to force it to postback to the correct form?

[Code]....

View 1 Replies

AJAX :: Combobox List At Wrong Place - How To Fix It

Dec 22, 2010

With the following code I create a combobox in a panel which is in the pane of an accordion panel.

[Code]....

Now when I click on the arrow of the combobox, the list is show somewhere else on the page and not where it should be.

It seems the list is not positioned relative to the textbox.

View 2 Replies

AJAX :: Wrong Update Panel Is Being Updated?

Feb 3, 2011

I have a page with 2 update panels.

Controls in the update panel holds a listview and each row here has a button. This button fires a FancyBox (modal dialog) When closing this a call to the onClosed event is triggered like here:

[Code]....

There is two of these sections one for each update panel. The problem here is that this 'Page.ClientScript.GetPostBackEventReference' actually updates the wrong update panel!It is always updating the first updatepanel on the page, and I cannot figure out why this is. The two update panels areencapsulated in its own user control, but still the first update panel is always fired.

View 1 Replies

AJAX :: Prevent ModalPopup From Disappearing After Wrong Login?

May 6, 2010

I put loginView control inside ModalPopupExtender, the problem is: when I try to login with wrong user/password and press the login button, this button cause a postback and then the page reloads and ModalPopup dissapears, only when I press the button wich cause ModalPopup to show itself, I see the loginview control with the message "username or password is wrong"

What can I do to prevent ModalPopup from disappearing after wrong login?

View 3 Replies

AJAX :: Autocomplete Extender Show Wrong Layout?

Apr 25, 2010

Autocomplete extender show wrong layout. it mean that autocomplete extender not near textbox.

View 9 Replies

AJAX :: MaskedEditExtender - Using Mask With Number With Decimal Get The Wrong Initial Bind Value

Apr 26, 2010

I have confronted a problem of using MaskedEditExtender when try to restrict user to input a number mask with mask. User input of course has no problem. The problem is when the system get the value from database or somewhere (doing assignation), the textbox show the wrong value with the following mask setting: I am writing to contribute and share my solution: example:

textbox1: 1.1 (user input) by using the following mask:
<asp:MaskedEditExtender ID="meeXML" runat="server"
TargetControlID="textbox1"
Mask="999.99"
MessageValidatorTip="true"
OnFocusCssClass="MaskedEditFocus"
OnInvalidCssClass="MaskedEditError"
MaskType="Number"
InputDirection="RightToLeft"
AcceptNegative="Left"
ClearMaskOnLostFocus="True"
ErrorTooltipEnabled="True"/>
When the system get back the data, textbox1 will show:
textbox1: 0.11 <- that is not the actual what I want:
==========================================
the solution:
==========================================
<asp:MaskedEditExtender ID="meeXML" runat="server"
TargetControlID="textbox1"
Mask="NNNNNNNNNNNN"
MessageValidatorTip="true"
OnFocusCssClass="MaskedEditFocus"
OnInvalidCssClass="MaskedEditError"
MaskType="Number"
InputDirection="RightToLeft"
AcceptNegative="Left"
ClearMaskOnLostFocus="True"
Filtered="."
ErrorTooltipEnabled="True"/>

View 1 Replies







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