2008 Dec 05
1 of 910 | Hunting those elusive Public Folders using Exchange Web Services (Part 2) - In the first of these posts, we created a binding to the Exchange Web Services (EWS) and managed to hunt down our public folder identity. But, as we left it, we're now stuck with just the identity and not anything else. Really, we want the items from inside a given folder, and to do that we need to use the 'FindItems' API call..
FindItems needs a FolderId and of course the our old friend - the ExchangeServiceBinding (see part 1 for how to create that!). Once again, in a familiar pattern, we need to create a request, then evaluate the response. So, onto the request...
In this case we'll be using a FindItemType request, we need to define the Traversal, ItemShape, ParentFolderIds and Ite......
2008 Dec 04
2 of 910 | Events last week - Last week I attended a couple of events. On Wednesday Microsoft held a SOA/BPM day at the offices in Reading and a number of speakers talked about SOA, the Microsoft platform now and in the future and how to deliver the SOA promise using those technologies. It was a mix of stuff I already new or had seen before and some other perspectives. Darren Jefford gave a good demo on the new wave of cloud technologies. One interesting comment relayed something Don Box had said – that we are only 15 years into a 30 year journey on where Microsoft would like to be in terms of modelling and tools.
The jump to the cloud platform is the next step but the current suite of technologies we have seen are ver......
2008 Dec 03
3 of 910 | Confusing picture? -
Mike makes an interesting observation about the future of BAM in his post here. I think the scope for confusion and blurring is going to become wider than just BAM though. Microsoft are saying that the purpose of BizTalk is as the “Integration Server” in the jigsaw, while Dublin is the Application Server. Now you can imagine developers building fine grained services hosted inside Dublin and BizTalk providing both ESB and technology/protocol Integration services as well as orchestration but what about the common requirements like a Service Registry or a Rules Engine? UDDI 3.0 will ship with BizTalk 2009 (UDDI previously shipped with W2K3) and both BizTalk and WF have rules engines. As we m......
4 of 910 | What I hadn’t appreciated about schema versioning in BizTalk Server - Most people know that when processing a message through the XmlDisassembler, if not explicitly told which schema to use through configuration, the disassembler would try to resolve the correct schema based on the message’s root node and namespace. Most would also know, usually through the experience of getting it wrong so many times first, that if more than one assembly contains the same combination of root node and namespace for a schema, the receive pipeline, containing the disassembler, would fail with the error “Cannot locate document specification because multiple schemas matched the message type “<your message type here>”.” What some miss (ehm, ehm) is that this is not true ......
2008 Dec 02
5 of 910 | IBM XML Contest - While I am not always all that interested in IBM DB2 XML contests, this one interested me because I collect Rubick's cubes. I probably have 50 different cubes from 6 sided to a 12 sided puzzle that works on the same principles of the Cube.
Anyway, I may have to enter just to increase my chances of getting another Cube.
Check it out over here...you could win a 32GB iPod Touch!
http://antoniocangiano.com/2008/12/01/ibms-xml-challenge-lots-of-prizes-inside/
...
6 of 910 | Slides as promised - Here are the slides from the presentation I gave to the UK BizTalk User group (now the UK SOA/BPM group). I gave two sessions – firstly an overview of the work we had done at my current employer and then running through some code, configuration and live demos. The download location might change if I find a more suitable home.
The initial project was part of the Integration story in rolling out a global instance of SAP. The first interfaces we put live were those between the UK Warehouse Management Systems and SAP using BizTalk 2002. We formed an “Integration Competency Centre” and continued to wire up more systems as we moved to BizTalk 2004 and then to 2006. The move to 2004 was obviously......
2008 Dec 01
7 of 910 | Do we really need properties in C#? - Last week, I had a discussion with some friends about the new features in C# programming language. It is kind of interesting that for most of the new features, I always found myself start with some sort of reluctance and then gradually accept it and finally find myself couldn’t write code without it. When I started learning C# a few years ago, I didn’t even like properties (I was a big fun of java). I didn’t understand that if they are just getters and setters, why we were bothered to have properties and let the complier hiding the truth? But now, I can’t imagine how I can write program without them. In my discussion, I told my friends that now I so much prefer the syntax of counter.Count++......
8 of 910 | Dynamically creating types using reflection and setting properties using Reflection.Emit. - I came across a requirement where we needed to create types dynamically based on XML Configuration files, so that in the furture new types are required we dont need to update the application again by creating a new class. The additional requirement was to populate the property names of the class based on the Cml configuration and its values using the Querystring values from the HttpWebRequest. I earlier thought about using Dynamic methods from .NET Framework 2.0, but that did not fit my purpose since I didn't need to execute methods from the dynamic type that was created. So here is the code: I created three helper methods 1. Generates the AssemblyBuilder and Module Builder objects ......
9 of 910 | Hunting those elusive Public Folders using Exchange Web Services (Part 1) - Recently the Exchange server at work has been upgraded to an Exchange 2007 SP1 server. With this has come the chance to finally get rid of the MAPI CDO solutions we have, by switching to using Exchange Web Services (EWS).
I've spent quite a while looking for easy ways of doing this, and for the majority of the time, it seems ok, but the biggest issue I've had (and unfortunately the solution I needed) was accessing public folders. Specifically public folders in a hierarchy.
Public Folders\
\Testing
\Testing\Test 1\
\Testing\Test 2\
In all the examples I've seen, we can find folders, but, by and large - they all only work for the fir......
2008 Nov 29
10 of 910 | Testing WCF Service Apps (Part 2 of 4) - Previous posts: Part 0 of 4: Introduction Part 1 of 4: Testing the Service Testing the Client So far, I outlined how to test your WCF service. I simply took advantage or the WCF architecture and tested the service directly outside of the actual service harness. Now I need to set my sights on the client. This becomes a bit more difficult, but I wouldn't say that it is necessarily hard. I will start by giving a typical textbook example of hooking up to our service, and then I will tell you what is wrong with it. I will continue by modifying the code to be more testable so that the service can be mocked. A Textbook Example Most WCF tutorials and books have you start by a......
2008 Nov 28
11 of 910 | BizTalk: Receiving Multi Part Messages - I have been working on a BizTalk project for a while now and after a bumpy start all has been going well. The current message that we are dealing with is the receipt and processing of a Purchase Order. The processing and mapping of the purchase order to the SAP orders schema went well and all I need to do was to receive the document from the customer. After a bit of a delay in getting an accurate sample message, I set to work on creating a process for receiving a PO from a Ponton server. On examining the sample message I found I was going to need to deal with receiving a Multi Part message.
So I looked at the SDK and searched online but found very little guidance. The samples and discussio......
12 of 910 | Code smell – many usings -
Normal
0
false
false
false
EN-US
ZH-CN
X-NONE
MicrosoftInternetExplorer4
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:" ";
mso-padding-alt:0cm 5.4......
13 of 910 | Password in SOAP Ports - I've inherited a BizTalk 2006 applicaton that uses serveral SOAP ports to request data from a 3rd party web service. The web service is secured by "basic" authentication - username / password. After making a few enhancements to the application I deployed to an integration test server which has access to the 3rd party web service. The BizTalk app was unable to retrieve the data and I soon realised that I had forgotten to set the username / password on the SOAP send ports. I wanted the make deployment of the BizTalk app as automated as possible because I may not be present when it is deployed to the live server. I opened up the binding file, located the 1st of the problem SOAP send ports and ......
14 of 910 | Weird problems with document with only a root node - I ran into a strange issue the other day with BizTalk Server 2006 R2. Imagine a map (.btm file) that takes multiple messages as its input. Imagine two of those messages being of the same document type, having the same schema. Now... make the first message be normal, like this (this is an excerpt from the full multipart input message to the map):
<InputMessagePart_2> <ns4:stock_warehouse_fetch_response xmlns:ns4=http://StockWarehouse> <ns4:stock_warehouse stock_warehouse_id="170A9532-BD20-11DD-85B6-3DFC55D89593" company_id="1EBB0C44-BD20-11DD-9025-69FC55D89593" [... More attributes existed but have been removed t......
2008 Nov 27
15 of 910 | Increase the number of sessions in WCF - I got a problem on which was spent over two days in order to fix it. The discovery was that in the scenario: one WCF service application that for convinience is hosted in IIS and one WEB application that uses the WCF services the number of users was limited. So if the 11th user tried to access the application he was oblidged to wait an undetermined period of time(and in the end the log process was failing). The process started, first the idea was that maybe we were wrong in our layers, because of static methods used for our singletones and so on.
So really the problem is in WCF configuration, I didn't see it by googling my problem. Now I got it, so all you'll have to do in order to incre......
2008 Nov 26
16 of 910 | C# Parse(Grab) XML Feeds - I want to show you one of the simplest way to parse xml feeds that you want to grab from the site offering this functionality. For this we need only a DataSet, that will store the parsed data in his tables. So try for example the following code and you'll see what the dataset contains after execution:
DataSet ds = new DataSet();
ds.ReadXml("http://weather.yahooapis.com/forecastrss?p=MDXX0003&u=c", XmlReadMode.Auto);
And, what do you think? That's all you have to do! Pretty simple, yah!
...
17 of 910 | How-To: Enumerate the Internet Explorer Installed OpenSearch Engines - For my recent Launcher project, I was constructing a ribbon that would allow the user to search the web via their engines installed in Internet Explorer. The engines themselves are an XML document following the OpenSearch schema. For firefox, these xml documents just get stored locally. What does IE do with theirs? Well, IE sticks them in the registry. Why? Maybe someone else can answer that. Here's a brief look at how to get the search engines out of the registry. The following snippets of code come from the launcher project. If you want to see how I abstracted the engines and the complete code, you can download it from Codeplex. If you want to critique the code or make suggestions on how......
2008 Nov 25
18 of 910 | Configuring the Geneva Framework based STS to work with custom UserNamePasswordValidator - It took me a little while (and quite a bit of help from others on this thread) to get to a relatively simple implementation, so I thought I’d summarise the steps I’ve taken – At the risk of sounding the obvious I would definitely recommend making sure the overall STS scenario works well using windows authentication before changing it to support custom authentication. Once that’s done change the STS’ bindings’ clientCredentialType to UserName and the establishSecurityContext to false. <ws2007HttpBinding> <binding name="UserNameAuthentication"> <security mode="Message"> <message establishSecurityContext="false" clientCredentia......
19 of 910 | Testing WCF Service Apps (Part 1 of 4) - Previous posts: Part 0 of 4: Introduction Testing the Service Of the four posts, testing the service is by far the easiest. One of the most beautiful things about the WCF framework is the way it was designed to be more testable than ASPX services. When you design your WCF interface, you are mostly just designing an interface with the WCF ServiceContract attributes. The WCF framework uses your interface to determine the actual contract and transport mechanism so you don't have to. This is the key to testing WCF services: YOU DON'T HAVE TO WORRY ABOUT THE WCF FRAMEWORK. This means that you can simply instantiate your service directly and start calling public methods on it. You ne......
20 of 910 | XamlFest: WPF/Silverlight Tools - Both Snoop (WPF) and Silverlight Spy (Silverlight, obviously) allow you to connect to running processes and see what's going on inside them. Very powerful tools. With Silverlight Spy, you can see the contents of any Silverlight app... and reflect against them. The temptation with Silverlight is to put more code in the stateful .NET client, but the consequence is that your code is essentially available to the world. This also applies to any keys, passwords, etc that may be stored within your code. Time-sensitive encrypt keys from the server may be worth investigating as a means of protecting your secrets. Really, it drives home the point that you need to be cognizant of where you store yo......
2008 Nov 22
21 of 910 | [SharePoint Designer] CONDITION: If title field contains keywords -
The Condition: If title field contains keywords
How is it used?
When adding this condition to a workflow, the workflow checks if a specific field is in the specific library / list. If it is, the condition is true and thus, the actions are then implemented.
Example:
...
22 of 910 | [SharePoint] Out of the box Review and Feedback Collector -
SharePoint has an out of the box, collect feedback Workflow. Although that could be used most of the time, there is an option to create your own feedback workflow through wizards.
These are the steps one should follow:
Go to your document library you wish to use the customized feedback workflow
Click on Settings
Choose Document Library Settings
Then click on Workflow Settings under Permissions and Management Section
Click Add a workflow
Choose from the wizard according to what are you after.
Below is an example I made:
...
2008 Nov 21
23 of 910 | Parameters lost in SOAP Request - I started testing a BizTalk application today which calls a 3rd party service, passing a couple of datetime parameters, to retrieve a dataset which is then persisted to a SQL Server database. This application had been running well in production for a while but enhancements were required to make use of web methods recently made available by the 3rd party. After making the changes I tested the BTS application on my dev box, calling a stubbed web service installed locally. I then deployed the BizTalk app to an integration test environment that has connectivity to the 3rd party web service. On running the application I started to receive exceptions such as the following:
SoapException: Server ......
2008 Nov 19
24 of 910 | CallQueue: Implementing a Sequential Web Service Call Queue for AJAX application - In AJAX based applications its common that user might end up breaking your AJAX calls by clicking on numerous places in very short interval of time. Let us assume there is a page where there are several of hyperlinks which make WebService calls and do some stuffs on callback. If user clicks on five hyperlinks being impatient or may be just for fun, there will be five different WebService calls made. All of those calls had the same parameters or UI state while they were invoked. But on completion of one or more WebService calls it may happen that the UI state or data passed to the rest of the WebServices calls no longer exist or expired, thus will be result in inconsistent UI behaviour and/o......
25 of 910 | How to pass C# object to sql procedure? - I'll give a sample in TSQL:
Here is the TSQL statement for getting a Case object that was Xml serialized:
DECLARE @xmlCase XMLSET @xmlCase = '<case xsi="<a href=">http://www.w3.org/2001/XMLSchema-instance</a>"><id>3b98cf5a-6faa-dd11-9299-001e0b8014eb</id><court> <id>00000000-0000-0000-0000-000000000000</id> <courtregionid>00000000-0000-0000-0000-000000000000</courtregionid> </court><createdon>2008-11-07T13:54:44.727+02:00</createdon><assignedon nil="true"></case>';SELECT Cases.fields.value('(Id/text())[1]', 'UNIQUEIDENTIFIER') [Id_Cases], Cases.fields.value('(Court/Id/text())[1]', 'UNIQUEIDENTIFI......
26 of 910 | Senior Developer in OKC Needed - Being a user group leader (Bartlesville .NET User Group) I get a lot of messages for recruiters looking for jobs. Given the current market situation I like to pass these on. This one looks pretty interesting. If you are interested give Darbi a call and let him know I sent you: Know anyone (maybe you) who might be interested in the following position? It is located in Oklahoma City, Oklahoma. It is a direct hire position with a great company. If you are interested or know someone who is, send me a current resume in word format. THANKS!! Senior Developer in OKC .NET 2.0 Framework (ADO, ASP) Heavy experience with Web Services and SOA Web User Controls M......
27 of 910 | Testing WCF Service Apps (Part 0 of 4) - When you are writing automated tests for your application, it is important that the tests do not rely on the file system or external services. The only problem is that when you write applications using WCF, you are writing code that relies on external services. It is very tempting to create service references in your test DLL and test against them, but please refrain. There is a better way, I promise! This series will focus on testing every part of your application -- including round-trip functional tests -- without employing the WCF framework directly. We need to remember that the WCF framework is code that we do not control. We need to trust that it does what it claims to and focus ......
2008 Nov 18
28 of 910 | Failed to load web service proxy - I started work on a solution new to me this morning. The solution was currently in production and working fine. I had opened it up because enhancements were required to consume new web methods from a third party.
After getting the source files from the source control repository I had the usual problem of missing references to sort out. I then noticed that the solution contained a web service project with two set of web references; one pointing to the live url of the 3rd party and another pointing to a mock service on local host. My initial thought was that this was unnecessary and would confuse matters - why not just have one set of web references and set the runtime target URL in the S......
29 of 910 | List Does Not Exist - In working through an issue with workflow I stumbled across an interesting 'feature' of workflow and MOSS.
Essentially I have a "Project Sites" root web where I am creating child sites via a workflow:
Project Sites
Child Site 1
List 1
List 2
In these child sites I am creating some lists and setting alerts on them based upon things that happen in the workflow.
In attempting to create an alert on a list, I received a "List does not exist" error. In stepping through the code and inspecting all the objects everything seemed valid. SPList is a valid list in the site, SPUser is a valid user.
I went down the path of it being a security is......
30 of 910 | Log Web Service Call - When troubleshooting calls made via the BizTalk SOAP adapter I often find myself wanting to check the data that was posted to the web service. Adding the following to a test asmx page does the trick:
HttpContext.Current.Request.SaveAs("D:\\log_folder\Request_" + Guid.NewGuid().ToString() + ".txt", true);
Don't forget to grant access to the log_folder for the id that the web service runs under.
...
31 of 910 | Map Test Fails with 'Value cannot be null' -
I have a biztalk map which uses a custom XSLT file rather than the graphical mapper. This map makes use of methods held in a custom dll, accessing via a custom extension XML file.
I created this map a while ago, came back to it today (on a new vm) and found that I was unable to run a successful test - right click the btm in solution explorer and hit 'test map'. On trying this I was presented with a lengthy error message - the important bit being:
Value cannot be null.
Parameter name: extension
My first though was that the custom dll probably hadn't been gac'd on the new VM, so I remedied this. Still the problem persisted. The solution was to simply restart Visual Studio - it......
32 of 910 | MSI Import - Phantom Binding -
Had an error today when attempting to import a BizTalk MSI through the Admin Console. It was complaining that a particular adapter had not been configured to work with a particular host. Indeed this was true, however what puzzled me was that there was no refernce to this host in the binding file which had been added to the MSI.
After a fair amount of head scratching I tracked back to the orchestration that contained the logical port which matched to the physical port (SOAP) that was mentioned in the error message. It seems that the problem was caused by the fact that the binding on the logical port had been inadvertently set to 'Specify Now'. It seems that this cause a physical port t......
33 of 910 | My eye friendly Visual Studio dark theme - I am not sure about how you guys feel about your IDE look & feel. First few years it was alright for me. However the more I used Visual Studio, the more I experienced problem with my eyes as well as monotony of the same old white background IDE. So, I made a dark theme of Visual Studio which stopped hurting my eyes again. I also tried to keep the syntax yet readable and make careful selection of colors so that important IDE benefits of syntax highlighting was not overlooked. I also tried to avoid absolutely black background, because that demands your eyes to have extra attention to the text since they were prepared to see nothing. So I choose deep navy blue so that it does not hurt your......
34 of 910 | SSL Send Port -
Had to configure a send port today to post an XML message to a website secured over HTTPS. The send was failing, with the following being written to the even log:
"The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel."
This got me thinking that we must be missing the public key for the site but I was able to browse to it from Internet Explorer and could confirm that the key could be found in the expected certificates stores on the client (my) server.
In the end, the problem turned out to be caused by the fact that 'Enable chunked encoding' was enabled in the 'General' tab of the HTTP transport properties page for the send......
35 of 910 | Web service response -
I started developing a new BizTalk application today which must call an existing web service. Unfortunately I didn't have access to the web service from my test environment so I had to create a test stub. The web service method I needed accepted a string and returned an object containing an int and a bool. My first step was to examine the wsdl of the existing web service to get a good idea of the type my stub should be returning. Because the input / output parameters were simple it was only ten minutes or so before I was able to run my first test. I dropped a trigger file into a receive folder, this was picked up by my new orchestration and my test stub web service was called. Of course n......
36 of 910 | XSLT - if then else -
If you try and implement if then else logic in XSLT in the same way that you would in a procedural language then you'll probably end up tying yourself in knots.
I had some XSLT to write today where I simply needed to check the existance of an attribute in the source document. If it existed then I would execute and addition against the value else I would substitue for a zero.
I had initially approached this with something like:
<xsl:choose>
<xsl:when test="referenceToElemen/@attribute">
<xsl:variable name="x" select = "referenceToElemen/@attribute">
</xsl:when>
<xsl:otherwise>
<xsl:variable name="x">0</xsl:variable>
......
2008 Nov 17
37 of 910 | Tools Roundup 2008 - Here is a list of the tools and extensions which I have downloaded and enjoyed this year:
XML Notepad 2007 (Microsoft, free)
Tail 4.2.12
NUnit for Windows
WebServiceStudio/SoapBits
BizTalk ScheduleAdapter
Microsoft Enterprise Library 3.x
...
2008 Nov 15
38 of 910 | [SharePoint] [Visual Studio] Where do we use Rule Mechanics in SharePoint Workflows? -
There are mainly two situations where rules are used:
As a full ruleset on Policy activities
Rulesets are a set of rules
It is most of the time a business logic collection which is not related to the rest, and so it is kept in a set/unit by itself.
2. As conditions on activities
While
ConditionedActivity Group
Replicator
IfElseBranch
Reference taken from a Book - Workflow in the 2007 Microsoft Office System by David Mann
...
39 of 910 | Maximum Characters allowed in an xml element - Today I found that in BizTalk, there is a maximum limit for the number of characters that can be sent in an XML element. The limit is 50,000,000 chars.
...
40 of 910 | The Horse and the Stag -
AT ONE TIME the Horse had the plain entirely to himself. Then a Stag intruded into his domain and shared his pasture. The Horse, desiring to revenge himself on the stranger, asked a man if he were willing to help him in punishing the Stag. The man replied that if the Horse would receive a bit in his mouth and agree to carry him, he would contrive effective weapons against the Stag. The Horse consented and allowed the man to mount him. From that hour he found that instead of obtaining revenge on the Stag, he had enslaved himself to the service of man.
Aesop's lesson here is about the dangers of Lock In: once you choose a tool or platform, you've surrendered some control to that tool or......
41 of 910 | Ulterior Motive Lounge Episode 23: Girls Just Wanna Write Code -
In our last Episode, Linguist Coder and Prototype Analyst kidnapped The UML Guy and demanded he explain arrows in UML. After a rescue by the police, The UML Guy returns to the Lounge. (Click the picture for a larger image.)
This one is for Jennifer Marsman, who is quite possibly the second-most-fanatical UML geek that I know. She's also the creator of Featured Women in Technology, an ongoing series of profiles on women who shine in technology fields. Jennifer does her part to show young women that technology isn't an all-men's club. And boy, is she right! Besides her profiles of Dianne Marsh, Katy Kneale, Janet Galore, Carey Payette, Amity Binkert, and Lidiane Souza, I would add (o......
2008 Nov 14
42 of 910 | Client Perspective of Windows Azure Services Platform - Windows Azure was announced on PDC 2008 (Oct 27) and will hopefully be released mid next year. You probably already know about Azure by this time. If no, I would like to quote some from www.azure.com as intro: The Azure Services Platform is an internet-scale cloud computing and services platform hosted in Microsoft data centers. The Azure Services Platform provides a range of functionality to build applications that span from consumer web to enterprise scenarios and includes a cloud operating system and a set of developer services. Fully interoperable through the support of industry standards and web protocols such as REST and SOAP, you can use the Azure services individually or together, e......
43 of 910 | Getting Document Values from Repeating Nodes in BizTalk - To access a variable in a document in BizTalk is quite easy. First you go to the schema of the document and right click on the value you want to promote. Select Promote -> Show Promotions. To promote the variable as a distinguished property simply click the add button. If you messages are in a separate project make sure you build the solution before continuing. Accessing the promoted property in the orchestration is a simple process. Typing the message name, that represents the schema, in an expression shape. Intellisense will then guide you the rest of the way.
Now try that if the document variable that you require can have multiple values. As soon as you try to promote the field BizTa......
44 of 910 | Notes on Resolving BizTalk Connectivity Issues with Ponton clients - Notes on Resolving Connectivity Issues
During the first stage of the Integration project a number of challenges were encountered. Some of these obstacles could have been avoided but we chose to resolve them so that we would have a solid solution for further development.
Challenges Encountered
· Server 500 error when posting messages to customer with a static port configuration and document that worked for other customers.
· Ponton responds with an ‘Internal Storage’ Error.
· The dynamic port fails with either a 500 server error or a 204 (StatusDescription=No Content) server error.
Issue 1
After a lot of work and Microsoft’s help we tracked the first error down......
45 of 910 | The $64 String... - With apologies to the game show...
I was working on a cryptography project, and, without going into detail (it's SECRET, duh), I was having some issues. The other party sent me their test key in a text file, and it was Base64 encoded. Naturally, being the smart id10t that I am, I popped open my handy dandy, Base64 decoder site, decoded the string, and placed the string in the proper location for it to be used in the decoding process. Lo and behold the decryption process broke...because the key was too small!
In my investigation, it turns out that decoding it by any means other than Convert.FromBase64String() resulted in a byte array with only 31 bytes. Since a 256-bit key requires a 32-......
2008 Nov 13
46 of 910 | Asus R50A UMPC review - So, I got new branded Asus R50A UMPC for test. This ultra mobile machine with 5.6" WSVGA (1024x768) screen, based on Intel US15W chipset, comes with Intel Atom Z520 (1.33 Ghz, 533Mhz) processor, 1Gb of RAM and 20GB SSD. Also it has 3.5G mobile unit, integrated 802.11b/g network card and GPS. First impression was very cool. Slick design, big screen build in fingerprint reader. What in the box? Power adapter (110/220V), compact keyboard, bunch of cables, extra stilus and handling strap. What else this machine has? Microcard reader, three mini-usb sockets, one regular USB and camera. Looks like pretty fine machine, but not for $2K+ price tag. But who cares when we buy real good gad......
2008 Nov 12
47 of 910 | Singleton Design Pattern in C# -
/* The Singleton pattern assures that there is one and only one instance
of a class, and provides a global
point of access to it. There are any number of cases in programming
where you need to make sure that there can be one and only one
instance of a class. For example, your system can have only one
web service manager, or a single point of access to a
database.
The easiest way to make a class that can have only one instance is to
embed a static variable inside the class that A static
variable is one for which there is only one instance, no matter how
many instances there are of the class. To prevent instantiating the class
more than once, we make the constructor private so an......
48 of 910 | The begining.... - Welcome to the very first post of Under The Influence (of code). I am Software Design Engineer based in SF Bay area. I have a deep and keen interest in Computer Science and Software Engineering.
I've been wanting to start blogging for a long time now, but haven't been able to do so either due to schedule pressures an/or personal commitments and/or the lack of motivation thereof.
I tend to do a lot of code prototyping and recently I was in need to some stuff I had proptotyped a while back, I searched for nearly 2 hours in vain but was unable to find what I was looking for and this was motivation enough for me to start blogging and have a personal diary of code I have written and or ......
2008 Nov 11
49 of 910 | Understand SharePoint Permissions - Check these really good articles by James Tsai.
Understand SharePoint Permissions - Part 1. SPBasePermissions in Hex, Decimal and Binary - The Basics
Understand SharePoint Permissions - Part 2. Check SharePoint user/group permissions with Permissions web service and JavaScript
Thanks Suranja for sending me these links.
...
50 of 910 | using using (free connection) - Considure the following code: public static DataSet GetCity() { SqlConnection connection = GetConnection(); SqlDataAdapter adataper = new SqlDataAdapter("select * from City", connection); DataSet City = new DataSet(); adataper.Fill(City, "City"); return City; } This function loads the city table from the database to a dataset, the problem with code is: 1. connection object and adapter object both had a Dispose method but it's not executed, 2. close connection method is not executed. Why it's good to execute the Dispose method? The Dispose method usually realese unmanaged resources (resources that Garbage collector doesn't clear without class finilizer), So why not letting t......