Import Google Contacts – ASP.NET
January 27, 2011 by taxi · Leave a Comment
How can we download our google address book to some local DB, file etc? One of the coolest things google has provided for developers is the Google Data API for integration of user and google applications. And for importing google contacts, firstly we need to download Google Data API and install them to get the [...]
Cloud Computing – ASP.NET
January 26, 2011 by Nauman · Leave a Comment
Following are some of pros and cons for Cloud Computing Architecture for ASP.NET: Advantages: Cost cutting More storage for Data. Mobilitiy of Data Easy Disaster Recovery Disadvantages Implementation of session Implementation of authentication Migration of existing application
SqlBulkCopy – Bulk Insertion in SQL Server from .NET
November 5, 2009 by Nauman · Leave a Comment
Many a times there come a scenario when you have to insert large number of records in sql server. There are number of ways to implement this scenario: through looping techniques to call insert statements for one record at a time. Serialize the data in CSV or XML format and send them as a parameter [...]
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154
November 3, 2009 by Nauman · 14 Comments
Sometimes when working with office Interop assemblies the above mentioned error occurs. I had also got the same when using Microsoft Excel interop assembly and adding its reference in my ASP.NET application. The problem is that by default when Microsoft Excel is used as a COM object then it can only be [...]
Registering an Assembly through code
November 3, 2009 by Nauman · Leave a Comment
Many times we have to register an assembly and only one thing came in mind "regasm" command line utility. But for this also we have to manually type this command and it parameters (assembly name) in command prompt, or we can use the Process class in .NET to call regasm executable, and run through .NET, [...]
Register an assembly through a setup project
November 3, 2009 by Nauman · Leave a Comment
In your setup project, make sure you selected the option to add an assembly and not the option to add a file. After you add the assembly, select it in the view pane and open the Properties dialog. The "Register" property should have a drop down list of the available registration options for the assembly. [...]
Uploading a file using libcurl.net
November 1, 2009 by Nauman · 3 Comments
Following is the code to upload a file to a ftp server through libCurl.NET library. using System; usingSystem.IO; usingSeasideResearch.LibCurlNet; class Upload { public static void Main( String [] args) { try { Curl .GlobalInit(( int ) CURLinitFlag .CURL_GLOBAL_ALL); FileStream fs = new FileStream ( "D:/123.txt" , FileMode .Open, FileAccess .Read, FileShare .Read); Easy easy = [...]
Debugging Stored Procedures in SQL Serrver 2005
November 1, 2009 by Nauman · Leave a Comment
Pre-requisites 1. Find the .exe file under the directory, C:\Program Files\Microsoft SQL Server\90\Shared\1033\rdbgsetup.exe or similar path where the SQL Server was installed. The file rdbgsetup.exe stands for ‘RemoteDeBuGsetup’. Look for the emphasis on letters. The filename reads rdbgsetup because, we are going to debug a stored procedures of a database available in some remote physical [...]
Add an entry to event log in C#
October 31, 2009 by Nauman · 2 Comments
EventLog is a good place to write your applications log. Here is an example to show how to do this: If ( !EventLog.SourceExists("TestCategory")) EventLog.CreateEventSource("TestCategory","TestLog"); EventLog evtLog = new EventLog(); evtLog.Source = "TestCategory"; evtLog.WriteEntry("This is a test log.",EventLogEntryType.Information); First of all there is a check if the category exists. If not it will be created. Then [...]