• MikroTik.com
  • RouterBOARD
  • User Meeting
  • Training
  • User Manual
  • Support
  • Downloads
  • Videos
Register |   * Login | HOME

View unanswered posts | View active topics

C Sharp, C# API is not working on my system.  Page 1 of 1
 [ 4 posts ]  Post new topic This topic is locked, you cannot edit posts or make further replies.
  Print view Previous topic | Next topic 
Author Message
nherdogan
 Post subject: C Sharp, C# API is not working on my system.
PostPosted: Wed Dec 30, 2009 12:51 pm 
Offline
just joined

Joined: Wed Dec 30, 2009 12:35 pm
Posts: 7
Karma: 0
Hey all,

I simply trying to do some work using C# API, on .NET project with Visual Studio 2008.

On my project, i am successfully connectiong to Miktorik with port and IP adress, but when i try to login, project is freezing on some particular point. I run it on debug mode, and saw this:


public List<string> Read()
{
List<string> output = new List<string>();
string o = "";
byte[] tmp = new byte[4];
long count;
while (true)
{
tmp[3] = (byte)connection.ReadByte(); // <--- Thats where projects freezing.


At this point of project, system is keep waiting to read any byte forever. no error messages, nothing.

What am i doing wrong? Is that a coding mistake, or some kind of misconnection between my pc and the router?

Thanks for all your help,


Top
 Profile  
 
nherdogan
 Post subject: Re: C Sharp, C# API is not working on my system.
PostPosted: Thu Dec 31, 2009 10:29 am 
Offline
just joined

Joined: Wed Dec 30, 2009 12:35 pm
Posts: 7
Karma: 0
At least can you make a guess about the problem is in codes or the installation of the Mikrotik device?


Top
 Profile  
 
nherdogan
 Post subject: Re: C Sharp, C# API is not working on my system.
PostPosted: Thu Dec 31, 2009 2:21 pm 
Offline
just joined

Joined: Wed Dec 30, 2009 12:35 pm
Posts: 7
Karma: 0
I solved it.

The problem was, i gave the wrong port number, 8291, instead of the API port 8728.
And the port wasnt opened on Winbox.

I was expected from Mikrotik Administrators to solve this problem very easily like our support team. I knew it was something easy, and yet not any administrator replied me.


Top
 Profile  
 
janisk
 Post subject: Re: C Sharp, C# API is not working on my system.
PostPosted: Mon Jan 04, 2010 3:02 pm 
Offline
MikroTik Support
MikroTik Support
User avatar

Joined: Tue Feb 14, 2006 9:46 am
Posts: 4865
Karma: 38

Location: Riga, Latvia
that is user generated content, there might be some problems with that code. If you encounter problems, please see respective thread in the forum about that implementation and write it there.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  Page 1 of 1
 [ 4 posts ] 

Board index » RouterOS » Scripting

All times are UTC + 2 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Karma functions powered by Karma MOD © 2007, 2009 m157y