Posts

write Logs into Windows Event in C#

Here is the code you can use; /// /// It manages logging policy. /// use app.config of the dll to clarify debug.print logging will be used. /// default value = true /// /// caller Application Name /// Log Name /// localhost /// use additional Debug.Print Logs, every time logging occur public AdvanceLogging(string strSourceName, string strLogName, string strMachineName, bool useDebugPrint) { Microsoft.Win32.RegistryKey registrykeyLM = null; Microsoft.Win32.RegistryKey registrykeyEventlog = null; Microsoft.Win32.RegistryKey registrykeyKey = null; try { //--- Check to see that event log name exists, if so... if (System.Diagnostics.EventLog.Exists(StrLogName)) { //--- Check to see if the source exists, if not... if (!System.Diagnostics.EventLog.So

An Error occured while creating EventSource, The Source and Log properties must be matched, or you may set Log to the empty string

If you get " The source 'xxx SourceName' is not registered in log 'xxx LogName'. (It is registered in log 'Application'.) " The Source and Log properties must be matched, or you may set Log to the empty string, and it will automatically be matched to the Source property. " while calling System.Diagnostics.EventLog.CreateEventSource with sourceName and LogName params,Just check registry whether SourceName is not registered in any other LogName(s). Verify LogName and SourceName in the Operationg Sytem is unique via REGEDIT; HKLM\System\CurrentControlSet\services\eventlog\ | ... if it is defined previously, you can not create . You must delete or change SourceName. regards, P.S:Please do not hesitate to share your comments.

importing unicode text records into Oracle 10G(11G)

if you wanna import data file(s) obtaining from seperate data source with known schema to oracle database.You can use sqlldr prompt command in any Oracle Client.You can also create specific file to define exported data maps such as comma or tab seperation with column,namely blablabla.ctl included some commands that will be executed by sqlldr.exe basic sample of control file: file name : tableName.ctl file inside: load data infile 'c:\tableName.txt' into table tableName fields terminated by " " optionally enclosed by '"' (column1,column2,column3,....) use sqlldr in command prompt like that; C:\Documents and Settings\sfssrvadmin>sqlldr db_username/db_password@SOURCED B control='E:\PhysicalDirectory\Sub_Directory\tableName.ctl' ERRORS=200 regards, P.S:Please do not hesitate to share your comments.

How to add/Update Web Page or Web Service to BizTalk 2006 as a resource.

1- Open a command prompt as follows: Click Start , click Run , type cmd , and then click OK . Type the following command, substituting the appropriate values, as described in the following table: 2 -BTSTask AddResource [/ ApplicationName: value ] /Type: System.BizTalk:WebDirectory [ /Overwrite ] /Source: value [ /Destination: value ] [ /Server: value ] [ /Database: value ] Example: BTSTask AddResource /ApplicationName:MyApplication /Type: System.BizTalk:WebDirectory /Overwrite /Source:http://Host1:90/MyVirtualDirectory /Destination:http://Host2:90/MyVirtualDirectory /Server:MyDatabaseServer /Database:BizTalkMgmtDb ( ref : http://msdn.microsoft.com/en-us/library/aa577889(BTS.20).aspx ) regards,

Access to the temp directory is denied in IIS 7

Image
Hi, if you face "Access to the temp directory is denied. Identity 'IIS APPPOOL\ASP.NET V2.0' under which XmlSerializer is running does not have sufficient permission to access the temp directory. CodeDom will use the user account the process is using to do the..." while loading a web page.Please check settings of ApplicationPool identity. here is a screen shot; best of luck...

uninstall Oracle11g products from Windows Vista/7 family

Hi, You may not uninstall oracle product in 11g version from windows vista family both x32 and x64.The main reason is based on some new features come from new Windows familiy.One of them is a new Administrator right.You should run any program with administrator right for administrative purpose by right-mouse clicking and select 'run as Administrator'.If not, applications may not execute properly. Anyway if you want to uninstall any oracle from system ,Follow the step: 1-open Command prompt (Start> run> cmd.exe,right mouse click and select 'Run As Administrator') 2-Go to home directory of de-installation programs from ' C:\Windows\system32>' . (if you do not have follow link : http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html ) 3-set home path of un-installing product 4-execute deinstall with parameter of uninstalled products home directory 5-you will be asked for Windows and .Net de-configuration to verify.I say Yes b

ODP(Oracle Data Provider) Entity Framework and LINQ to Entities Installation Instructions, Setup, and Notes

Image
Hi All, I would like to share my experience of using Microsoft Entity Framework with Oracle Database.The main goal is using advance .Net Data Driven Architecture in Oracle. You can create Entity Data Model (EDM) from existing Oracle Database Schema by Entity Data Model Wizard or run LINQ query against database or call stored procedure . Oracle releases beta version of ODAC 11.2.0.2.30 (follow http://www.oracle.com/technetwork/topics/dotnet/downloads/odacefbetainstallinstructions-302527.html if the url is out-of-the date please ask google.com :)).This provider supports Microsoft Visual Studio 2010 with SP1. You can download and install easily.There is no serious problem during installation or integrating with Visual Studio Family.Just verify that C:\app\user>\product\11.2.0\client_ \Oracle.Key file has correct value.(ex path; C:\app\MuhammetATALAY\product\11.2.0\client_2) Here is step by step instruction: 1- Add New ADO.NET Entity Dta Model by right click project - Add - New Item 2-