Sharing my daily challenges with all fellow developers so they can avoid issues that I had. Issues related to .Net framework development.
Wednesday, November 21, 2012
Tuesday, November 20, 2012
Friday, November 16, 2012
Thursday, November 15, 2012
Wednesday, November 14, 2012
Thursday, November 01, 2012
Friday, February 10, 2012
Friday, March 25, 2011
Monday, February 21, 2011
Wednesday, July 28, 2010
Thursday, June 24, 2010
Tuesday, June 22, 2010
Monday, June 21, 2010
adwards
Hello, and welcome to Google AdWords. We're excited to have you on board! There's just a few details we need from you to set up your account.
To begin creating your AdWords account, choose the user name and password you'd like to use with AdWords.
Thursday, June 17, 2010
this is my fake post!
Tuesday, April 27, 2010
Thursday, April 08, 2010
spartans
There are few sounds in this world more satisfying than the sound of a ping pong ball landing in a Solo cup.
Beirut or Beer Pong, as it known for short, requires minute precision and impeccable hand-eye coordination.
It also requires teamwork (it's a two-on-two game and you need both people to pull their weight to accomplish the sought-after "sendback"), strategy (the question of "to bounce, or not to bounce") and an unyielding commitment to excellence, many of the virtues espoused at Michigan State University.
msu
Garden Mount: 60 inches long- pushes into the ground
Roof Mount: 15 inches long- conforms to roof pitch
Post Mount: 15 inches long- attaches to any vertical surface with a 3 x 3 inch mount plate
Deck Mount: 15 inches long- attaches to any horizontal surface with a 3 x 3 inch mounting plate
test 1
Is it unethical to harness the crazy the internet has to offer by purposely seeking out the psychos? I'm not talking scary psychos, though for a girl looking for a guy, the line is much finer than a m4w, I'd say. So this is more conjecture and less an actual plan on my part. I just can't help thinking it's a shame the power of these crazies won't be able to make me laugh as much as i deserve.
I recently signed up for OkCupid, though immediately realized I have no place there, and don't want to meet anyone. I have plenty of good friends and am not looking for a boyfriend. I don't even like people I don't already know, so I pretty much ignore it. But i do check in every once in a while for curiosity's sake. A few days ago i received a note from someone calling himself Pete1. Here goes (prepare gag reflex):
As I Pluck you down from your tree out of my reach 12
I would savor your flavor just like a ripe peach. 12
Want to walk hand in hand with you across the beach. 12
So many lessons in love I'd like you to teach. 12
You say that you were working so hard at your school, 12
As I wipe off my chin overflowing with drool, 12
Your pictures responsible; this nat'(u)ral event, 12
Know all of this is true; that what I said I meant. 12
What I said was genuine, I wipe off the glob 12
Because it is my heart that you've have managed to rob. 12
Remain convinced that you're act-u-lee a burglar, 12
Still really want to take you out for a burger. 12
I know there is more to you than read-uh-lee seen, 12
As my waking thoughts are plagued with you in my dreams12
It is for only you that this here song is sung, 12
I really want to massage; your lips with my tounge. 12
Out of my mouth; with all of the things that I had said, 12
This insane balding man; who is out of his head. 12
Hope I kept your int-rest with this here little poem, 12
And within your eyes fine-a-lee find a new home. 12
Uh. User blocked, obv. But I just went back to the email message because I couldn't help wanting to get to the end of the poem. In order to do that I had to go onto his profile and unblock him.
Wednesday, April 07, 2010

The data that was hacked across computers in India and Indian mission abroad also included sensitive data regarding the Maoist and Naxalite movement in the country, India’s ties with Russia and Middle East and information on Indian missile systems. The hackers also got hold of Dali Lama’s
The data that was hacked across computers in India and Indian mission abroad also included sensitive data regarding the Maoist and Naxalite movement in the country, India’s ties with Russia and Middle East and information on Indian missile systems. The hackers also got hold of Dali Lama’s
Monday, March 29, 2010
Wednesday, March 17, 2010
Tuesday, March 16, 2010
Thursday, March 11, 2010
Wednesday, March 10, 2010
Monday, March 01, 2010
Friday, July 17, 2009
so you upgraded from VS2005 or VS2008 to VS 2010 and you do not like the code view, meaning the font for the code in the new version looks weired and not clear?
a simple change to the options will set the font to the same font you used to see in previous versions of vs.net
basically the new visual studio 2010 uses the font called "Consolas", while the older version 2008 used the font, "Courier New", simply in visual studio .net 2010, go to Tool --> Options --> Environment --> Fonts and Colors and then on the right hand side change the font from "Consolas" to "Courier New".
screen shot is below:

you can see some Ron's code here!
Friday, March 20, 2009
There are always a bad way to do things and a good way to do it, I was reminded with that today after fighting with issues related to FtpWebRequest class !
I want to focus my article today about the how to specifically call the "GetRequestStream" method of the "FTPWebRequest" class. If you are not aware of the usage of this method, basically you use it to start writing to a buffer stream to upload a file from a source to a destination server. The following is the BAD DO NOT ATTEMP way of calling this method: I have highlighted the bad code in red below:
//Create a FTP Request Object and Specfiy a Complete Path
FtpWebRequest reqObj = (FtpWebRequest)WebRequest.Create(_completeFTPPath);
//Call A FileUpload Method of FTP Request Object
reqObj.Method = WebRequestMethods.Ftp.UploadFile;
//do not keep the connection after uploading the file
reqObj.KeepAlive = false;
//If you want to access Resourse Protected You need to give User Name and PWD
reqObj.Credentials = new NetworkCredential("username here", "password here");
//FileStream object read file from Local Drive
byte[] buffer = File.ReadAllBytes(_localUploadFullPath);
reqObj.Proxy = null;
reqObj.GetRequestStream().Write(buffer, 0, buffer.Length);
reqObj = null;
why this is bad: couple of things:
1- it cause the uploaded file to "keep writing" into the stream without finishing file upload!
2- on the receiving end, the inetinfo.exe "locks" the file and you cannot do anything with the file (which is not complete anyway) until you either kill inetinfo.exe or let it release the file after few minutes.
Below is the right way to do it:
Stream s = reqObj.GetRequestStream();
s.Write(buffer, 0, buffer.Length);
s.Close();
so we created a stream object that we can really control, once you get the stream back, you can write to it, and then call the close method to release the resources associated with ftp.
this is it, it's a small trick but it save you a lot on debugging and falling into a big trab.
Tuesday, March 10, 2009
In a SSIS package I created couple of days ago, I was trying to minimize the number of connection strings / objects in the package so that I can have less "values to configure" in the SSIS package config files.
In the package, I had a single OLEDB connection in the connection managers window, and I did the infamous access of the connection inside the scipt task hoping I can reuse, the error I got was:
"Unable to cast COM object of type 'System.__ComObject' to class type 'System.Data.OleDb.OleDbConnection'."
so I did some search and found this thread from technet
http://social.technet.microsoft.com/Forums/en-US/sqlintegrationservices/thread/7d9b3a46-9f90-4886-8a25-acabaf5d6a3f/
read the last post:
"Correct, if you want to use the connection object in a script, it must be ADO.NET, not OLE-DB, so that means two for you. The alternative is what the other posted attempted, using the connection string from an OLE-DB connection, to initialise a .NET connection object, but with the limitation of no password. if you use only integrated security it is a poissible solution."
So, I belive integration of connections between the package and the child scipt task still needs some work on the microsoft side. because now you have to either create two connections, one of type OLEDB and one of type ADO.Net, which will cause two config values in the ssis config file.
Or do it like what I did:
I created a package variable to hold the connection string and then I create my own object in the script task from this connection string, not that straightforward but the best I can do now.
happy ssis programming!
-Tamer
Thursday, March 05, 2009
Hi all ! I have been playing with SSIS for the last few weeks. The package I was building was sophisticated and I had to reuse some of the code that I had in other .net library projects.
In SSIS Script Task, to reference an external library, you need to add the library to the GAC so it can find the binary at runtime. If you go that route, you will have to add a strong key to the existing library, right? will that's what I did, and it did not take me that long to figure out that created problems for me ! here is a simple example:
1- .net Projects 1 references Library Lib1, no strong keys, and dll of Lib1 is moved along with Project 1 when I do a complie.
2- SSIS needs to reference the library. So I add strong key to Lib1, recompile, and add to GAC.
3- now SSIS is happy.
4- Project 1 now does not have a copy of the DLL, visual studio automatically does not include Lib1 in Builds because you are not supposed to call it this way now, you need to move how you call Lib1 to the GAC way.
5- once Lib1 added to the GAK, and once you add a reference to the GAC assemply in the app.config, Project 1 will work again.
The question is, what if you do not have just one Project 1? what if you have 10 projects that reference Lib1, are you going to change all of them because of SSIS, hell no, I will not personally do that! ,,,
Easiest route is to find a way to directly use the code from Lib1 in SSIS script task, in my case Lib1 code was available so it was easy copy couple of .cs classes to the Script Task in the SSIS package, and Boom, I immediatly removed the reference to Lib1 from SSIS, and lived my life without strong keys / GAC stuff...
if you have a different way of doing it, let's know!!
Monday, March 02, 2009
I was working today on a SSIS project using Business Intelligence Development Studio 2008 and I created a script task with vb.net as the default language. Then add some code and references to .net dlls.
Close the task, did something in the package, then I went back to the Script task and things disappeared, so I was upset for a moment there because of lost code. So I tried to add the reference again to my dll and it gave the message:
"no template information found. See the application log in Event Viewer for more details".
opened event viewer and found the following error in the application log:
The global template information is out of date. Regenerate the templates by running 'VSTA.exe /installvstemplates' or reinstalling the application.
I tried both:
1- ran VSTA.exe /installvstemplates and devenv.exe /installvstemplates: did not solve the issue
2- un/re installed VS.net 2008, did not do it either.
so I thought I may try to drop in a Script Task that is in a diff language, so I tried C# and adding reference in the VSA worked great ! so somthing looks corrupt on my side now with vb.net inside VSA. will tackle this issue later but at least I can get back to development to recover lost hours :)..
have a good working day!!
Sunday, February 22, 2009
sometimes you run into issues when trying to add a .net assemply to the GAC, especially when there are so many command options for the gacutil command.
You need the assemply to be strongly type, you use the "sn" command for that (from the dot net sdk command prompt).
To create a strong name key in visual studio, Open up the project in vs.net, and click on the project properties, go to the Signing Tab (6th at the bottom), and check the check box called "Sign the assemply", then choose "New" from the drop down. this will create a strong name key and also assign it to the assemply, now recompile the project, and then open windows explorer where the assemply is located, copy the location of the assemply, and then open a vs sdk command prompt, type in:
gacutil -i yourDLLName.dll
and you are set !!
happy programming!