Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
Hello All,
I have to scan a QR code using webcam on a Asp.net web page.
Currently i have used Zxing and AForge.Net dlls and made a QR reader on a Winform application. But iam not able to do that in a Asp.net webpage.

The problem area here is to capture the video frame in bitmap from the live webcam feed. And send the frame converted to bitmap to Zxing.Decoder() for decoding the QR code.

Please help in having a live feed from webcam and decoding the QR code from it.

PS: I got lot of solutions on uploading a pre-captured image to the Web server for decoding but thats not my requirement. My requirement is to capture the QR code directly from the webcam feed and decode it.

Please help. Thanks.

What I have tried:

Currently i have used Zxing and AForge.Net dlls and made a QR reader on a Winform application. But iam not able to do that in a Asp.net webpage.
Posted
Updated 30-Aug-16 21:38pm
Comments
F-ES Sitecore 18-Aug-16 9:04am    
This question is asked all the time, google "access web cam from asp.net"

You can download the sample code:
[ASP.NET-C#] Read barcode from webcam[^]

Steps to implement the solution
1. Use HTML5 to open a webcam in your web browser.
2. Display the webcam preview on a canvas.
3. Send the canvas data (base64 string) to the server-side that built in ASP.NET.
4. Read barcodes from the image data with any barcode SDK you like.
 
Share this answer
 
 
Share this answer
 
Comments
Member 14594749 25-Sep-19 14:02pm    
Dont make people fool, Guys link he mentioned above its just a spam, not working.

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