Sending data to and receiving data from a resource identified by a URI thru WebClient

 

As I have posted on msforums.ph about using a System.Net.WebClient to "Post" a Collection instead of posting this string postData = "client_id=" + 318 + "&tracking_id=" + 2000 thru HttpWebRequest. You can use this:

 
   1:  //Declare your Name-value Collection
   2:  System.Collections.Specialized.NameValueCollection objCollectionToPost = new NameValueCollection(2);
   3:   
   4:  //populate your collection
   5:   objCollectionToPost.Add(“client_id”, 318);
   6:   objCollectionToPost.Add(“tracking_id”, 2000);
   7:   
   8:  //Instantiate  your System.Net.WebClient
   9:  WebClient objClient = new WebClient();
  10:  objClient.BaseAddress = “https:/payment.example.com/gateway”; 
  11:   
  12:  //To capture the response, you may use a byte[ array or a long string, your implementation
  13:  //would depend on what you think is the response will be
  14:  // for this instance I will use a byte array (you will notice why siguro at the end)
  15:   
  16:  Byte objResponseCollection;
  17:   
  18:  //This is the actual posting, you would notice that when you UploadValues to the 
  19:  objResponseCollection = objClient.UploadValues(objClient.BaseAddress, "POST", objCollectionToPost);
  20:   
  21:  //since most likely it would be a length of bytes, and I know from the documentation of your payment
  22:   
  23:  //gateway, that this will be a “Comma Delimited” string, I will process it as follows
  24:   
  25:  String objRetValues;
  26:  objRetValues = System.Text.Encoding.ASCII.GetString(objResponseCollection).Split(",".ToCharArray());
 
When you post WebClient usually returns the response of the payment gateway. 
The response is usually a long string that you need to split into a specified delimiter. 
In my example I already know that the gateway will return a "Comma Delimited" String based on the documentation I got from the payment provider.
 
For more info on WebClient go to msdn: http://msdn.microsoft.com/en-us/library/system.net.webclient(VS.80).aspx
 
 
 
 
 

MCPD – Web Developer

Its finally there! Its on the transcript! Yey!

Last October 29, I took the exam 70-547: http://www.microsoft.com/learning/en/us/exams/70-547.mspx and I got a passing score (phew!) Well that was really really hard!

 

My strategy for this exam is based on the preparation guide of the exam it self, so quoting Microsoft Learning:

Candidates should have worked in the following phases of the application life cycle:

  • Technical envisioning and planning
  • Design and development
  • Stabilizing and releasing

If you are taking this soon, I would suggest that you focus on these topics:

  • Exception handling
  • SQL and Data Topics
  • Authorization and Impersonation
  • The usual master page and theme questions
  • Validator controls
  • Testing and Deployment

 

Thanks also to my Boss 😛 for getting us this wonderful reference books from Microsoft Press! This book is still available at amazon.com.

Deploying Remote Programs using Window Server 2008 Terminal Services

Thank you for attending the Makati Technet Session:  Deploying Remote Programs Using Windows Server 2008 last July 24, 2008!

Final checking of slides (OC moments) while Mr. Elczar P. Adame is presenting a brief introduction to Microsoft Infrastructure Optimization 

   

   

Thanks again to all that attended and to Jeo, Elczar, Eugene and to the core members of PHIWUG for this event!

no {frills}

Thanks for attending the Philippine {heroes} community launch event last June 7, 2008 at Microsoft Philippines.

 

 

Here are some of the links that I have used on my presentation for this event:

Windows Server 2008 Management : http://www.microsoft.com/windowsserver2008/en/us/server-management.aspx

PowerShell FAQ: http://www.microsoft.com/windowsserver2008/en/us/powershell-faq.aspx

MSDN Powershell blog : http://blogs.msdn.com/powershell/

PowerShell Remoting Home on Codeplex : http://www.codeplex.com/powershellremoting

IIS administration thru PowerShell : http://blogs.iis.net/tobintitus/archive/2006/11/30/powershell-and-microsoft-web-administration.aspx

PowerShell For Fun for more sample scripts and How-Tos: http://mshforfun.blogspot.com/

Windows PowerShell 1.0 Installation Package for Windows Vista : http://www.microsoft.com/downloads/details.aspx?familyid=C6EF4735-C7DE-46A2-997A-EA58FDFCBA63&displaylang=en

 

Again, thanks for attending! I’ll see ya again on other events!

Genesis Release 2.5

By Michael L. Coleman

In The Beginning the Project Manager created the Programming Staff. The Programming Staff was without form and structure. And the Project Manager said, "Let there be Organization"; and there was Organization. And the Project Manager saw that Organization was good; and the Project Manager separated the workers from the supervisors, and he called the supervisors — "Management", and he called the workers — "Exempt".

And the Project Manager said, "Let there be a mission in the midst of the Organization, and let it separate the workers, one from another." And the Project Manager created the mission and he called it — "The System". And the Project Manager separated those who were to benefit from The System from those who were to build it. And he called the former — "Users", and he called the latter — "Programmers".

And the Project Manager said, "Let all the Programmers in the Organization be gathered together into one place, and let a Chief Programmer be brought to lead them." And it was so. And the Project Manager saw that he was competent.

And the Project Manager said unto the Chief Programmer, "Create for me a schedule, so that I may look upon the schedule and know the Due Date." And the Chief Programmer went among his staff and consulted with them. And the  staff was divided into two parts; one part was called — "Analysts", and the other part was called "Application Programmers". And the Analysts went back to their desks and estimated, as was their custom. And it came to pass that each Analyst brought his estimate to the Chief Programmer, whereupon he collected them, summarized them, and drew a PERT Chart.

