Trouble Printing From Iis Follow

0
Avatar
Legacy Poster

I have the following code that successfully works and prints from my local development machine. This was adapted from the WebLabelPrint SDK example
[code]
using (var taskManager = new TaskManager())
{
taskManager.Start(1);
var taskPrint = GetPrintTask(lot.PartNumber);
taskManager.TaskQueue.QueueTask(taskPrint);
WaitForPrint(taskPrint);
taskPrint = GetPrintTask(lot.LotNumber);
taskManager.TaskQueue.QueueTask(taskPrint);
WaitForPrint(taskPrint);
taskManager.Stop(1000, true);
}
[/code]

The problem I have encountered has been when deploying to IIS 7. the problem has been the following line of code
[code]
taskManager.Start(1)
[/code]
This first lead to the following exception
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.

I overcame this problem by impersonating a user with permissions to execute the bartend.exe

However solving this problem by impersonation lead me to receive the following bartender exception.
"The TaskEngine has failed to start"
From the stack trace I was lead to a method of
Engine.Start(WindowsIdentity identity)

I am new to using IIS 7 so I am attempting to deduce if this is a simple IIS 7 setting to change or if it needs to be a code fix. Any suggestions would be greatly appreciated.

3 comments

0
Avatar
Gene Henson
Moderator

It is unclear what Operating System you are using, but one thing to note is that the application pool for BarTender must be set to 32-bit mode.

To accomplish this:

[list=1]

[*]Open IIS and go to the Application Pools dialog.
[*]Select the application pool you are using and click on Advanced Settings.
[*]Find Enable 32-Bit Applications and set to True
[*]Restart your IIS Application pool
[/list]
0
Avatar
Legacy Poster

[quote name='Gene H - Seagull Support' timestamp='1310573610' post='211']
It is unclear what Operating System you are using, but one thing to note is that the application pool for BarTender must be set to 32-bit mode.

To accomplish this:

[list=1]

[*]Open IIS and go to the Application Pools dialog.
[*]Select the application pool you are using and click on Advanced Settings.
[*]Find Enable 32-Bit Applications and set to True
[*]Restart your IIS Application pool
[/list]
[/quote]

I am developing on a Windows 7 Home Premium machine. I have already set the application pool to 32-bit that the website runs under. This was already required due to some internal dlls we use.

I have successfully been able get everything to compile and run in IIS 7 by setting the application pool identity to an account with elevated permissions and removed <identity impersonation="true" ..> from the web.config, but nothing is still being printed to the network printer. At this point I am assuming bartender is may be catching an exception a storing a message about the error similar to IBtFormat.Print() method.

I am now logging the messages from PrintLabelFormatTask.Mesages to a logfile on the IIS Server. I am receiving the following error message

"There is an error in the Page Setup dialog. Please fix the problem and
try again."

What might be the most probable cause of this? Again this works fine running through the VS debugger. I now get this only when running through IIS

I solved my issue on the Page Setup dialog. It was due to the selected font in the .btw file.
0
Avatar
Legacy Poster

I added a new unit xml tag which makes a unit unable to be attacked, enables it to enter the same plot as an enemy unit, and even enter enemy cities without capturing them. I then added a unit mission which made the unit able to boost diplomacy with the owner of the capital it was in. The diplomacy boost, however, does not take effect until the next turn.

If you are at war with the owner of the capital in which the unit is boosting diplomacy, you can still enter the capital and perform the mission, but every time an enemy unit enters its visibility range, it wakes the unit. This is annoying not only because you have to repeatedly click the mission on subsequent turns, but also because, since the diplomacy boost does not take effect until the next turn, you do not get the boost if the unit is being woken every turn.

So my question is, is anyone aware of the function which wakes a unit from its mission when an enemy unit enters its visibility range? I have been thoroughly searching the SDK, but I cant seem to find the function anywhere. Any help would be greatly appreciated.

Thanks in advance

Please sign in to leave a comment.