Solution for implementing Facebook-like notification - asp.net-web-api

I'm having a system which contains a Unity scene( social network view), which is connected to a DLL file written in C#, and this file is responsible for connect to WebAPIs hosted by ASP.NET WebAPI, which is the social network service.
I'm trying to implement facebook-like notification service. What is the possible solutions/technique here to implement this feature?
I just read some example likes socket.io or SignalR but it seems that those things don't support C# client( the DLL) as well as ASP.Net WebAPI

My app. is something like a Whatsapp chat app. plus e-bay online shopping. It is mainly consist of 1 solution with 3 projects using Visual Studio 2015 Community RC.
project 1 is a JavaScript Cordova project with one and only one index.html file which is hosted in IIS 8.0 and is also capable of hosted as a native app. of an Android phone or iPhone. So the clients can use any pc desktop browser, or mobile browser to use the app. Or can install the app. from app stores of Android or iPhone.
project 2 is a Visual Basic Web Services hosted in IIS which contains all the backend business logic and connect to the ms sql server.
project 3 is a C# Signalr Server Winform, which can notify the clients if there is any new message.
for example, client X send a message to client Y:
index.html of X call VB Webservices to store the message in sql.
index.html of X call Signalr Server.
Signalr Server call Index.html of Y to notify there is a new message.
index.html of Y call VB Webservices to read the message.
You may wonder why I don't simply use signalr to send the message to Y, as the message is complicated, it can be a text or text with images or product information with product images.
As stated the index.html can be hosted inside the phone as native app, I also need to enable Cors in the webservices as well as the signalr.
of course the signalr Server can also call the VB webservices directly if needed.

Related

Upload files to OneDrive from outlook desktop client using outlook AddIn without user interaction

I am developing an Outlook Add-In, that will work in Office365 for both Web version and Desktop client and will able to upload files attached with the email to One-drive. Is it possible to authenticate and upload the files without user interaction(i.e. like opening popup, and providing user id and password etc).
Thanking all for your suggestions in advance.
Yes, Its possible.
What you have to do is :
1) create OutlookAddin solution with help of visual studio template.
2) It will add two projects in that solution OutlookAddin and OutlookAddinWeb.
3) Here OutlookAddinWeb is simple asp.net project that you have to covert into MVC Web API or you can add in new MVC Web API project after removing the existing OutlookAddinWeb.
4) Now,You can Microsoft Graph Client dll to use graph api functionalities to upload file in One Drive.
Note : The important thing you shouldn't forget about implementing authentication using OWIN API that is providing single sign-on as it is your main concern here
samples: https://developer.microsoft.com/en-us/outlook/code-samples

How to send and receive data from ASP.NET server to Android

I want to make a Biometric e-voting system.A voter register and cast vote through android app and all other activities are handled in asp.net server.here i want to know how send and receive data from ASP.NET server to Android
Simply put:
Set up RESTful API in ASP.NET server. And in your Android app, consume it with Java (native app) or JavaScript (html app).
Just create an ASP.net Web API project, create Web API controllers and write methods in it and call it from your Java code in Android.
Here's a sample which could be useful to understand what to do:
http://hintdesk.com/how-to-call-asp-net-web-api-service-from-android/

Web Forms Project Consuming Web Api 2 Project in debug mode

In my solution, I am creating new Web Api 2 project to migrate my services in another Web Forms project.
My question is:
Is there any way (best way) to use my new Web Api project in my Web Forms project when I am debugging?
Actually I have to start my Web Api (without debbuging), after, I am able start my Web forms and use my web api. It is unproductive.
I have tried to make this works with Pre-build event, but i do not know if I did something wrong.
PS.: I do not need the both projects running in debug mode.

How to convert an existing ASP.NET Web API to Azure Mobile Service?

Recently announced at Microsoft Build is the ability to convert an existing ASP.NET Web API to an Azure Mobile Service. I was curious as to if anyone has successfully done this yet, and the steps needed to do so.
Things I've tried thus far:
Added the Azure Mobile Service .NET Backend & Azure Mobile Service -
Entity Framework Nuget Packages to my existing ASP.NET Web API
project.
Resolved an issue with OWIN and AMS(ZUMO) conflicting Startup.cs assemblies.
Ensured the ASP.NET Web API compiles locally, and published as an Azure Mobile Service.
However whenever publishing, it seems I only get a runtime error on the server.
Here was the best example of potentially doing this: http://channel9.msdn.com/Events/Build/2014/3-623
Secondly I've looked a bit into just running the OWIN pipeline via: http://www.strathweb.com/2014/02/running-owin-pipeline-new-net-azure-mobile-services/
I know that this is in a preview mode, but figured some document trail would help!
Can you try adding your existing WebAPI assets to Mobile Services project you create from VS? This will make sure all the right things are wired up. Also, check the Logs tab in the portal for any clues.
This should help..
http://blogs.msdn.com/b/azuremobile/archive/2014/04/10/creating-an-azure-mobile-services-net-backend-from-scratch.aspx
Thanks
Supreet

UNKNOWN_EXCEPTION: Destination URL not reset. The URL returned from login must be set in the Salesforce

In windows Phone application, i added Enterprise.wsdl(obtained from my salesforce login id) as reference. I'm able to authenticate using Loginresult. But while using Create the above expense are thrown.
Using SoapHeader class in Web application inherited System.Web.Services.Protocols.SoapHeader so referred the Server url and id.
It is not possible to use web in Windows phone. Plz help if you know any samples to solve it
Part of the results for the login call are a serverUrl, this url should be used to make all subsequent requests, typically in .NET you just set the .Url property of your stub to the provided value. While there are no win-phone specific examples, there are lots of .NET examples in the docs
My experience has been that you can't import the Partner or Enterprise WSDLs to a Windows Phone 7 project.
With Windows Phone 7 projects you can add a Service Reference (for WCF), but not a Web Reference.
Whenever I've imported the Salesforce WSDLs to a standard .NET project I've needed to use a Web Reference to get the APIs working correctly. Something about how WCF doesn't support the Salesforce WSDL defined SOAP headers that are needed to specify the session details.
I found using the REST API and JSON.NET to be the easiest with Windows Phone 7 projects.
That said, my phone app only works with Developer, Enterprise and Unlimited Salesforce editions. Professional and Group editions get the API_DISABLED_FOR_ORG error. I think I need to get the app certified to work with those editions.

Resources