And the Chief Programmer went unto the Project Manager and presented to him the estimate, saying, "It shall take ten months." And the Project Manager was not pleased and said, "I have brought you up from the depths of the staff; you have not grasped the ‘Big Picture’." And the Project Manager hired consultants, and authorized overtime, and he said to the Chief Programmer, "Behold, see all that I have done! The Due Date will be in five months." The Chief Programmer was much impressed and went from before the Project Manager and proceeded to implement The System.

And the Chief Programmer sent his Analysts to the users and said, "Let Specifications be written." And there were meetings, and luncheons, and telephone calls. And the Specifications were written. And there was a Payday and the Happy Hour, one month. 

And the Chief Programmer examined the Specifications and saw that they were too ambitious. And he separated the mandatory features from the optional features; and he called the mandatory features — "Requirements", and he called the optional features — "Deferred", and the Users called him names. And the Chief Programmer gave the Specifications to the Analysts and said, "Let the Requirements be analyzed and let the Files be designed." And it was so. And the Chief Programmer said, "Let the Software Houses put forth their Salesmen, and let us have a Data Management System." And it was so. The Software Houses brought forth all manner of Salesmen who presented their packages, and claimed wondrous things for them, each according to his own file structure. And it came to pass that a Data Management System was selected; and the Chief Programmer saw that it was good. And there was a Payday and the Happy Hour, a second month.

 

And the Chief Programmer said, "Let the systems be divided into parts, and let each part be called a ‘Module’. And let programming teams be formed and let each be assigned to write a Module". And it was so. And the Chief Programmer created the programming teams with two levels, a greater and a lesser; and he called the greater the "Senior Programmers", and he called the lesser the "Junior Programmers". And he gave the greater dominion over the lesser. And the Chief Programmer saw it was good. And the Junior Programmers saw it differently. And there was a Payday and the Happy Hour, a third month.

And the Chief Programmer said, "Let the programming be started and let much overtime be consumed, for there is but two months left." And the Programmers, both the Senior and the Junior, were much afraid, and they strove to please the Chief Programmer. And they flowcharted, and they coded, each in his own fashion. And the Chief Programmer looked upon the work and liked it not. And the Chief Programmer said, "Let there be a Standard"; and there was a Standard. And the Programmers looked upon the Standard and liked it not. And there was a Payday and the Happy Hour, a forth month.

And the Chief Programmer said, "Let there be Progress Reports, so we can monitor and control"; and there were Progress Reports. And the Chief Programmer looked upon the Progress Reports and saw that the Due Date was not to be met. And the Chief Programmer arose, pressed his suit, shaved his beard, and went unto the Project Manager, and groveled. And the Chief Programmer pointed his fingers, and caused Blame to issue forth upon all manner of creatures who sold Hardware and Software. And the Chief Programmer asked for an Extension.

And the Project Manager was exceedingly angry, and cast doubts upon the Chief Programmer’s ancestry; and uttered a multitude of threats. But it came to pass that an Extension was granted; and the Chief Programmer took the Extension back to the programming teams, and there was much rejoicing. And the programming of the Modules was completed. And there was a Payday and the Happy Hour, a fifth month.

And the Chief Programmer said, "Let the Modules be integrated, one with another, so that System Testing may begin." And it was so. Two by two, the Modules were integrated, one with another. And great difficulties were experienced, and many hours of overtime were used, and many cups of coffee were consumed. And it came to pass that System Testing was completed. And there was a Payday and the Happy Hour, a sixth month.

Then the Chief Programmer did go to the Project Manager and said unto him, "Behold, I bring you good tidings, of a great joy which will come to all the Users; for on this day The System is completed." And suddenly there was with them a multitude of users praising the Chief Programmer and saying, "Glory be to The System in the highest, but can you make this one small change?" 

MCTS : Net Framework 2.0 – Web Applications

Uhuh, After months and months of practice and reviews!

Sharing my strategy on this leg of exams, I first took the exam 70-528 : Microsoft® .NET Framework 2.0 – Web-based Client Development last May 12, 2008 and roughly two months later I was ready to take on exam 70-536 : Microsoft® .NET Framework 2.0 – Application Development Foundation (July 07, 2008). I took 528 first because I am really a Web Guy 😀 and my first ever MCP exam is exam 70-305 Developing and Implementing Web Applications with Microsoft® Visual Basic® .NET and Microsoft® Visual Studio® .NET which I took February 27, 2008.

Certification exam titles are a mouthful huh?  Yeah! You even have to pass both 528 and 536 exam to have the MCTS certification. Depending on your strategy on how you would schedule the two exam, you may opt to take 528 first then the 536 or the other way around. You may just have to focus on the topics and what I did was structure the topics where-in overlapping topics as much as possible be reviewed once then the specifics should be on the initial and final review.

Thanks to my boss (again) for buying the Microsoft Press books in amazon 😀 Thanks thanks!

http://www.amazon.com/gp/product/0735622779/sr=1-1/qid=1156801743/ref=sr_1_1/104-6313703-3867159?ie=UTF8&s=books

http://www.amazon.com/gp/product/0735623341/sr=1-1/qid=1156801743/ref=sr_1_1/104-6313703-3867159?ie=UTF8&s=books

Not just for this exam but also for reference. Its like having a specific MSDN topic on my bookshelf 😀