Tags » .NET Framework

Ultimate Word Component for .NET and Silverlight

ComponentPro has introduced many new products and some of them turn out to be a huge hit in several platforms. ComponentPro has come up with Ultimate Word Component for .NET and Silverlight that is known has a high performance code that is highly reliable in its functionalities. 349 more words


some short forms

I saw in my teaching career, students can not understand the actual meaning of lot of short-form or extension of dot net framework. Today I’m discussing the meaning of some of the short form like, 41 more words


Second Level Cache Beta-2 for EntityFramework 6.1+ shipped

When I published the Beta version of EFCache back in May I intentionally did not call it Beta-1 since at that time I did not plan to ship Beta-2. 269 more words

Entity Framework

PowerShell Objects Part 1: No More Parsing!

One of the first things to know about PowerShell in order to wield it effectively is its object-based paradigm. If you are trying to parse strings in PowerShell scripts, it’s likely that there is a better way. 720 more words


Microsoft might finally be committing to open source

Microsoft is known for keeping its programming secrets to itself. But under CEO Satya Nadella, the maker of proprietary behemoths like Windows and Microsoft Office is starting to show up in the world of open-source software, whose code is public for anyone to see, borrow from and tinker with. 369 more words

Blog migrado para o Azure

Boa noite, pessoal!! Tudo certo?

Estou passando para avisar que acabei de migrar o blog para o azure, segue o link http://wenndersantos.azurewebsites.net/

Porque fiz isso? Boa pergunta, sei lá. 43 more words

.NET Framework

Serialize and Deserialize InfoPath form and extract the attachment using WebClient in C#


Suppose this is our InfoPath form

First we will generate the class for the above InfoPath form


The sample code

myFields invoice = null;
WebClient webclient = new WebClient();
webclient.UseDefaultCredentials = true;

using (Stream fileStream = webclient.OpenRead("http://server:5000/formlibrary/FirstForm.xml?NoRedirect=true"))
if (fileStream != null)
XmlTextReader reader = new XmlTextReader(fileStream);


XmlSerializer xser = new XmlSerializer(typeof(myFields));
myFields invoiceInfopath = (myFields)xser.Deserialize(reader);
byte[] b = invoiceInfopath.field2;

// filename
int nameBufferLen = b * 2;
byte[] fileNameBufffer = new Byte;

for (int i = 0; i < nameBufferLen; i++)
fileNameBufffer[i] = b;

char[] charFileName = UnicodeEncoding.Unicode.GetChars(fileNameBufffer);
string fileName = new string(charFileName);
fileName = fileName.Substring(0, fileName.Length - 1);

// attchment
byte[] fileContent = new byte;

for (int i = 0; i < fileContent.Length; i++)
fileContent[i] = b;

FileStream fs = new FileStream(@"C:\test\" + fileName, FileMode.Create);
fs.Write(fileContent, 0, fileContent.Length);

… 11 more words