This project is read-only.

how to gather connection logs while connecting and while connected

Aug 18, 2010 at 5:52 AM


can i have all the connection logs in order for user to troubleshoot his/her connection problems.

i mean error messages, authentication process messages and everything else could say log?

Aug 18, 2010 at 7:23 AM

First let me say, DotRas doesn't hide anything during the connection process. If something unexpected is returned from the API call it will throw an exception indicating what the RAS error code and error message are. You can always test the connection manually through Windows to help diagnose the problem.

If you want access to the states during a connection attempt, you can use the StateChanged event on the RasDialer. The DialCompleted event will also return the result of a connection attempt once the connection attempt has completed. The only requirement to using these events is you must use the DialAsync method to initiate asynchronous dialing. Synchronous dialing through the component does not allow events to be raised due to a limitation with the Windows RAS API. Other than the RAS logs (which I don't remember how to turn them on), that's all you have access to. I vaguely remember something about Rasman being involved with enabling RAS error logging.