Multiple clients sending data to web app.

0
0

Hi there,

What is the best method to get & display multiple client data on a wisej web page?

E.g. let’s say we have 10 client pc’s sending a temperature reading to a web app, & the web app displays ALL 10 temperature readings on the same web page.

How is this best done?

Thank you

Regards

Darren

 

  • Darren
    Hi, Maybe I should use Application.Querystring, but surely this only gets the url parameters for a single session? I need to get the parameters from all clients (multiple sessions) & display all on one page. Cheers
  • You must to post comments
0
0

Hi

I’m trying to run Luca’s Example without success.

The ProcessRequest is not hinting(when I’m changing the  pipeline mode to classic mode[with visual studio 2017] I’m getting

Wisej Internal Server Error.

Thanks

Orel.

 

 

  • You must to post comments
0
0

Hi Darren,

you have to set the pipeline mode to classic instead of integrated.
Should be a setting in your web.config.

Best regards
Frank

  • You must to post comments
0
0

Luca,

These handlers don’t work when the app is self-hosted. Is this a bug or expected?

If expected, how do you implement the same functionality with self-host?

Thanks

Darren

  • You must to post comments
1
1

See attached sample. It also shows how to updated the page in real time with a static event.

To add a client name use:

http://localhost:%5Bport%5D/?name=Name1

http://localhost:%5Bport%5D/?name=Name2

etc.

 

  • darren logan
    Hi, Thanks. Now the ProcessRequest is being hit… BUT… when I add parameters to the URL I’m getting ERROR 404?
  • Luca (ITG)
    404 means that the URL is wrong, you are probably not adding the parameters correctly – the sample works correctly. http://localhost:3030?name=Test (change 3030 to use your port.)
  • darren logan
    Hi Luca, You’re a star! It’s now working. I really appreciate your help. Thank you.
  • You must to post comments
0
0

Hi,

OK, so I’ve added a Handler called Handler1.ashx.vb

Then I assume I have to map the url, so I’ve added the following to web.config:

  <system.web>
    <urlMappings enabled=”true”>
      <add url=”~/Default.html” mappedUrl=”~/Handler1.ashx”/>
    </urlMappings>

But processRequest is not being hit. I guess my mapping is wrong?

Can you help?

Thanks

 

  • darren logan
    I’ve also tried: add url=”~/localhost:4111″ mappedUrl=”~/Handler1.ashx” But this doesn’t work either?
  • Luca (ITG)
    Default.html is the url use by the app. You have to pick an url for the data posting. See the example I attached.
  • You must to post comments
1
1

IIUC, you have multiple PCs not using a wisej app, but simply posting data to a URL (get or post doesn’t matter). Then you have a wisej monitor app that should be able to display the data collected by the PCs?

If that’s the case, you need a simple web handler to collected the data. It can be done simply with a sessionless ASP.NET ashx handler (https://www.dotnetperls.com/ashx). In the ProcessReequest method collect the data sent using a URL parameter and save it somewhere, file, database, …

Then the Wisej monitor application can read and display the data visually to any client that connected to the app.

  • darren logan
    Hi Luca, You’re correct. The wisej app is essentially a monitor and waiting for posts/gets from PC’s running, say, simple desktop apps. Excuse my ignorance but I’m not a web developer so I don’t understand the terminology. You lost me at “sessionless ASP.NET ashx handler” – I have no idea what this means! Also, where do I find the ProcessRequest method? Thank you for your patience.
  • You must to post comments
Showing 6 results
Your Answer

Please first to submit.