473,385 Members | 1,838 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.

Printing from ASP.NET code behind

I have a requirement that I need to print a crystal report from ASP.NET.

Now, the problem I have is that the default account for ASPNET_WP.EXE is
ASPNET under windows XP. I want to change this to another account that has a
printer setup on. In W2k3 I know it is possible to change the process
identity but is it possible to do the same in XP?

One thing I don't want to do is to change the machine.config file, I only
want this one web site to run with this different user account.

I did read that if you set the Application Protection (in IIS) to high then
it is possible to change the identity of the resulting COM+ package this is
created. However, having changes this setting to High my web app still uses
the one ASPNET_WP.exe process (when looking at Task Manager). The new COM+
package for this site isn't activated either.

Can anyone tell me what I'm doing wrong? Why don't I see more than one
ASPNET_WP.EXE? Is there a better way to give me ASP.NET the ability to print
without user intervention?

Thanks for any help.
Nov 19 '05 #1
4 4841
Gravy wrote:
I have a requirement that I need to print a crystal report from ASP.NET.

Now, the problem I have is that the default account for ASPNET_WP.EXE is
ASPNET under windows XP. I want to change this to another account that has a
printer setup on. In W2k3 I know it is possible to change the process
identity but is it possible to do the same in XP?

One thing I don't want to do is to change the machine.config file, I only
want this one web site to run with this different user account.

I did read that if you set the Application Protection (in IIS) to high then
it is possible to change the identity of the resulting COM+ package this is
created. However, having changes this setting to High my web app still uses
the one ASPNET_WP.exe process (when looking at Task Manager). The new COM+
package for this site isn't activated either.

Can anyone tell me what I'm doing wrong? Why don't I see more than one
ASPNET_WP.EXE? Is there a better way to give me ASP.NET the ability to print
without user intervention?

Thanks for any help.


Question: where do you expect the printing to occur?
When you succeed in printing from code-behind, it will be on the server,
not on the client!

Hans Kesting
Nov 19 '05 #2
Hi Hans,

I expect and want the printing to happen in the back office, ie off the web
server. the report is basically some sort of order summary that the back
office staff require.

"Hans Kesting" wrote:
Gravy wrote:
I have a requirement that I need to print a crystal report from ASP.NET.

Now, the problem I have is that the default account for ASPNET_WP.EXE is
ASPNET under windows XP. I want to change this to another account that has a
printer setup on. In W2k3 I know it is possible to change the process
identity but is it possible to do the same in XP?

One thing I don't want to do is to change the machine.config file, I only
want this one web site to run with this different user account.

I did read that if you set the Application Protection (in IIS) to high then
it is possible to change the identity of the resulting COM+ package this is
created. However, having changes this setting to High my web app still uses
the one ASPNET_WP.exe process (when looking at Task Manager). The new COM+
package for this site isn't activated either.

Can anyone tell me what I'm doing wrong? Why don't I see more than one
ASPNET_WP.EXE? Is there a better way to give me ASP.NET the ability to print
without user intervention?

Thanks for any help.


Question: where do you expect the printing to occur?
When you succeed in printing from code-behind, it will be on the server,
not on the client!

Hans Kesting

Nov 19 '05 #3
to set the windows account for an individual app..

<identity impersonate = "false" username="domain\usr" password="pwd"/>

also, look at the aspnet_setreg tool on the MS site

"Gravy" <Gr***@discussions.microsoft.com> wrote in message
news:D2**********************************@microsof t.com...
Hi Hans,

I expect and want the printing to happen in the back office, ie off the web server. the report is basically some sort of order summary that the back
office staff require.

"Hans Kesting" wrote:
Gravy wrote:
I have a requirement that I need to print a crystal report from ASP.NET.
Now, the problem I have is that the default account for ASPNET_WP.EXE is ASPNET under windows XP. I want to change this to another account that has a printer setup on. In W2k3 I know it is possible to change the process
identity but is it possible to do the same in XP?

One thing I don't want to do is to change the machine.config file, I only want this one web site to run with this different user account.

