Connecting Tech Pros Worldwide Forums | Help | Site Map

Printing from ASP.NET code behind

Gravy
Guest
 
Posts: n/a
#1: Nov 19 '05
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.

Hans Kesting
Guest
 
Posts: n/a
#2: Nov 19 '05

re: Printing from ASP.NET code behind


Gravy wrote:[color=blue]
> 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.[/color]

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
Gravy
Guest
 
Posts: n/a
#3: Nov 19 '05

re: Printing from ASP.NET code behind


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:
[color=blue]
> Gravy wrote:[color=green]
> > 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.[/color]
>
> 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
>[/color]
David Jessee
Guest
 
Posts: n/a
#4: Nov 19 '05

re: Printing from ASP.NET code behind


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" <Gravy@discussions.microsoft.com> wrote in message
news:D246A777-FCF3-4F73-977F-55086C718BD0@microsoft.com...[color=blue]
> Hi Hans,
>
> I expect and want the printing to happen in the back office, ie off the[/color]
web[color=blue]
> server. the report is basically some sort of order summary that the back
> office staff require.
>
>
>
> "Hans Kesting" wrote:
>[color=green]
> > Gravy wrote:[color=darkred]
> > > I have a requirement that I need to print a crystal report from[/color][/color][/color]
ASP.NET.[color=blue][color=green][color=darkred]
> > >
> > > Now, the problem I have is that the default account for ASPNET_WP.EXE[/color][/color][/color]
is[color=blue][color=green][color=darkred]
> > > ASPNET under windows XP. I want to change this to another account that[/color][/color][/color]
has a[color=blue][color=green][color=darkred]
> > > 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[/color][/color][/color]
only[color=blue][color=green][color=darkred]
> > > 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[/color][/color][/color]
then[color=blue][color=green][color=darkred]
> > > it is possible to change the identity of the resulting COM+ package[/color][/color][/color]
this is[color=blue][color=green][color=darkred]
> > > created. However, having changes this setting to High my web app still[/color][/color][/color]
uses[color=blue][color=green][color=darkred]
> > > the one ASPNET_WP.exe process (when looking at Task Manager). The new[/color][/color][/color]
COM+[color=blue][color=green][color=darkred]
> > > 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[/color][/color][/color]
print[color=blue][color=green][color=darkred]
> > > without user intervention?
> > >
> > > Thanks for any help.[/color]
> >
> > 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
> >[/color][/color]


Gravy
Guest
 
Posts: n/a
#5: Nov 19 '05

re: Printing from ASP.NET code behind


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:
[color=blue]
> 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" <Gravy@discussions.microsoft.com> wrote in message
> news:D246A777-FCF3-4F73-977F-55086C718BD0@microsoft.com...[color=green]
> > Hi Hans,
> >
> > I expect and want the printing to happen in the back office, ie off the[/color]
> web[color=green]
> > server. the report is basically some sort of order summary that the back
> > office staff require.
> >
> >
> >
> > "Hans Kesting" wrote:
> >[color=darkred]
> > > Gravy wrote:
> > > > I have a requirement that I need to print a crystal report from[/color][/color]
> ASP.NET.[color=green][color=darkred]
> > > >
> > > > Now, the problem I have is that the default account for ASPNET_WP.EXE[/color][/color]
> is[color=green][color=darkred]
> > > > ASPNET under windows XP. I want to change this to another account that[/color][/color]
> has a[color=green][color=darkred]
> > > > 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[/color][/color]
> only[color=green][color=darkred]
> > > > 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[/color][/color]
> then[color=green][color=darkred]
> > > > it is possible to change the identity of the resulting COM+ package[/color][/color]
> this is[color=green][color=darkred]
> > > > created. However, having changes this setting to High my web app still[/color][/color]
> uses[color=green][color=darkred]
> > > > the one ASPNET_WP.exe process (when looking at Task Manager). The new[/color][/color]
> COM+[color=green][color=darkred]
> > > > 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[/color][/color]
> print[color=green][color=darkred]
> > > > 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
> > >[/color][/color]
>
>
>[/color]
Closed Thread