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?