I just started working on WebMatrix 2 recently, I've been reading that socket.io is a great tool to send and receive events in my application.
The thing is I'm completely new to socket.io and I don't know where can I install it, I tried NugGet but I can't find a helper that offers the support for socket.io. I read that I should create a project from the Node.js templates but I want to work on ASP.NET and I'm not familiar with Node.js.
How can I install socket.io into my WebMatrix? What are the guidelines to use socket.io in a ASP.NET project?
Any help will be appreciated. Thanks in advance.
You're a little turned around :) Socket.io is a NPM module that's used with nodejs. This is different from writing an ASP.NET Web Pages site. If you want to use socket.io, you need to be using node. The Node Starter site in WebMatrix has an example of using socket.io to do a basic chat app. To see how to use this:
http://www.youtube.com/watch?v=aUT0ez6B-5w
If you would like to use ASP.NET, you should be using SignalR. Here's a good tutorial to get you started:
http://www.mikesdotnetting.com/Article/206/SignalR-And-Knockout-In-ASP.NET-Web-Pages-Using-WebMatrix
You can also check out this video:
http://channel9.msdn.com/Shows/Web+Camps+TV/WebcampsTV-Justin-and-Vishal-Build-an-Image-sharing-Site-with-Windows-Azure-Web-Sites
Happy Coding!
Related
I understand that there is an API... but how do I implement it? I have a working node.js application but now I have to bring it over to asp.net. I think working from scratch on my asp.net web app is the best option now but I do not know how to start.
I agree that knowing the exact issues you run into will help us give a better answer, but to get you started here is the .net sdk
https://github.com/watson-developer-cloud/dotnet-standard-sdk
and the standard api reference with examples
https://console.bluemix.net/apidocs/assistant
Could anybody please help me out regarding how to implement Angular 2 with Asp.Net Web API? Any tutorial link would be helpful.
There is very little to no documentation available in this regard.
I did implement the https://angular.io/docs/js/latest/quickstart.html
But it requires npm start which starts the node server useful for CommonJS module loading. I want to use IIS and Web API. Can I use CommonJS or do I have to use any other module system
If I use CommonJS with IIS development server I get this error:
in the console. The same link works fine when I start using Node server. This means on the production server I have to use Node as well as IIS for Web API? Is there any way I can use Angular 2 only with IIS and possibly eliminate CommonJS if needed. Any tutorial to Angular 2 with Asp.Net would be helpful.
You have to use SystemJS as your module system, if you want to use it exactly like in the tutorial. If you want to use CommonJS, use something like Browserify.
You can have a look to following article for Angular 2 and Asp.net MVC with Web API.
https://www.codeproject.com/Articles/1181888/Angular-in-ASP-NET-MVC-Web-API
It's a good one but this article uses Asp.Net MVC in the middle.
You might consider to remove Asp.net mvc part and develop a website with Angular(client side) and web api(server side).
This one is a simple example.
https://github.com/thinktecture/apisummit-2016-angular2-webapi
On the other hand, if you want to use IIS then you need the build your angular project with
ng build --prod
and move the dist folder into your IIS website folder. Note that you don't need a node server on IIS because nb build transpiles old the typescript files into javascript and gets the other static files(html, css, js, etc...) and prepares for you to deploy to any web server like IIS.
another sample angular(client side)-Asp.Net Web API(server side)
https://www.youtube.com/watch?v=AYgs0kLjTLE
So this is the issue:
I have a .NET project that includes 5 Web Application Layers.
One of them is API.
I Recently added a Cordova project as well and I'd like it to communicate with the API Layer.
Is there anyone who knows what to do?
P.S.:
I use visual studio 2013.
You can use normal jQuery Ajax calls to make requests to the API. http://api.jquery.com/jquery.ajax/ or just normal JavaScript ajax https://stackoverflow.com/a/8567149/487940.
I hope that answers your question.
If you're talking about calling into Web API web services from a Cordova app, you may find the Breeze.JS framework useful to help you. You can either just used the client library or use some server side code in addition to client code to help get you up and running and exposing new web services as well.
Otherwise it is simply a matter of making web service calls to the server from your JavaScript code but the specifics will depend on exactly what you're trying to do and what client UI/utility framework you are using.
i just found one nice article about online chatting application with converse.js i read it's documentation and i like it. how ever i just have doubt it is there this chat facility can supported with asp.net 4.0 web site. Here i just want to know about in details is it supported with .net application.
here it's tells XMPP Chat server. Is there any additional cost for purchase it. After that how i setup this server for chat facility. here it's gives advice for identity i have to manually register user with it and i can use with my own web site.
Is there any one have idea how i implement this to my web site. Step By Step
Please help me..
Since you mentioned Asp.net so I am assuming you are talking about windows platform. I am using Openfire for XMPP messaging since last 5-6 years now and it is very easy to use and stable XMPP server. You can install it on your server and then configure Converse.js and XAMPP in conjunction with it to get web client chat feature. I referred this link to configure XAMPP along with Openfire: https://community.igniterealtime.org/docs/DOC-2954
Basic steps:
1. Install Openfire
2. Install XAMPP and configure as given in above link
3. Configure Converse.js in Asp.net application
My asp.net application is still in development phase,is it possible to implement OPEN ID in my application?.I am new to asp.net kindly guide me how to implement open id.What are the necessary parameters i should keep in mind to improve security of my web application.Should i implement session in my project?
The open source project DotNetOpenAuth is a fantastic place to get started with integrating OpenID (and other, more up-to-date open web protocols such as OAuth 2.0) into your ASP.NET project.
They have tons of great documentation and example projects that should be able to get you started quickly.