I did read that if you set the Application Protection (in IIS) to high then it is possible to change the identity of the resulting COM+ package this is created. However, having changes this setting to High my web app still uses the one ASPNET_WP.exe process (when looking at Task Manager). The new COM+ package for this site isn't activated either.

Can anyone tell me what I'm doing wrong? Why don't I see more than one
ASPNET_WP.EXE? Is there a better way to give me ASP.NET the ability to print without user intervention?

Thanks for any help.


Question: where do you expect the printing to occur?
When you succeed in printing from code-behind, it will be on the server,
not on the client!

Hans Kesting

Nov 19 '05 #4
Thanks David,

but I tried that and aspnet_wp.exe still started under the ASPNET user
account and I don't think having the threads identity change is sufficient to
get access to the local printers.

Regards

"David Jessee" wrote:
to set the windows account for an individual app..

<identity impersonate = "false" username="domain\usr" password="pwd"/>

also, look at the aspnet_setreg tool on the MS site

"Gravy" <Gr***@discussions.microsoft.com> wrote in message
news:D2**********************************@microsof t.com...
Hi Hans,

I expect and want the printing to happen in the back office, ie off the

web
server. the report is basically some sort of order summary that the back
office staff require.

"Hans Kesting" wrote:
Gravy wrote:
> I have a requirement that I need to print a crystal report from ASP.NET. >
> Now, the problem I have is that the default account for ASPNET_WP.EXE is > ASPNET under windows XP. I want to change this to another account that has a > printer setup on. In W2k3 I know it is possible to change the process
> identity but is it possible to do the same in XP?
>
> One thing I don't want to do is to change the machine.config file, I only > want this one web site to run with this different user account.
>
> I did read that if you set the Application Protection (in IIS) to high then > it is possible to change the identity of the resulting COM+ package this is > created. However, having changes this setting to High my web app still uses > the one ASPNET_WP.exe process (when looking at Task Manager). The new COM+ > package for this site isn't activated either.
>
> Can anyone tell me what I'm doing wrong? Why don't I see more than one
> ASPNET_WP.EXE? Is there a better way to give me ASP.NET the ability to print > without user intervention?
>
> Thanks for any help.

Question: where do you expect the printing to occur?
When you succeed in printing from code-behind, it will be on the server,
not on the client!

Hans Kesting


Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: owyn | last post by:
Our work group has migrated to the .NET environment from some differing back grounds. I am the newest member of the group so I am stuck with the ASPX pages. I am doing the code behind in C#. Our...
7
by: Dennis C. Drumm | last post by:
I was wondering if someone could suggest were/how I could get started with setting up printing of a collection of text that includes tables from a grid and other supporting information about the...
6
by: mg | last post by:
The following .exe and its parameters work correctly from the command prompt (it prints x.pdf without prompting the user. acrord32.exe /t "c:\exportfiles\x.pdf" "HP LaserJet 3300 Series PCL 6"...
6
by: Chris Dunaway | last post by:
The method for printing documents in .Net can be confusing, especially for newer users. I would like to create a way to simplify this process. My idea would be implemented using a PrintDocument...
8
by: Frank Rizzo | last post by:
I am trying to print huge images (much bigger than target paper). I try and use e.PageSettings.HardMarginX and e.PageSettings.HardMarginY in the PrintDocument's PrintPage event to try and...
0
by: Iain Wilson | last post by:
I am pulling my hair out trying to print various objects from a .net web page My apologies for cross posting but I need an answer and my previous post has attracted no interest. ASP.Net 2.0...
7
by: Iain Wilson | last post by:
I am pulling my hair out trying to print various objects from a .net web page My apologies for cross posting but I need an answer and my previous post has attracted no interest. ASP.Net 2.0...
0
by: gnewsgroup | last post by:
In my asp.net 2.0 web application. I create chart images on the fly by getting the data from the database. These chart images all have fixed width, but the height is dynamic depending on the...
18
by: Brett | last post by:
I have an ASP.NET page that displays work orders in a GridView. In that GridView is a checkbox column. When the user clicks a "Print" button, I create a report, using the .NET Framework printing...
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.