|
Anonymous posting is allowed. We will try to reply to your posts as soon as possible. Another members are encouraged to reply to new users.
If you specify your email in the posted message, it will be masked. You will receive notification when someone replies to your post.
NOTE: we are slowly moving interesting forum posts to our Knowledge base so if you see posts deleted - you know where to find them.
|
| Forums -> wodVPN -> Unable to Connect |
|
Reply |
New topic
|
| |
Yaser
Delphi 6 Programmer
Postings: 19
New member
|
|
23-07-2010 11:17 |
Hello, Can someone please tell me why I am unable to connect ? Here is my code: Location 1 ---------- procedure TForm1.FormActivate(Sender: TObject); begin With (WodVPNCom1) Do BEGIN RetryWait := 1000 ; RetryCount := 0 ; MyID := 'Location1' ; Password := 'First' ; Start(0) ; END ; end; procedure TForm1.Button1Click(Sender: TObject); begin With (WodVPNCom1) Do Search(SrchUDPSingle, 'Location2', 'mediator.weonlydo.com', 8000) ; end; procedure TForm1.wodVPNCom1SearchDone(Sender: TObject; var IP: OleVariant; Port, ErrorCode: Integer; var ErrorText: OleVariant); begin If (ErrorCode <> 0) Then ShowMessage('Error Code: ' + IntToStr(ErrorCode) + ' Error Text:' + ErrorText) Else BEGIN With (WodVPNCom1) Do Connect1(IP, Port) ; END ; end; procedure TForm1.wodVPNCom1Connected(Sender: TObject; var PeerID, IP: OleVariant; Port: Integer); begin ShowMessage('CONNECTED') ; end; Location 2 ---------- procedure TForm1.FormActivate(Sender: TObject); begin With (WodVPNCom1) Do BEGIN RetryWait := 1000 ; RetryCount := 0 ; MyID := 'Location2' ; Password := 'First' ; Start(0) ; END ; end; procedure TForm1.Button1Click(Sender: TObject); begin With (WodVPNCom1) Do Search(SrchUDPSingle, 'Location1', 'mediator.weonlydo.com', 8000) ; end; procedure TForm1.wodVPNCom1SearchDone(Sender: TObject; var IP: OleVariant; Port, ErrorCode: Integer; var ErrorText: OleVariant); begin If (ErrorCode <> 0) Then ShowMessage('Error Code: ' + IntToStr(ErrorCode) + ' Error Text:' + ErrorText) Else BEGIN With (WodVPNCom1) Do Connect1(IP, Port) ; END ; end; procedure TForm1.wodVPNCom1Connected(Sender: TObject; var PeerID, IP: OleVariant; Port: Integer); begin ShowMessage('CONNECTED') ; end; This is written in Delphi 6. When I click the Search button on both machines, I get the ShowMessage from the OnSearchDone event. However the ErrorText looks like a well formatted IP Address. Thank you
|
| Reply with quote |
| |
wodDamir
Support
Postings: 1044
Moderator
|
|
23-07-2010 11:28 |
Yaser, I can't tell without seeing the actual error. Can you please show me the exact error returned thru ErrorText / ErrorCode? Also, did you click Search on both clients at the same time? One more thing, did you try compiling our sample, and trying it out on these machines? Regards, Damba
____________________________________
____________________________________ WeOnlyDo! Software - Internet Security Components -----=== http://www.weonlydo.com ===-----
|
| Reply with quote |
| |
Yaser
Delphi 6 Programmer
Postings: 19
New member
|
|
23-07-2010 11:47 |
Quote: Yaser, I can't tell without seeing the actual error. Can you please show me the exact error returned thru ErrorText / ErrorCode? Also, did you click Search on both clients at the same time? One more thing, did you try compiling our sample, and trying it out on these machines? Regards, Damba
Hello Damba, No I did not click Search at the same time. But it is 4-5 seconds apart. Will that make a difference ? Secondly, in the real world, it is highly unlikely 2 computers will click Search at the same exact moment, so how does one resolve this issue? Error Code:1428 Error Text: 10.0.0.20 Thanks Yaser
|
| Reply with quote |
| |
wodDamir
Support
Postings: 1044
Moderator
|
|
23-07-2010 13:10 |
Yaser, Is that our sample, or your own code? Can you try the sample? If that doesn't work, can you please send me the source code, so I could try duplicating this on my side? You can send a sample to Regards, Damba
____________________________________
____________________________________ WeOnlyDo! Software - Internet Security Components -----=== http://www.weonlydo.com ===-----
|
| Reply with quote |
| |
Yaser
Delphi 6 Programmer
Postings: 19
New member
|
|
23-07-2010 16:48 |
Quote: Yaser, Is that our sample, or your own code? Can you try the sample? If that doesn't work, can you please send me the source code, so I could try duplicating this on my side? You can send a sample to Regards, Damba
Hello Damba, This is my source code that I provided. I put location 1 code on one machine and location 2 code on another machine. However, since I am using COM I am wondering if I have to include the LicenseKey property to make it work ? Also the sample code (simple1) always times out. Thanks Yaser
|
| Reply with quote |
| |
woddrazen
WeOnlyDo! Technical support
Postings: 1067
Moderator
|
|
23-07-2010 17:51 |
Yaser, Yes you must use LicenseKey Property for COM version. Please add it at beginning of your wodVPN code. More help you can fin here: http://www.weonlydo.com/VPN/Help/Technical.html Also if you are using Delphi 6, wodVPN parameters inside Events is not listed in correct order. So you need to change that inside WODVPNCOMLib_TLB.pas file. You can send us email to and we can send you changed WODVPNCOMLib_TLB.pas file that should work. That will probably fix your problem. I just try this out and 1. Simple sample works as expected. Drazen
____________________________________
WeOnlyDo! Software - Internet Security Components -----=== http://www.weonlydo.com ===-----
|
| Reply with quote |
| |
Yaser
Delphi 6 Programmer
Postings: 19
New member
|
|
25-07-2010 04:04 |
Quote: Yaser, Yes you must use LicenseKey Property for COM version. Please add it at beginning of your wodVPN code. More help you can fin here: http://www.weonlydo.com/VPN/Help/Technical.html Also if you are using Delphi 6, wodVPN parameters inside Events is not listed in correct order. So you need to change that inside WODVPNCOMLib_TLB.pas file. You can send us email to and we can send you changed WODVPNCOMLib_TLB.pas file that should work. That will probably fix your problem. I just try this out and 1. Simple sample works as expected. Drazen
Hello can u please tell me if your mediator is running ? Drazzel and Damba I left u 3 messages on my open ticket. Also Drazzel, the project1.exe that u sent me and as working yesterday without any problem is no longer working  I can think it must be the mediator. As I mentioned in my emails, the OnSearchEvent is never fired. Thank you Yaser
|
| Reply with quote |
| |
Yaser
Delphi 6 Programmer
Postings: 19
New member
|
|
25-07-2010 05:44 |
Quote: [quote]Yaser, Yes you must use LicenseKey Property for COM version. Please add it at beginning of your wodVPN code. More help you can fin here: http://www.weonlydo.com/VPN/Help/Technical.html Also if you are using Delphi 6, wodVPN parameters inside Events is not listed in correct order. So you need to change that inside WODVPNCOMLib_TLB.pas file. You can send us email to and we can send you changed WODVPNCOMLib_TLB.pas file that should work. That will probably fix your problem. I just try this out and 1. Simple sample works as expected. Drazen
Hello can u please tell me if your mediator is running ? Drazzel and Damba I left u 3 messages on my open ticket. Also Drazzel, the project1.exe that u sent me and as working yesterday without any problem is no longer working  I can think it must be the mediator. As I mentioned in my emails, the OnSearchEvent is never fired. Thank you Yaser[/quote] Hello, I figured out why the OnSearchEvent was not getting called. I had set RetryCount to Zero. I set it to 30 seconds and now the OnSearhEvent does fire. ErrorCode returns back 1460 -----> Timeout When the project Drazzel had sent me, it connected immedietly. Why the reason for the timeout ?? The license key is correct and is entered inside the code before the Start(0) method. Thank you Yaser
|
| Reply with quote |
| |
|
|
|
|