|
I have been working on integrating the Besa sample code into our ASP.Net MVC web application to connect to the cameras remotely. I have tried a number of the automated login code samples and I keep getting this error: (Please see attachments)
Here is a sample of the code I'm working with. Just want to get it to connect before moving on.
@{
ViewBag.Title = "TEST";
}
@section scripts {
<script src="~/Scripts/jsw.js"></script>
<script>
// 192.168.11.230:9701
window.onload = function () {
jSW.swInit ({
Url: 'http://192.168.11.230:9701', // bv_nginx.exe server address
Calltype: jSW.CallProtoType.HTTP,
});
}
window.onbeforeunload = function () {
jSW.swDeInit ();
}
if (this.session) { delete this.session; }
this.session = new jSW.SWSession({
Server: 'http://127.0.0.1',
port: '9701',
onopen: function(sess) {
sess.swLogin ({
user: 'admin',
password: '123456'
})
},
onclose: function(sess, evt) {
console.log(sess)
}
});
// Register event callback function
this.session.swAddCallBack('login', function (sender, event, json) {
alert(JSON.stringify(json, null, 4));
});
this.session.swLogin();
</script>
}
I have included the jsw.js file in the project. This is a non-OCX application. Am I missing any other components that may be required?
|
|