C# - Comet Pushing Messages From Server To All Clients

Aug 23, 2010

I'm making an application with server sided variables that change every second. Every second those new variable need to be shown at all the clients that have the webpage open. Now most people told me to go with comet because I need to push/pull the data every second, now I've got a few questions: What would be a better solution looking at the fact that I need the new data EVERY SECOND, pulling from the client or pushing with the server?

Also the item ID's that are on the server side (with the variable's that ID got) can change and when the client refreshes the page he needs to get the oldest (and living) ID's. This would mean that my jquery/javascript on the client side must know which ID's he got on the page, what is best way to do this? Last thing is that I can't find a good (not to expensive) comet library/api for asp.net (C#). Anyone ever used a comet library with good results? We're looking at a site that should be able to have 2000 comet connections at every moment.

View 3 Replies


Similar Messages:

SQL Server :: Pushing Columns Of One Table To Another After Filtering

Sep 16, 2010

I have 2 tables t1 and t2. In t1 I have 4 columns from that I want to insert only 2 columns to another table t2. I only want to send data which is in the form of IP address like (123.123.123.123). After eliminating nulls and other data.

View 7 Replies

How POKEIN Identifies Clients For Doing SERVER PUSH

Mar 22, 2011

I have a web application, where users will see notifications for their new messages, I want to push the notifications to the users who are already logged in.I have seen that I can do it using Server Push of PokeIn, I have tried and understood the simple application using it, but I am not getting the ClientID thing.The ClientId it saves in "OnClientConnected" is a simple integer, so how does it recognizes clients and calls functions on them ?

View 1 Replies

FileUpload Control Works On Server But Not For Clients

Oct 18, 2010

I have a strange thing going on with the .net fileupload control. If I remote desktop to the server that houses the web app and db server, I am able to upload files and store them into a varbinary(max) column.

However, when clients connect to the web server from their desktop, then can do all the things they need to such as browsing web pages, fill out forms that store/save data to the database, etc.

However, when they try to upload a pdf to the sever, the following exception occurs: The web app uses .net 3.5, the db is sql 2005, and code is c#. And insights would be welcomed. Code and Exception below.

[Code]....

View 2 Replies

Architecture :: How To Manage User Messages To Avoid Hardcoding Messages

Aug 10, 2010

How to manage user messages to avoid hardcoding messages accross the web application.

View 17 Replies

C# - Success Messages As Opposed To Model State Error Messages?

Jan 26, 2010

For error messages, validation faults etc you have

ModelState.AddErrorMessage("Fool!");

But, where do you put success responses like "You successfully transfered alot of money to your ex." + "Your balance is now zero". I still want to set it at the controller level and preferably in key-value way, the same way as errormessages but without invalidating the modelstate.

View 3 Replies

How To Send Email From Server To Home Network Clients (via Outlook)

Apr 9, 2010

I'm a newbie in asp.net (and vb.net)..

I have an application which will sent an automatic email from my company mail server to all the client/employee in my company every week. how to make this happen... everytime i applied the codes that i'm searching in google always give me some errors cause it always discuss how to send email to outside the company...

How can i achieve this goal ? what codes should i use ?

Note : i'm using vb.net 2005 and microsoft office outlook

View 5 Replies

Save A File Generated In Server In Clients Machine (mydocument)

Aug 16, 2010

i'm developing a system with asp.net, there i generate a powerpoint presentaion in the server machine, i need to generate it there and save it in the clients machine, how can i achieve this? how to access the clients machine and save the generated file there?

View 3 Replies

How To Diagnose IIS Pushing The CPU To 100% Usage

Nov 15, 2010

I have a web server with more than a few ASP.NET sites running on it. Every so often, i notice that IIS is pushing the server's CPU to 100%. The sites share application pools, per .NET version they are running.

What i'm looking for is a way to be able to pinpoint which site it is that is doing this, using some tool. If that tool happened to get down into the code to show it, that would also be nice. If not, i'm happy just knowing which site is causing the issue.

I've already tried using ANTS. However, with ANTS you need to know which site it is, and then have it running and waiting on said CPU-crashing web app. Not perfectly ideal.

View 4 Replies

Javascript - Not Pushing To Array?

Jul 22, 2010

Trying to push some coordinates, as well as some stuff specified in a form by the user, to an an array called "seatsArray". Here's my code:

