I have a question though about calling ASP.NET assemblies. They are not working
in VB, but they do for C#. My employer is an ASP.NET VB shop and not a C# shop.
I am trying to get them to purchase Flash Remoting for .NET. We really want to
call assemblies, but they need to work in VB. Can you shed some light on this
or point me in the right direction? I have placed my dlls in the
localhost/flashremoting/bin directory and my flash is in
localhost/flashremoting directory. The error I get with calling the VB assembly
is this ? ?No Such Service VBFlashRemoting.EchoTests.EchoClass with function
EchoString?.
Any help would be appreciated.
Here is what I have going on.
---------------------------------
VB Code
---------------------------------
Imports System
Imports FlashGateway.IO
Namespace VBFlashRemoting.EchoTests
Public Class EchoClass
Public Function EchoClass()
'construct
End Function
Public Function EchoString(ByRef s As String) As String
Return s
End Function
End Class
End Namespace
---------------------------------
C# Code
---------------------------------
using System;
using FlashGateway.IO;
namespace FlashRemoting.EchoTests
{
public class EchoClass
{
public EchoClass()
{
// constructor
}
public string EchoString(string s)
{
return s;
}
}
}
---------------------------------
The flash code is
---------------------------------
_global.style.setStyle("themeColor", "haloBlue")
_global.style.setStyle("fontSize",12);
_global.style.setStyle("fontFamily" , "Verdana");
//import the ActionScript classes
#include "NetServices.as"
#include "NetDebug.as"
//get a reference to the ASPX-based service
if (inited == null)
{
inited = true;
NetServices.setDefaultGatewayUrl("http://localhost/flashremoting/gateway.aspx")
;
gatewayConnnection = NetServices.createGatewayConnection();
//--------call to the C# dll ---- THIS WORKS
// testAssembly = "FlashRemoting.EchoTests.EchoClass";
//--------call to the VB dll ---- THIS ERRORS
testAssembly = "VBFlashRemoting.EchoTests.EchoClass";
callAssembly = gatewayConnnection.getService(testAssembly, this);
}
callAssembly.EchoString("all your base belong to us");
function EchoString_Result(result)
{
test.text = result;
}
function EchoString_Status(error)
{
test.text = error.description;
}
stop();
jevgi - 17 Sep 2004 20:39 GMT
Please look thru
http://livedocs.macromedia.com/flashremoting/mx/Using_Flash_Remoting_MX/usingFRN
ET6.htm
I'm looking for working VB code for server side of flash remoting. I'll have
to develop in a while. If it helps you, please post some easy example.
Thank you, Eugene.