How to integrate mikrotik router with asp.net website? - asp.net-mvc

I want to make a web application which will automate the ISP's bill through payment gateway and connect with mikrotik router. So that if any user doesn't pay in time, his connection will automatically stop.
I have no idea about mikrotic router's datbase. Pease give me an idea how I can implement this. Is there any plugin available in asp.net?

RouterOS dose have an API, the documentation is a little too technical to be helpful https://wiki.mikrotik.com/wiki/API. But there is a .NET C# library that looks like its maintained and easy enough to use. https://github.com/danikf/tik4net
Your site would have to run some scripts at a set time to update router settings though the API such as disable accounts if there is not a valid payment for a select time period. You could also return use information if that is something you keep track of each time the customer opens the portal or at your set time to update your ASP database.

You can't use asp files directly on RouterOS, as RouterOS embedded web server is very simple (no ASP/PHP/etc interpreter). You have to
install hotspot package on RouterOS
configure hotspot (several detailed examples in mikrotik wiki, for example http://wiki.mikrotik.com/wiki/Hotspot_server_setup)
RouterOS will create a bunch of files to handle the hotspot clients, like login.html. From this point you will have a working hotspot.
If you want to handle external database, php and other fancy stuff, you will have to follow this direction: http://wiki.mikrotik.com/wiki/HotSpot_external_login_page

Related

Quickbook Desktop Development Basics

I've been asked to develop some software for a friend who has a business that he manages using Quickbooks Desktop. I don't have Quickbooks Desktop, and I'm not quite sure how to get started. I've read the docs for about a week now and can't seem to figure out the first step.
From what I've read, it seems like maybe the Quickbooks application starts a web server and mine application will be issuing HTTP requests against that web server ? It would be nice if I didn't have to have the Quickbooks application to do this development; is there a way to read the data file itself ? Does it cost money to develop software that uses this API ?
It looks like I would probably like to use the V2 XML protocol for what I'm trying to do which is: retrieve checks and deposits, make a monthly summary, format that summary according to his specifications, and create a PDF of the statement.
From what I've read, it seems like maybe the Quickbooks application
starts a web server and mine application will be issuing HTTP requests
against that web server ?
That's one possible way to implement things.
If you give more detail about specifically what you're trying to do (what programming language? what version of QuickBooks?) you'll probably get better recommendations than that route.
It would be nice if I didn't have to have the Quickbooks application
to do this development; is there a way to read the data file itself ?
You will have to have QuickBooks, there's no way to read the raw datafile.
It's cheap on Amazon - buy it there.
Does it cost money to develop software that uses this API ?
There are no charges while developing, and for one-off/custom/in-house integrations like you're talking about, there are no charges at all.
It looks like I would probably like to use the V2 XML protocol for what I'm trying to do which is:
Be aware that v2 and v3 is technically only for SaaS applications (e.g. you have to be reselling this as an app, and allowing many people to connect their QuickBooks to your app).
According to Intuit, you should be using the SDK.

Uploading MVC site to server

I've built an .NET MVC4 website using C#, and now I want to upload it to the internet.
I've never uploaded any website so I don't really know what steps I need to do.
Does it matter what kind of server to use, because when I run the website through VS2012 I can see it runs with IIS express, but then I realized there are several kinds of servers, like apache. Do I need specific kind of server?
And what about domain? what is the difference between domain and server.
Thanks.
You will need IIS for running .NET applications. Apache is more suited for Java, PHP and other languages.
The server/hosting is the space where you upload your project files.
The domain or ip address is what in put in your browser bar to be able to access your application. (Ex: google.com is a domain which is pointing to some server where the google site is hosted).Unless you want to access your application by typing the ip address of the server in the browser you need to buy a domain.
Take a look here for a more detailed explanation:
http://support.hostgator.com/articles/hosting-guide/what-is-the-difference-between-domains-vs-hosting-vs-website
Many web hosting providers allow you to buy a domain when purchasing the hosting serivce but you can buy it separatly and then point it to the ip address of your server.
I dont know many about WIndows web hosting providers but you might start looking in the Microsoft Asp.net website: http://www.microsoft.com/web/hosting/home
In your case you need to choose a hosting provider which supports MVC4.
Then you need to upload your project to the server. Take a look here: http://msdn.microsoft.com/en-us/library/dd410407(v=vs.90).aspx
Your server should come with an FTP account configured. You can use it to upload your files.
A domain is only a address in the internet which allows people to find certain places like an adress in a city.
So in order to make people find your stuff on the internet you have to have it a domain name.
It's the www.mvc4.com <----domain name
The other thing is the type of Server you need apache is also a server but in most cases it is used with java applications. What you need to do is to find a server which supports C# code and
type in .net hosting in google and you will find a lot hosters where you can register domain name for your C# code
step 1: Buy domain from website like Godaddy, net4 india etc
Step 2: Buy windows hosting to host MVC Application from web hosting like Godaddy, net4 india etc. Please buy latest framework hosting
Step 3: Build application using MVC(any version)
Step 4: Upload the published files to FTP.
Run the application.

How to create a server accessible by an iphone app

I a thinking of creating an iPhone/iOS app that would include a feature where one user could create a list of words and then save them to their account on a server. Also (and this is very important), the user could share their list with other users by giving them permission.
So my question is, how can I go about creating such a server? For right now, I have a home computer (running Windows XP that just stores data for my music system) which I can use to host the server. I am also open to the use of other online storage services like Google Drive or Dropbox (I can't remember if Amazon does anything like that). However (and I know this may complicate things a bit), but at least for now, I want/need to stick with free services/options.
Just to recap, the key features that I am looking for are:
create users/accounts (on the server)
eventually I may [try] to incorporate the use of other services to log users in like with their email account, OpenId, etc.
the ability to access (log in to) the server (with credentials) from my app
the ability to send/receive data between the server and my app
the ability to share data between users
I know this is a lot to ask for, but if anyone has any suggestions or can get me going in the right direction, it would be much appreciated.
The basic setup would be as follows:
Backend: Database (MySQL), Web server (Apache), with server side scripting (PHP).
Client: iOS device with developed app.
Communication: use HTTP client/server model, communicating with something like JSON.
This is much the same setup as a web server, but instead of serving html/css/javascript etc the results will be JSON.
As far as implementing specifics such as login in, and sharing data between users, this is purely dependent on your implementation. This is not trivial, and not something that can be easily stated in a single post.
Hope this helps.
You could build your own webservice in PHP, Ruby or Python. If you do so I would recommend building a RESTful webservice (http://en.wikipedia.org/wiki/Representational_state_transfer) and then use RestKit (http://restkit.org/) to handle the data in the iOS app. Especially RestKit's CoreData integration is nice in my opinion.
Another solution would be using a service like Parse (https://parse.com/products/data). The first million or so requests per month are free but after that it could get pricy. I personally have not tried it so I couldn't tell you if it is any good.

Does a desktop application need CAPTCHA?

I'm coding a desktop application for our university . Users need to signup before using this software and registration request is sent to a server written by me, too. So I'm struggling with kind of network application. ( Suppose that the request format is as simple as a HTTP request sent to an arbitrary port number )
But now I'm wondering whether it's necessary to protect registration process using CAPTCHA or not? Do I need to ensure that the signup request is not generated by a computer?
As your application is for a limited user group (your university only), I think you do not need a captcha, because the risk is very low that someone is in this group how wants to annoy you.
Also scripting for a desktop application is (a bit) more complicated than for web applications, this will decrease the risk, too. IF you are struggling with bot-registrations you could still ship the captcha as an update and only accept registrations from the updated version, don't you?
I think that would irritate the human users, who, I believe, would make all your users. Please note that on the net, only a small portion of users are bots. What about a campus? How many computers are on a campus to be worry about? Besides, all those computers are supervised by people you know, and even if a program is installed on one of them (or even all of them) to joke with you, you can call the authorities of the university. So if I were you, I would put my time on betterment of other things, instead.
No you don't need CAPTCHA. CAPTCHA was made because of the limitations imposed by a web browser while still wanting the wide availability that a website provides. Your application doesn't have either of these limitations. Your desktop application can implement whatever security methods it wants and it only needs to be distributed to a specific set of clients.
That doesn't mean you shouldn't have some security policies set up to prevent anyone on the school campus (or internet) from telneting to the port and creating an account. This can most easily be done by using PKI and distributing a unique private key and open public key with the desktop application. The server can then verify that the client has the private key before accepting registrations (plus you could encrypt any communications between the client/server). Of course anyone with access to the desktop application could get the private key, but it's at least more secure than not doing anything at all to prove they can register accounts.

Creating a VoiceXML application

I have a few questions concerning how to create a VoiceXML application.
I found some nice tutorials, but there are still some questions:
-what's a good development environment? I wanted to use VS08, there should be under C#, a project called "speech", but it doesn't appear, do I have to install the speech server local too in order to use this? (I would prefer some kind of visual workflow)
-what's the ending? is it .xml, .aspx, or .speax? I couldn't get that.
-how do I run the voicexml? it's at the speech server as an application, any further steps?
These questions are all over the map on the basics, but I'll try to provide some pointers:
what's a good development enviroment?
You will likely be building a web style application. So a VS08 ASP application is a reasonable starting point.
do i have to install the speech server local too in order to use this?
Yes. There are a variety of platforms that support VoiceXML. Nearly all are designed specifically for telephone calls (VoiceXML's main purpose). There are a few free implementations, but most are commercial. I believe the Opera web browser has some VoiceXML functionality. I've seen settings for it in their configuration, but no direct experience.
what's the ending? is it .xml, .aspx, or .speax ? i couldn't get that.
Endings usually aren't relevant, except maybe to tools. I don't believe VisualStudio provides any direct support for VoiceXML. Some browsers do care what mimetypes are provided.
how do i run the voicexml? it's at the speech server as an application, any furhter steps?
Does this mean you are looking at the OCS/Lync product line ? I believe their IVR in that suite does support VoiceXML as well as a few other APIs. The product should contain basic setup and configuration information. More information on Lync:
Microsoft Lync site
Wikipedia
One of the main goals of VoiceXML was to decouple the rendering of the voice application (on a speech server) from the voice application itself. This allows you to serve VoiceXML pages from any web server, anywhere, using any technology stack you want.
If you just want to learn VoiceXML in general, developer sites like Voxeo's Evolution allow you to render your voice applications on their voice hosting infrastructure. You configure your developer account to point to an initial VoiceXML page served from your external web server. In return, you get a phone number to call. When you call it, the hosting infrastructure fetches your initial VoiceXML page from your web server.
(I don't know offhand if Microsoft Lync hosting services are available yet.)

Resources