Support Center

Not able to use in web browser

Chander Parkash May 02, 2014 06:48AM EDT

Hello,

I don't have licence..
I am new to use this feature.
I am using .net 4.0 framework with VS 2013 in MVC application.

framework 2.0 and 3.5 sp2 and 4.0 is installed on my system.
I used the caspol command for both 2.0 and 4.0 framework.
website or IP is added into trusted zone in IE.
configured all setting on IIS 7.

but Its not working & returns error as
"Your .NET Framework Security settings must be configured to run the ImageMan components in your browser. "

2 Data Techniques Responses and 2 Community Responses

Up 5 Rated Down
DTI Support  Data Techniques Employee May 02, 2014 08:38AM EDT

Hello,

Please follow the steps in this Kbase article to diagnose this issue:

http://help.data-tech.com/customer/portal/articles/86110-imageman-net-twain-troubleshooting-webforms-deployment-issues

Thanks for your interest in our products and please let us know if you have any questions.

Sincerely,
Sean
Data Techniques Support

Up 4 Rated Down
DTI Support  Data Techniques Employee May 05, 2014 09:41AM EDT

Hello,

Please send me the code for the entire page so I can see how you instantiate the controls as well.

Thanks for your interest in our products and please let us know if you have any questions.

Sincerely,
Sean
Data Techniques Support

Up 4 Rated Down
Chander Parkash  Data Techniques Employee May 06, 2014 09:28AM EDT

<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Home Page
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">



<object id="up" height=1 width=1 class="DTI.ImageMan.Twain.dll#DTI.ImageMan.Twain.HttpUpload">
</object>
<object id="twain" height=1 width=1 class="DTI.ImageMan.Twain.dll#DTI.ImageMan.Twain.TwainControl"> </object>




<br />
<%--<form id="Form1" runat="server">--%>
<button id="Select" onclick="javascript:SelectDevice()" type="button" runat="server">
Select Scanner</button>&nbsp;
<button id="Scan" onclick="javascript:ScanIt()" type="button" runat="server">
Scan</button>
<br/>
<br/>
<select id="ImageFormat">
<option value="0" selected>Single Page Png Files</option>
<option value="1">Single Page Tiff Files</option>
<option value="2">Multiple Page Tiff File</option>
</select>
<br/>
<br/>
<input id="ScanAll" type="checkbox" checked="checked"/>
Scan All Pages&nbsp;
<input id="Adf" type="checkbox" checked="checked"/>
Use ADF
<%--</form>--%>

<script type="text/javascript">
function CheckForControls() {
// Check to see if the controls were downloaded and can be instantiated, if they werent its most likely due to
// the .Net permissions not being configured properly.
// WHen the controls arent allowed to run we'll either have null values for the two objects which we test below
// or we'll get a 'Class doesnt support automation' exception which we catch via the catch handler below.
try {
debugger

for (var key in up.items) {
if (data.hasOwnProperty(key)) {
alert(key);
}
}

if (up.items == null || twain.MaxPages == null) {
alert("Your .NET Framework Security settings must be configured to run the ImageMan components in your browser.");
return false;
}
} catch (e) {

alert("1 Your .NET Framework Security settings must be configured to run the ImageMan components in your browser.");
return false;
}

return true;
}

function ScanIt() {
var img;
up.Items.Clear();
up.Items.ImageFormat = document.forms[0].ImageFormat.selectedIndex;

if (document.forms[0].ScanAll.checked)
twain.MaxPages = -1;
else
twain.MaxPages = 1;

if (document.forms[0].Adf.checked)
twain.UseADF = true;
else
twain.UseADF = false;

window.status = 'Scanning...';
document.getElementById('res').innerHTML = "<B>Scanning Page...</b>";

img = twain.ScanPage();

while (img != null) {

up.Items.AddImage(img);
img = twain.ScanPage();
}

if (up.Items.Count > 0) {
window.status = 'Uploading Images...';
var bUplOk = ""; //up.Post(" =PostUrl %>testup.aspx");
up.Items.Clear();
window.status = 'Images Uploaded...';
if (bUplOk)
document.getElementById('res').innerHTML = up.Response;
else {
document.getElementById('res').innerHTML = "An error occurred...<br/>" + up.LastError;
alert(up.LastError);
}
}

twain.CloseSource();
}

function SelectDevice() {
debugger
if (!CheckForControls())
return;

twain.SelectScanner();
}

</script>
</asp:Content>

Up 1 Rated Down
Chander Parkash  Data Techniques Employee May 06, 2014 09:28AM EDT

Please provide me solution to this problem so that I can test the compatibility with our application.
If you know any other information then please let me know..

Waiting for your reply..

This question is closed to new answers.

Contact Us