<div>
<img onLoad="shiftzoom.add(this,{showcoords:true,relativecoords:true,zoom:100});" id="image" src="plan1.bmp" width="1024" height="768">
</div>
<script type="text/javascript">
var seatsArray = [];
</script>
<br><input id="backnave" type="radio" name="area" value="backnave" /> Back Nave<br>
<input id="frontnave" type="radio" name="area" value="frontnave" /> Front nave<br>
<input id="middlenave" type="radio" name="area" value="middlenave" /> Middle nave<br>
<input type="radio" id="standardseat" name="seat" /><label for="radio1">Standard</label><br>
<input type="radio" id="wheelchairseat" name="seat" checked="checked" /><label for="radio2">Wheelchair</label><br>
<form id="my_form" action="savetext.aspx" method="post" onsubmit="return prepare()">
<input type="text" id="file_name" name="file_name" rows="1" cols="20" />
<input type="hidden" name="seatsArray" />
<input type="submit" value="Save" />
</form>
<form id="my_form" action="savetext.aspx" method="post" onsubmit="return prepare()">
<input type="text" id="file_name" name="file_name" rows="1" cols="20" />
<input type="hidden" name="seatsArray" />
<input type="submit" value="Save" />
</form>
<script type="text/javascript">
function prepare();
{
document.getElementById('seatsArray').value = seatsArray.join();
return true;
}
</script>
<script type="text/javascript">
var coordinates = document.getElementById("image");
coordinates.onclick = function(e) {
e = e || window.event;
if (e && e.pageX && e.pageX) {
e.posX = e.pageX;
e.posY = e.pageY;
} else if (e && e.clientX && e.clientY) {
var scr = {x:0,y:0},
object = e.srcElement || e.target;
//legendary get scrolled
for (;object.parentNode;object = object.parentNode) {
scr['x'] += object.scrollLeft;
scr['y'] += object.scrollTop;
}
e.posX = e.clientX + scr.x;
e.posY = e.clientY + scr.y;
}
var desc = "";
if(document.getElementByID("backnave").checked) {
desc = "BN, "+desc;
} else if(document.getElementByID("middlenave").checked) {
desc = "MN, "+desc;
} else if(document.getElementByID("frontnave").checked) {
desc = "FN, "+desc;
}
if(document.getElementById('wheelchairseat').checked) {
//Wheelchair seat is checked
desc = "Wheelchair "+desc;
}
seatsArray.push(desc + e.posX, e.posY);
}
</script>

But simply nothing is getting pushed to the array. I can tell this as I am using the following ASP.NET to write the array to a text file:

<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
string path = Server.MapPath(".")+"/"+Request.Form["file_name"] + ".txt";
if (!File.Exists(path))
{
using (StreamWriter sw = File.CreateText(path))
{
sw.WriteLine(Request.Form["seatsArray"]);
sw.WriteLine("");
}
}
using (StreamReader sr = File.OpenText(path))
{
string s = "";
while ((s = sr.ReadLine()) != null)
{
Response.Write(s);
}
}
}
</script>

The name of the text file is correct according to what the user put in the form "file_name". As you can see I made seatsArray a hidden form object so thats what the ASP.NET is trying to call.

Is something in the javascript in the wrong order or something? Because I just can't get it to fill up that text file.

View 2 Replies

C# - Uploading/Pushing Data To A Website?

Jan 22, 2010

I need to let a company push information up to my site.The best way to explain what I am talking about is to explain how it is currently done with their previous website:This company uploads a CSV file to an FTP set up by the website. The website then processes the CSV file and puts it into an SQL database so that it can be used by the website.In this case, I am the website and I am working with the company. Both sides are willing to change what they do. So my question is...

What is the best way to accept batch information like this? Is there a more automated way that doesn't involve FTP? In the future I may have a lot of companies wanting to do this, and I'd hate to have to setup accounts for each one.The project is C# ASP.NET MSSQL

View 2 Replies

C# - Put Email Messages In A Queue When SMTP Server Is Down?

Sep 20, 2010

I have a big problem with my SMTP server for sending emails. It's down often. At this point I am using this code:

MailMessage mailMsg = new MailMessage();
mailMsg.From = new MailAddress("fromMail@example.com");
mailMsg.To.Add("toMail@example.com");
mailMsg.Subject = "...";
mailMsg.IsBodyHtml = true;
mailMsg.BodyEncoding = Encoding.UTF8;
mailMsg.Body = "Mail";
mailMsg.Priority = MailPriority.High;
SmtpClient client = new SmtpClient();
client.Credentials = new NetworkCredential("account@gmail.com", "password");
client.Port = 456;
client.Host = "smtp.gmail.com";
client.EnableSsl = true;
client.Send(mailMsg);

But, when my SMTP server is down I want to put all the emails in a queue and when it recovers I want to send them one a time. Is there any way how to do this programatically in C#?

View 1 Replies

Web Forms :: Retrieve Messages From Mail Server?

Feb 20, 2010

