473,385 Members | 1,523 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Error While migration asp to ASP.Net on Windows 2008 R2(64 bit) Server

We are porting our 32 bit (ASP) application to 64 bit (ASP.NET). Current we facing problem on sending Image (binary) Data from ASPX to Com DLL.

Below is ASPX and Com Code.

ASPX Code:

Dim MyStream As System.IO.Stream
Dim FileInByteArr As Byte() = New Byte(FileLen) {}

'Initialize the stream.
MyStream = PostedFile.InputStream

' Read the file into the byte array.
MyStream.Read(FileInByteArr, 0, FileLen)

objsign = CreateObject("ImgCom.Image")

retval = objsign.SaveImage(xmldoc.xml, FileInByteArr, FileLen, ErrMsg1)

if retval = 0 Then
Errmsg = 0
else
Errmsg = ErrMsg1
end if

Com Code:

SaveImage( VARIANT pv_request,
VARIANT *pv_binary,
VARIANT v_lImageSize,
VARIANT *p_err_msg,
VARIANT *p_retval
)
{
SAFEARRAY* l_img_dtl_array;
unsigned char *l_ptr_temp;
unsigned char *l_image_str;
int l_image_len = 0;

l_img_dtl_array = pv_binary->parray; // on 32 bit its working fine getting data correct but on 64bit window getting Cry junk data

CM_show_debug("\n l_img_dtl_array : %d ", l_img_dtl_array);


l_image_len = l_img_dtl_array->rgsabound[0].cElements;

CM_show_debug("\n l_image_len : %d ", l_image_len);



memset(l_image_str,0,sizeof(l_image_str));

l_ptr_temp = static_cast<BYTE*> (l_img_dtl_array->pvData); // length goes in minus on 64 bit windows ...

CM_show_debug("\n l_ptr_temp : %d ", l_ptr_temp);


memcpy(l_image_str,l_ptr_temp,l_image_len);

// opration to save in Database
}

above code is working fine on 32 bit system but on 64 bit it fails getting junk Data.

on console output getting as mention below.

******************* Windows 2003 (32 bit) Working ******************

l_img_dtl_array : 922480
l_image_len : 7429
l_ptr_temp : 1016856

******************* Windows 2008 (64 Bit) ******************
l_img_dtl_array : 4829760
l_image_len : 1
l_ptr_temp : -2013265840

Any kind of help or articles regarding this would be of great help.
Sep 21 '12 #1
1 2380
JamieHowarth0
533 Expert 512MB
Hi there,

Have you tried checking that the app pool in which ASP.NET is running has got "Enable 32-bit applications" set?

Best,

Benjamin
Sep 21 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: dbwmn2001 | last post by:
I have a SAP Server running SQL2000 on Windows 2003. Recently I migrated the server from a NT4 Domain to a AD Domain using ADMT (with SID Migration for users) and everything seems ok. Now, after...
0
by: Peter D. Dunlap | last post by:
I have a number of web sites on my 2003 server, each of the independent sites (i.e., not subdirectories of the localhost site). The way I have always set these up in the past is: 1. Create a...
6
by: SEFL | last post by:
Hi there, I'm trying to write a VBS that accesses a local database on my system (personal project). I'm running Windows XP 64-bit with Access XP. Every time I try to access the database on...
0
by: hafeez | last post by:
Hi, I am using SQL SERVER 2005 standard edition in windows xp environment. And remote system also have same SQL SERVER 2005 standard edition windows xp environment. I am using LINKED SERVER...
3
by: TexasAggie96 | last post by:
I have written a windows service in VS 2005 and created a setup for install on a 2003 64 bit server. When the installer adds the registry components they are created in the WOW6432NODE key under...
1
by: shapper | last post by:
Hello, What are the release dates for Windows 2008 (with IIS 7) and SQL 2008? Thanks, Miguel
0
by: vickeec | last post by:
Hello, Does anyone know how to join a windows 2008 CORE server to a workgroup? I've attempted it with WMIC and these instructions provided by Microsoft - computersystem where...
4
by: =?Utf-8?B?QXZhRGV2?= | last post by:
ASP.Net 2. We are migrating to Windows 2008 64 bit Server with IIS 7 from Windows 2003 32 Bit with IIS 6. A few library classes we wrote uses impersonation in code like explained in this...
0
by: Jason7899 | last post by:
hi, i have the windows 2008 standard edition and i want share my fax services to the other pc´s of my network i have done this with small bussiness 2003 and so far i remember i simple install...
4
by: garethharvey | last post by:
we are moving our site to a Windows 2008 server (currently on Windows 2003), I am having problems with session cookies. Any page that is protected with a session cookie is producing the following...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.