Click here to Skip to main content
15,995,305 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello....
Am developed website for webcam capturing images using flash player(.swf) in asp.net4.0 and iis6. But hosted in server 2008 r2 ii7/7.5 is not working. Here am used JSON object,Please help me!. Required any server configuration?

XML
<script src='<%=ResolveUrl("~/Webcam_Plugin/jquery.webcam.js") %>' type="text/javascript"></script>
<script type="text/javascript">
    var pageUrl = '<%=ResolveUrl("~/CS.aspx") %>';
    $(function () {
        jQuery("#webcam").webcam({
            width: 214,
            height: 140,
            mode: "save",
            swffile: '<%=ResolveUrl("~/Webcam_Plugin/jscam.swf") %>',
            debug: function (type, status) {
                $('#camStatus').append(type + ": " + status + '<br /><br />');
            },
            onSave: function (data) {
                $.ajax({
                    type: "POST",
                    url: pageUrl + "/GetCapturedImage",
                    data: '',
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (r) {
                        $("[id*=imgCapture]").css("visibility", "visible");
                        $("[id*=imgCapture]").attr("src", r.d);
                    },
                    failure: function (response) {
                        alert(response.d);
                    }
                });
            },
            onCapture: function () {
                webcam.save(pageUrl);
            }
        });
    });
    function Capture() {
        webcam.capture();
        return false;
    }
</script>


XML
<asp:Image ID="imgCapture" runat="server" Style="width:185px; height:140px;" />
                            <br />
                                <asp:Button ID="btnCapture" Text="Capture" runat="server" OnClientClick="return Capture();" style="font-weight: 700; color: #0033CC" />
                            <br />
                                <div id="webcam">
                            </div>


Thank u.
Posted
Updated 24-Jun-14 23:25pm
v4
Comments
[no name] 25-Jun-14 5:50am    
Flash is a browser feature, make sure the browser you're using supports Flash. And what do you mean by not working? Any errors?
[no name] 25-Jun-14 6:19am    
Not capturing image from flash, but it is working in local system of server 2008 r2. No error getting on click_event. Thank u.
[no name] 25-Jun-14 7:16am    
SQL Server has got nothing to do with this problem, it might be a permissions issue, right click your Flash player, click settings and check if appropriate permissions have been granted.
[no name] 25-Jun-14 7:44am    
Ya, am given all rights to entire project. K it is working local why how?
Thank u.
[no name] 25-Jun-14 6:19am    
Not capturing image from flash, but it is working in local system of server 2008 r2. No error getting on click_event. Thank u.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


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