write to event log from web site project

DanielL

New Member
i am trying to write an error in web site project to windows event viewer logbut with no luck..i tried to add another project within the website that contains function to write to event logand reference it in the website project.if i hit the using keyword in the page cs file the other project is not shownis it the right way to do this..? if so: in the aspx page code behind i should use System.configuration and every time i want to write to event viewer then i have to call the method in the class i referenced to deal with it?i want something like this:\[code\]try{..}catch(Exception ex){ writeToLogFunction(exception source, exception name, exception description);}\[/code\]is this is the right approach ? i never dealt with it before and appreciate any walk through \ example ..Thanks in advanced.
 
Back
Top