all groups > macromedia flash flash remoting > december 2006 >
You're in the

macromedia flash flash remoting

group:

flash remoting problem


flash remoting problem sudheer_uh
12/18/2006 8:40:51 PM
macromedia flash flash remoting:
Hi all,

I want to use flash remoting in my web project. So I downloaded the test
version of flash remoting for .Net and was testing it. The code i was testing
was basic. I was sending some string from my c# class library to flash and
displaying it in a text box(flash textbox). It used to work fine before but
when i try to access the same today, i get an error "Service not found". I was
wondering what might be the reason.
I dont think that this is becoz the test version is expired becoz it should
generate some other message.

My c# class library
---------------------
using System;
using System.Collections.Generic;
using System.Text;
using FlashGateway.IO;

namespace FlashRemoting.FlashTest1
{
public class TestClass1
{
public string TestFunc1()
{
return "hi ";
}
}
}

Flash file:
-----------

import mx.remoting.*;

if (inited == null)
{
inited = true;
NetServices.setDefaultGatewayUrl("http://xx.x.../flashremoting/gateway.aspx");
serviceConnection = NetServices.createGatewayConnection();
serviceObject = serviceConnection.getService("FlashTest1.TestClass1", this);
button1.addEventListener("click",button_Clicked);
}

function button_Clicked()
{
//service function call to the remote service
serviceObject.TestFunc1();
}
//if the service function is successful, the _Result function of the same name
//executes
function TestFunc1_Result(result)
{
messageDisplay.text = result;
}
//if the service function is unsucessful, the _Status function of the same
name
//executes
function TestFunc1_Status(result)
{
messageDisplay.text = error.description;
messageDisplay.text+=result.description;
}

Error I got:
-----------
undefinedNo Such Service

Any ideas?
Re: flash remoting problem ross1000
1/15/2007 4:26:53 PM
AddThis Social Bookmark Button