By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,998 Members | 2,837 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,998 IT Pros & Developers. It's quick & easy.

Printing from ASP.NET code behind

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.