Go though this docs,hope it will solve the problem.
If users do not have access to the applications required to print exported reports, you may want to enable users to print their report from the server. With server-side printing, reports are generated on the Web server and are printed to a printer that is installed to the Web server. Users can have the option to choose the printer that is near their location and allow the printing to be handled by the server.
The requirements for server-side printing are:
the printers must be installed to the Web server
the local SYSTEM account is given access to the printers
the Machine.config file holding configuration settings for the .NET Framework is edited to give the ASPNET worker process access to the system settings on the server.
Note Implementing server-side printing involves changing the default permissions on the server and is not recommended for applications that are exposed to the Internet.
To setup server-side printing you need to ensure the process under which ASP.NET is running has sufficient permissions to access Network printers. By default, ASP.NET runs with the permissions of the local âmachineâ (ASPNET account for the ASPNET worker process) account. In order to achieve network printing through IIS (Internet Information Services), the Framework should be run under the local SYSTEM account.
To setup server-side printing
Access the Machine.config files which is located by default at:
C:\WINNT\Microsoft.NET\Framework\<VersionNumber>\C ONFIG\
<VersionNumber> is the version of the .NET Framework installed to the computer. The account setting is contained within the <ProcessModel> tag of this file. The default setting for the account is: userName="machine" password="AutoGenerate"
Edit the default configuration settings in the Machine.config file. Change the default setting to:
userName="SYSTEM" password="AutoGenerate"
Save the file.
It is now possible to give the local SYSTEM account on the server permissions to print.
If the printer is a network printer, expose the network printer to the local SYSTEM account.
When a printer is installed to a computer, the settings for this printer are stored in the registry under the HKEY_CURRENT_USER registry hive (Registry file). The IIS process will never use this registry hive since it always runs under the context of the local SYSTEM account and cannot be logged onto a server as a âCurrent Userâ. By default, the SYSTEM account does not have any printers set up in the registry. There are two Microsoft knowledge base articles, Q152451 and Q184291 that explain how to expose the printer settings to the System account. Both of these articles require editing the registry on the Web server and copying the printer settings from the HKEY_CURRENT_USER hive to the HKEY_USERS/.DEFAULT hive.
See Also
syedjavid
|