Click here to Skip to main content
15,891,905 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

In an intranet web application I am using this code to print a rtf document:
Dim printJob As Process = New Process
printJob.StartInfo.FileName = Filepath
printJob.StartInfo.Verb = "print"
printJob.Start()
printJob.WaitForExit()

It was working fine on windows2003 and IIS6 installation.
Now we are moving to new websever windows2008 r2 and IIS7 and somehow i cannot get the function working.

I am able to print the document directly on the web server but from the web application it wont work.

Can anyone point me into a direction how to solve it?

Thanks in advance
Posted
Updated 14-Oct-15 3:29am
v2
Comments
ZurdoDev 14-Oct-15 10:12am    
All you're essentially doing is trying to open .rtf file with verb of "print." You need to check your file associations and see if that is even setup on the new server. Go to Control Panel, Default Programs and make sure rtf is setup correctly.
Astrid Spaan 15-Oct-15 2:30am    
.rtf file is setup to word and it print s fine directly from the webserver but not from the webapplication
Astrid Spaan 15-Oct-15 8:00am    
but even when i try to print a txt file( so no office involved) nothing is printed

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900