Showing posts with label difficulty. Show all posts
Showing posts with label difficulty. Show all posts

Wednesday, March 28, 2012

Difficulty in calling web service

Hi all,

The web service which am trying to call takes two string and three array as parameters.am able to call the web service through ajaxpro.dll, but through ajax framework1.0 its not coming. the service returns response class object..pls help me out.

In .aspx page

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

<asp:ScriptManagerID="ScriptManager1"runat="server">

<Services>

<asp:ServiceReferencePath="http://localhost/progressTrack21/ManageProgressTracking.asmx"/>

</Services>

<Scripts>

<asp:ScriptReferencePath="trackingScript.js"/>

</Scripts>

</asp:ScriptManager>

<inputid="Button1"type="button"value="Click here"onclick="funProgress();return false;"/>

In trackingscript.js file

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

function funProgress()

{

debugger;

Sys.Net.WebServiceProxy.invoke("http://localhost/progressTrack21/ManageProgressTracking.asmx","Update",false,{"UserId1":"1","PlanId1":"1","SCOId1":scoid,"ElementName1":EleName,"Value1":EleName},SucceededCallback);

}

function SucceededCallback(result, eventArgs)

{

var RsltElem = document.getElementById("Results1");

alert(result);

}

Are you getting any javascript error ??, because in your function you are directly accessing the results elements

function SucceededCallback(result, eventArgs)

{

var RsltElem = document.getElementById('<%=Results1.ClientID%>');

alert(result);

}


Hi, You do not have to call the WebServiceProxy.invoke. Instead the Ajax Framework generates a JavaScript Proxy class which represents the Server Side Web Service.

For Example if Your WebService Name is DataService and if it contains a method FetchData(), then the JavaScript class will also contain a DataService class with the FetchData Method. You can find the more info from the following links:

http://ajax.asp.net/docs/tutorials/ConsumingWebServicesWithAJAXTutorial.aspx
http://ajax.asp.net/docs/tutorials/ExposingWebServicesToAJAXTutorial.aspx


It is giving internal server error(500)....I tried in all possible ways...


Thank u Kazi,,,,

Difficulty building site after ajax install.

I'm having some trouble with my first AJAX experience namely in the build/publish part. F5 build on VS server works fine only when I want to Publish the application to ready for deployment I get this error underneath. Looked at couple message boards but its not clear me. I've also tried aspnet_regsql without any affect. Does anyone have any idea whether this is AJAX related and how I can solve to build the project? greatly appreciated.

-- Build started: Project: D:\...\Application1\, Configuration: Debug .NET --

Index was outside the bounds of the array.

-- Skipped Publish: Project D:\...\Application1\, Configuration: Debug .NET --

just wanted to add something... if choose Build> Rebuild Webiste instead of publish if gives me 33 warning messages saying

"Could not find schema information for the element 'webServices' and all other elements I've added from the AJAX template.

The template version works fine. Don't see why this should make a difference. Default webserver runs work fine.

Arrgg


just wanted to add something... if choose Build> Rebuild Webiste instead of publish if gives me 33 warning messages saying

"Could not find schema information for the element 'webServices' and all other elements I've added from the AJAX template.

The template version works fine. Don't see why this should make a difference. Default webserver runs work fine.

Arrgg this is cracking my head as I can't find much info on it.

Difficulty After Install. Missing JavaScripts?

Greetings everyone --

I'm investigating Atlas because I have need to drag-n-drop between up to four zones on a single page. Each time I drag an element from one zone to another, it has to persist that action to the database in real time. So I've installed the Atlas framework, but I can't get anything to work at all.

For example, I've created a web project referencing the Microsoft.Web.Atlas.dll along with a page called "Example.aspx". Into that page I copied the source code for the following example on atlas.asp.net.

http://atlas.asp.net/docs/util/srcview.aspx?path=~/atlas/samples/controls/control5.src

When I build and call the webpage, I see the content rendered by the HTML but there's nothing at all related to AJAX/Atlas functionality on the page. My hypothesis is that the appropriate Javascript files are not being referenced correctly, or they haven't been copied to the right place.

I've tried to copy the ScriptLibrary\Release directory to my local web directory but that didn't work. I had no luck either when trying to specify that the ScriptManager should load an explicitly referenced Javascript file like so:

<atlas:ScriptManagerrunat="server"ID="ScriptManager1">

<Scripts>

<atlas:ScriptReferencePath="~/ScriptLibrary/AtlasUIDragDrop.js"ScriptName="custom"/> </Scripts></atlas:ScriptManager>

At this point I'm stuck which is unfortunate 'cause I'd like to use this library given that the rest of the project is .NET. Seems like a good fit. And obviously there are people out there who've gotten this to work, but I'm at a loss.

Any suggestions? Thanks.

hello.

well, i you check the source of the page on the browser, you'll surelly see several "webresource.axd?..." entries. one or more of these should load the script files on the page.


Luis -- Yes, I do see those references when I "View Source". An example is below. However, still no Atlas functionality.

<script src="http://pics.10026.com/?src=/Atlas2/WebResource.axd?d=G9ZZO75SJS72S3-g1JZzk6TyxaOlDwXjSdR4wGRZm45lxhgXFD31v2NV1yxSd_CZ1dUM9aPflYprd8NUj4GeyW2dnZ4TxHWva8leh6b5bPQ1&t=632799165960000000" type="text/javascript"></script>

I wonder...could it be that the .axd extension isn't mapped to the appropriate dll or exe in IIS? I found that when I used the Atlas template in Visual Studio to create a new Atlas Web Site the template doesn't map the .aspx extension to the aspnet_isapi.dll -- which is kind of annoying. Perhaps I better check this hunch.

Trevor


That IS indeed what it was. I had to map the .axd extension to the aspnet_isapi.dll and now the example works.

It's my view that the "Atlas Web Site" template in Visual Studio should set all this up itself -- especially if you specifyhttp://localhost/blahblahblah for your project location.

OK, on to the next thing.

Trevor


hello.

well, in fact, it's an asp.net 2.0 installation issue. if you installed asp.net 2.0 and configured your server to use it, that extension should already be mapped to that dll...