Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 23rd, 2006, 03:30 PM
Authorized User
 
Join Date: Aug 2003
Posts: 18
Thanks: 0
Thanked 1 Time in 1 Post
Default 64 Bit - Issue in 64 bit IIS calling Win32 API

Hello,

I have an ASP application that prints from the server using Win32 spooler (see http://support.microsoft.com/kb/322091/EN-US/). Essentially, my program was written for an old ASP program to allow it to print raw data to a barcode printer. It runs in server side javascript. My print functions are in a class written in C# and is exposed for COM Interop and has a CPU Target of Any CPU.

The program works perfectly on Std. Windows 2003 or in Windows 2003 64 bit edition as long as IIS is set for 32 bit mode.

I have tried setting the Target CPU to x64, but it will not compile. I get the following error:

Error 1 File "C:\Programs\ZebraLabels\bin\ZebraLabels.dll" is not a valid assembly. ZebraLabels
Warning 2 Possible problem detected while building assembly 'ZebraLabels': Referenced assembly 'mscorlib.dll' targets a different processor
Warning 3 Possible problem detected while building assembly 'ZebraLabels': Referenced assembly 'System.Data.dll' targets a different processor

Interestingly enough, I wrote a windows form application in c# that calls my printer class using the Target CPU as x64 and it works! So, it looks like the problem is in IIS.

My question, then, is does anyone know how to fix this, OR, does anyone know how to print for VB or C# raw to a printer in any other way?

Thanks!

Hubman
 
Old August 24th, 2006, 09:19 AM
Authorized User
 
Join Date: Aug 2003
Posts: 18
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hello,

I have an update. I have found that my class (that calls winspool.drv through win32 API calls for RAW printing) works in 64 bit mode IIS when used in a ASPX page created with c#. This page is pure .NET and calls my class "code behind" in c#. I still have not been able to call the class through server side javascript (ex- var bc = new ActiveXObject("CFW.Barcode.ZebraLabels");).

So, if you're writing pure ASP.NET pages with "code behind" I think the code is executing in 64 bit mode and calling the 64 bit version of winspool.drv, but this is just a guess.

It may also be related to server side javascript as well.

Comments?





Similar Threads
Thread Thread Starter Forum Replies Last Post
install sql server 2005 64-bit khautinh SQL Server 2005 0 November 19th, 2008 01:43 PM
base 64 data in transform golddog XSLT 4 September 14th, 2007 08:39 AM
64 bit p0120144 BOOK: Professional Assembly Language 1 December 26th, 2006 10:04 PM
Figure 4-7 on p. 64 clm3cv BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 1 March 27th, 2005 09:19 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.