ASP .NET Session

by alocurto Email

Link: http://msdn.microsoft.com/en-us/magazine/cc300437.aspx

I deployed a multi-user web application today and for some reason the session was being SHARED between users. Not sure what is causing this. It was a simple application that only needed the session for some non-confidential data so I just threw them into a cookie for now. I am across this interesting link that has some good information so I figured I would post it:

http://msdn.microsoft.com/en-us/magazine/cc300437.aspx

General Acquisition Client

by alocurto Email

Link: http://www.scribestation.com

I have been getting a lot of requests with people looking to remove the stroke data (X&Y) from the pen. I am currently writing and releasing an acquisition client that will be available at www.scribestation.com and allow users of the LiveScribe Pulse to easily access their stroke and image data on their pen.

I also have plans to expose an API that will allow your applications to work with the XML data.

I plan to have this site released within a month.... so hang in there!

Thanks for all your support, comments and feedback!

-Anthony

Microsoft.Ink COM Error

by alocurto Email

I was working with Ink and deploying my assemblies all over the place. Eventually I deployed to a win2k3 server and it starting throwing:

Creating an instance of the COM component with CLSID {AAC46A37-9229-4FC0-8CCE-4497569BF4D1} from the IClassFactory failed due to the following error: 80040235

To resolve this, I went to:

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=080184dd-5e92-4464-b907-10762e9f918b

And downloaded the Microsoft Windows XP Tablet PC Edition 2005 Recognizer Pack. Install that and you will no longer get that error.

Hope that helps, would have saved me 4 hours :-)

SQL 2005 and XML Data Type

by alocurto Email

I was just working with the new XML datatype for SQL 2005 and started getting this error when inserting the value:

XML parsing: line 1, character 45, unable to switch the encoding

I was simply sending a string to a stored proc thinking that would work (it was a string of valid XML)... I was wrong. I did some research and solved the problem by wrapping up the XML String into a SQL XML datatype.

System.Data.SqlTypes.SqlXml xmlSafe = new System.Data.SqlTypes.SqlXml(new System.Xml.XmlTextReader(xmlAsString, System.Xml.XmlNodeType.Document, null));

Sure, it's simple enough but I haven't used the XML type before.

Exploring the AFD File

by alocurto Email

Having extracted the AFD file from the pen in a previous post I started poking around the contents of it. I then started looking through the LiveScribe desktop DLLs for methods that would help me in getting data out. My goal in this whole exploration of the AFD is to get stroke data off the pen and I managed to find that in the AFD file. I created a C# project and added the following references to "C:\Program Files\Livescribe\Livescribe Desktop\LS.Desktop.AFDDB.dll". Once you add that reference to the project, you can get the stroke contents of the AFD file like so:


LS.Desktop.AFDDB.LSDocument doc = LS.Desktop.AFDDB.LSDocument.LoadDocument("YOURPATHHERE.AFD");

//Check for strokes
if (doc.HasStrokes(0))
{
Console.WriteLine("Has Strokes!");

//Go through each page
for (int pageno = 0; pageno < doc.pageInstances.Count; pageno++)
{
Console.WriteLine(string.Format("Page No {0}", pageno));

//Go through each stroke
for (int strokeno = 0; strokeno < doc.pageInstances[pageno].NumStrokes; strokeno++)
{
Console.WriteLine(string.Format("\tStroke No {0}", strokeno));

//Go through the points
foreach (Point p in doc.pageInstances[pageno].GetStroke(strokeno).Points)
{
Console.WriteLine(string.Format("\t\t({0}, {1})", p.X, p.Y));
}
}
}
}
else
{
Console.WriteLine("No Strokes!");
}

You can use that object to get other things too. If you have any questions or need help just send me an e-mail or post a comment. I would be glad to assist.

-Anthony

1 2 3 >>