Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 23rd, 2006, 04:30 PM
Authorized User
 
Join Date: Aug 2003
Location: Durham, NC, USA.
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
  #2 (permalink)  
Old August 24th, 2006, 10:19 AM
Authorized User
 
Join Date: Aug 2003
Location: Durham, NC, USA.
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?
Closed Thread


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 09: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



All times are GMT -4. The time now is 05:56 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.