locked
ASP .Net Web API how can i send a message in website to mobile app RRS feed

  • Question

  • User-1462779004 posted

    Hi, I want to send a message from website to mobile app & mobile app to website. I dont use databese for this its just for real time sending. How can i do this ? Thanks.

    Friday, August 7, 2015 3:03 AM

Answers

  • User541108374 posted

    Hi,

    if you're not familiar with Web API I strongly suggest you read the tutorials under http://www.asp.net/web-api.

    What you have to do is to create one controller with an action to write information and the other to read/get that information. The information itself can be put in the Cache object wich can act as an in memory "data storage".

    Grz, Kris.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 7, 2015 8:58 AM

All replies

  • User541108374 posted

    Hi,

    real time sending

    In that case I would suggest you make use of SignalR or raw websockets if all browsers you're making use of support it.

    To get to know more about SignalR I suggest you take a look at http://www.asp.net/signalr.

    Grz, Kris.

    Friday, August 7, 2015 3:15 AM
  • User-1462779004 posted

    actually real time is not right statement for my situation, i want to just send something(text, url link, image etc.) in website or mobile app with send button and when click send button create a random pin number. in other device(in website or mobile app) when i enter this pin i want to show data to user. and most important point for me i dont want to use database. i am amatour in web apı this is possible ?

    Friday, August 7, 2015 4:11 AM
  • User541108374 posted

    Hi,

    cnblk

    want to just send something(text, url link, image etc.) in website or mobile app with send button and when click send button create a random pin number. in other device(in website or mobile app) when i enter this pin i want to show data to user

    That's a different requirement and workflow. Please try to provide correct information in your thread starting posts in the future. It'll help you getting answers faster.

    cnblk

    most important point for me i dont want to use database

    You can do without a data storage, of any kind, but then you would rely on things like Cache in memory. When your application recycles or is shut down you would lose that information so be sure to keep that in mind. If the information is important and needs to last longer than ... seconds / minutes then it's best to make use of some sort of data storage. By default most people will make use of a database but you can also make use of others.

    For example for my current application I expose a Web API hosted on Azure Web Apps which makes use of Azure Table Storage for keeping the information. It's fast and reliable.

    Grz, Kris.

    Friday, August 7, 2015 4:24 AM
  • User-1462779004 posted

    Sorry for the wrong information. This data not important for me so its getting shot down no problem, i want just send on api without database and see that in other side (website or mobile app). İf u can share some tutorial about this or give any other advice i will be happy :)

    Friday, August 7, 2015 8:02 AM
  • User541108374 posted

    Hi,

    if you're not familiar with Web API I strongly suggest you read the tutorials under http://www.asp.net/web-api.

    What you have to do is to create one controller with an action to write information and the other to read/get that information. The information itself can be put in the Cache object wich can act as an in memory "data storage".

    Grz, Kris.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 7, 2015 8:58 AM