Coder Social home page Coder Social logo

akouki / signalr-chat Goto Github PK

View Code? Open in Web Editor NEW
305.0 13.0 127.0 3.25 MB

A real-time chat application using .NET 7, SignalR and Knockout.js

License: MIT License

C# 14.28% JavaScript 77.25% HTML 5.09% SCSS 1.88% CSS 1.49%
signalr-chat signalr chat dotnet aspnetcore dotnetcore

signalr-chat's Introduction

SignalR-Chat

A real-time chat application using .NET 7, SignalR and KnockoutJS.

Live Demo: https://demo2-kouki.azurewebsites.net/

Features

  • Group chat
  • Private chat /private(Name) Hello, how are you?
  • Photo message
  • Basic Emojis
  • Chat Rooms

Getting Started

To run the application:

  1. Grab the Project
  2. Open Visual Studio as Administrator and load the Solution
  3. Resolve any missing/required nuget package
  4. Build Database. Open Package Manager Console and run the following commands:
    update-database
  5. That's all... Run the Project!

signalr-chat's People

Contributors

akouki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

signalr-chat's Issues

delete message

hi
delete message is not developed
and image messages vanished after refreshing page

SQL

can i run the update-database also in a way it creates the database in a SQL Server instead of the SQL EXpress

One small suggestion, ie. improvement.

In index.cshtml on line 62 if you change <div class="left-side"> to

<div class="left-side" data-bind="if: !$data.isMine()">

then the sender's avatar won't be shown on his form, while others will still see it. It is really not needed for sender to see his own avatars all the time.

In this way you save the space, which is always a good thing. It also looks better in my opinion.

Rgds. Senad

Deployment

So I killed Facebook, I wanted to try this as an alternative to communicate with my wife. It runs fine in the environment, but when I publish to IIS, it will start but when it tries to log in, it crashes with no data. Any help is appreciated. I switched to development mode but I get the same message :

Error.
An error occurred while processing your request.
Development Mode
Swapping to the Development environment displays detailed information about the error that occurred.

The Development environment shouldn't be enabled for deployed applications. It can result in displaying sensitive information from exceptions to end users. For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development and restarting the app.

Problems with Getting Started

Hi! ;)

I've got some problems with the last command of Getting Started session. When I run update-database the return is:

Directory lookup for the file "C:\Users\franc\Workspace\SignalR-Chat-master\Chat.Web\App_Data\aspnet-Chat.Web-20170315074639.mdf" failed with the operating system error 2(O sistema não pode encontrar o arquivo especificado.).

Can you help me?

web demo and private chat

Where can i see the web demo?
can we private message others by clicking on their name instead of typing in code /pm name of person. ?

New User bug

Hi,

I am login with two different user from two browser, both can chat easily,
but at the same time i am gonna register with the 3rd account and then login at that time 3rd user name doesn't come up with the existing logins for existing login I need to hit the F5 button or reload the page then it should work.

can you please check and do the necessary changes in master branch?

Thanks.

error on getusers

we sometimes get this error, any idea?

fail: Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher[8]
Failed to invoke hub method 'GetUsers'.
System.NullReferenceException: Object reference not set to an instance of an object.
at Chat.Web.Hubs.ChatHub.<>c__DisplayClass8_0.b__0(UserViewModel u) in C\Hubs\ChatHub.cs:line 89
at System.Linq.Enumerable.WhereListIterator1.ToList() at lambda_method22(Closure , Object , Object[] ) at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher1.ExecuteMethod(ObjectMethodExecutor methodExecutor, Hub hub, Object[] arguments)
at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.<>c__DisplayClass16_0.<g__ExecuteInvocation|0>d.MoveNext()

update

Hallo,

I hope you can help me out with the following.
I changed the code so we can change the roomnames afterwards.
It works and we also post back a procedure with signalr to update all users with the new info.

But I do not get it working to update the content at the clients without refreshing the page.

I tried this
var temp;
ko.utils.arrayForEach(self.TweetDeckRooms(), function (room) {
if (room.id() == id)
temp = room;
});
temp.Name = Name;

and this:

var recordToupdate = this.TweetDeckRooms.FirstOrDefault(x => x.TweetDeckRoom.id == id);
if (recordToupdate != null) {
recordToupdate.Name = room.Name;

       }

But both do not work

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.