I make class that canread messages from mail server using famous way called pop3there`s simple of code that i have finished


public static string ServerReplyMessages = null;
public static List<string> MessageList = new List<string>();
public static void ConnectToServer(string MailServer, int IncomingPort, string UserName, string Password)

[code]...

View 4 Replies

Ajax + Comet + .net Scalable ?

Apr 21, 2010

Thinks at a backgammon online multiplayer game with over 100, or even 1000 online users. The game communication is done using Ajax + 3 seconds Comet connection interval + ASP.NET technology. Is this a real scenario ?

Didn't so many Comet open connections block the server resulting in big latency ?

View 4 Replies

AJAX :: Display Messages From Server Side Using ModalPopupExtender

May 7, 2015

I'm using asp.net and c# to build a web application. I'm trying to display a popup message using the ModalPopup extender. The message displays fine only if it sets in client side or in server side but inside Page_Load. Otherwise, it displays as empty. the popup comes up without the message.

The thing is that i want to change the meesages when i call its show() method.

client side:

<asp:Panel ID="pnlMsg" runat="server" CssClass="modalPopup">
<asp:Label ID="lblModalMsg" runat="server" ></asp:Label>
<asp:Button ID="btnOk" runat="server" Text="OK" />
</asp:Panel>
<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="hidForModel"

[Code].....

View 1 Replies

.Net MVC And Comet (ajax Push) Implementation

Jun 8, 2010

I'm trying to implement an auction website and I search in web the Ajax Push is the best way where I can use! So, I'm finding some samples in web to learn how to implement Ajax Push (comet) in client and server. By the way, I find some samples in ASP.Net Webforms, but no in MVC version. I'd like to find a demo, sample, anything ... that use MVC

View 3 Replies

Php - Comet Style Application With Loops?

Dec 22, 2010

Do all comet style applications require a loop somewhere in the application on the serverside to detect updates/changes? how the logic behind a loopless comet style application would work?

View 3 Replies

Reverse Ajax Comet/Polling Implementation For .NET MVC?

Jul 21, 2010

I am looking for ASP.Net MVC implementation for reverse ajax comet/polling. Can anyone provide some good link or tutorial

View 2 Replies

Security :: Allow Clients To Login To Website And Connect To Specific Server Based On Login

Jul 5, 2010

We have created a windows application which is distributed amongst our clients. The application uses SQL Server 2008 as the back end and each client uses their own database on their own server. The databases are all exactly the same but each clients data is specific only to them.

We would like to offer our clients the ability to log-in to our website which would then login to their own database so that when they are out in the field they can perform similar tasks to what they can do with the windows app.Each of the clients databases has a user table containing their login details, permissions etc.

Our server is running on IIS and has SQL Server 2008 installed but it only contains our data and nothing of the clients.How should we go about this?

What I mean is do we need to make each client have an additional login to our main server which would then hold each clients individual connection strings etc which would then be used to connect to there specific database and then they would need to login again?? Seems like a nightmare for the user.

View 13 Replies

AJAX :: Comet - Detect If The Client Disconnected During Those 10 Minutes?

Jan 29, 2010

I implemented a chat using the COMET "way" described in this article: http://www.codeproject.com/KB/aspnet/CometAsync.aspx

In this example, the client connects for 5 seconds every time. I wanted to hold the client longer, for about 10 minutes.

My problem is - how to detect if the client disconnected during those 10 minutes? I tried using Response.IsClientConnected but it returns true even if I close the client. There must by some inidicator since the socket gets disconnected if I close the client.

View 2 Replies

.net - Free Open Source That Implements Comet Or Push?

Jan 30, 2011

I am looking for a free implementation for Comet or Push. Here is an example of chat done by comet:http://www.phpchatsoftware.com/phpbb/I have my own server.Is there any thing like this?P.S. I am using asp.NET, on server and jQuery on client.Is there anything new? or maybe this is the last technological free open source achievement:http://www.codeproject.com/KB/aspnet/CometAsync.aspx ?

View 4 Replies

How To Modern Implementations Of Comet/Reverse AJAX Work, Any Stable C# WCF Or Implementations

Mar 25, 2011

What is the correct way (or best) way to implement Comet, HTTP Push, or Reverse AJAX?What .NET implementations would you recommend?

View 1 Replies

AJAX :: Comet/Reverse AJAX With Visual Studio 2010?

Oct 9, 2010

have here a (internal intranet) site where users can preserve places for the lunch and pause... :)Now, meanwhile the users count grows more and more and the ajax site that speeks with a webservice for the calculations und checks geting slower and slower... user 900+The site checks every 5 seconds for the actual state and uses groups for the users.Ok, now i have researched on the web, and found the comet/reverse ajax aproach that the service can push the clients with events.But i have not found any good asp.net tutorial with visual studio (2010) how i can use the asp.net standard controls and vs design mode.Is there a framework for that stuff?

View 3 Replies

Ensure That A Sub Doesn't Be Used By Two Clients?

Feb 16, 2010

how can we ensure that a sub,it is not be used by two or more clients??

View 21 Replies

C# - Reuse Of WCF Service Clients

Jan 10, 2011

I have a WCF webservice that acts as a data provider for my ASP.NET web page. Throughout the web page a number of calls are made to the web service via the auto-generated ServiceClient. Currently I create a new ServiceClient and open it for each request i.e. Get Users, Get Roles, Get Customer list etc.... Each one of these would create a new ServiceClient and open a new connection.

Can I make my ServiceClient class a global or statically available class so that all functions within my ASP.NET web page can use the same client. This would seem to be far more efficient. Are there any issues with doing it this way? Any advice I should take into account when doing this? What happens if I make multiple requests to a client? Presumably it is all synchronous so it shouldn't matter if I make 1 or 50 calls to it?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved