Click here to Skip to main content
15,888,277 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: (untagged)
I have one scale weight machine and i want to read data from this scale machine and get data in the textbox

What I have tried:

I have tried one sample application but every time exception shows as access denied and DataReceived method does not call
Posted
Updated 26-Dec-18 2:41am

There is no way to directly access the local machine from the web browser. For security reasons browsers have very limited access to the machines resources.

Either you need to depend on the application / service to done the reading job. Save this in database/file where your site can access.

There may be other alternatives. I am good see them here.


Thanks
--RA
 
Share this answer
 
Assuming the scale is attached to the client machine and not the server...

From your ASP.NET code, which runs entirely on the server, you don't.

From javascript code that runs in the browser on the client, you still don't. Javascript can only take to web servers. That's kind of limiting, but there's nothing that says the web server cannot be running on the client machine. So, to take advantage of that...

You have to write an application, with no UI, that gets installed and runs on the client machine. This app is what will talk to the scale and get values from it. It will also have a second side to it that is a web server. This server can accept commands and return data, like weight information, to whatever app calls it, like your client-side javascript code running in a browser.
 
Share this answer
 
Comments
Member 15922520 24-Jun-23 5:01am    
no solution
Member 15922520 24-Jun-23 5:01am    
trouble for asp.net webapplication coud not connect the weight machine
Dave Kreskowiak 24-Jun-23 9:37am    
Well, it is a solution. It's not my fault you cannot get copy'n'paste code into your own project.

I told you what you have to do. It's up to you to do the homework to actually do it.
Dave Kreskowiak 24-Jun-23 9:41am    
Where is the scale connected? To the client or the server?

If it's connected to a client machine, go re-read my post from 5 years ago. It still stands today. You have to write a service application to talk to the scale using whatever interface the scale exposes. The service is also going to have to implement a web server so your client-side javascript running in your browser window can talk to the service to get data.

If you don't like that answer, sorry. That's entire on you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900