Hi guys,
I've been trying to make a flash email app with flash remoting and asp.net
but it keeps giving me the following error when i run it:
The "SendUsing" configuration value is invalid.
My flash app consists of 4 input textboxes -- From, to, subject and
message -- and 1 submit button. I've placed the following actionscript in
the 1st frame of the main timeline:
//////////////////////////////////code/////////////////////////////////////////////
#include "NetServices.as"
gwUrl = "http://localhost/test/gateway.aspx"
NetServices.setDefaultGatewayUrl(gwUrl);
conn = NetServices.createGatewayConnection();
res = new Object();
res.onResult = function( result )
{
_root.result_txt.text = result;}
res.onStatus = function( status )
{
_root.result_txt.text = status.description;
}
svr = conn.getService( "test" );
submit_btn.onRelease = function()
{
_root.svr.SendEmail( res, from_txt.text, to_txt.text, sbj_txt.text,
body_txt.text );
}
/////////////////////////////////////////////////////////////////////////////////////
Then, I've created a asp.net which handles the user's inputs. The codes is
as below:
//////////////////////////////////codes///////////////////////////////////////
<%@ Page Language="VB" Debug="true" %>
<%@ Register TagPrefix="MM" Namespace="FlashGateWay" Assembly="flashgateway"
%>
<%@ import Namespace="System.Web.Mail" %>
<script runat="server">
Sub Page_Load( Sender as Object, E as EventArgs )
If Not Page.IsPostBack Then
Dim TheMailMessage as New MailMessage
Dim TheMailConnection as SmtpMail
Dim fromStr as String
Dim toStr as String
Dim sbjStr as String
Dim bdyStr as String
If flash.Params.Count > 0 Then
fromStr = flash.Params(0).ToString()
toStr = flash.Params(1).ToString()
sbjStr = flash.Params(2).ToString()
bdyStr = flash.Params(3).ToString()
TheMailMessage.From = fromStr
TheMailMessage.To = toStr
TheMailMessage.Subject = sbjStr
TheMailMessage.Body = bdyStr
TheMailConnection.Send(TheMailMessage)
flash.Result = fromStr & " " & toStr & " " & sbjStr & " " &
bdyStr
End If
End If
End Sub
</script>
<html>
<head>
</head>
<body>
<form runat="server">
<MM:Flash id="flash" runat="server" />
</form>
</body>
</html>
//////////////////////////////////////////////////////////////////////////////////////
I have absolutely no idea what's wrong with my program. This is urgent...pls
help.Thanks in advance.