Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. IIS and Printing

IIS and Printing

Scheduled Pinned Locked Moved Web Development
helpwindows-admintutorial
6 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    Zeyad Jalil
    wrote on last edited by
    #1

    Hi, I develop a web application and when click a print button it print direct to the default printer and it's work fine, but when I publish the application on the IIS the print doesn't work. error is : Object reference not set to an instance of an object. Please let me know how to configure the IIS and Print permission becasuse we think the problem is in the permission. Thanks

    N 1 Reply Last reply
    0
    • Z Zeyad Jalil

      Hi, I develop a web application and when click a print button it print direct to the default printer and it's work fine, but when I publish the application on the IIS the print doesn't work. error is : Object reference not set to an instance of an object. Please let me know how to configure the IIS and Print permission becasuse we think the problem is in the permission. Thanks

      N Offline
      N Offline
      Nathan Minier
      wrote on last edited by
      #2

      So you're trying to access the default printer from C#, which means that your application is trying to print on the server. If you're trying to print on the client side, you'll need to do it in the client-side language, namely JavaScript (window.print()). This sort of things often "works" in a development environment, where the server and client are normally the same machine. In the cloud, though, servers are generally VMs with no printer setup. If a printer was setup you wouldn't see an error message: the document would simply print at the server's default printer, and only the IPP admins know where that is.

      "There are three kinds of lies: lies, damned lies and statistics." - Benjamin Disraeli

      Richard DeemingR A 2 Replies Last reply
      0
      • N Nathan Minier

        So you're trying to access the default printer from C#, which means that your application is trying to print on the server. If you're trying to print on the client side, you'll need to do it in the client-side language, namely JavaScript (window.print()). This sort of things often "works" in a development environment, where the server and client are normally the same machine. In the cloud, though, servers are generally VMs with no printer setup. If a printer was setup you wouldn't see an error message: the document would simply print at the server's default printer, and only the IPP admins know where that is.

        "There are three kinds of lies: lies, damned lies and statistics." - Benjamin Disraeli

        Richard DeemingR Offline
        Richard DeemingR Offline
        Richard Deeming
        wrote on last edited by
        #3

        NB: In Windows, printers are installed and configured per user. Even if the server admin installed and configured a printer under the administrator account, it wouldn't be available to the server account(s) under which IIS applications run. Getting the printer configured on the server for IIS would involve manipulating the registry.


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

        Z N 2 Replies Last reply
        0
        • Richard DeemingR Richard Deeming

          NB: In Windows, printers are installed and configured per user. Even if the server admin installed and configured a printer under the administrator account, it wouldn't be available to the server account(s) under which IIS applications run. Getting the printer configured on the server for IIS would involve manipulating the registry.


          "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

          Z Offline
          Z Offline
          ZurdoDev
          wrote on last edited by
          #4

          Richard Deeming wrote:

          Getting the printer configured on the server for IIS would involve manipulating the registry.

          Or just changing the App Pool to run with an account that does have a printer setup? Still, probably not a good idea.

          There are only 10 types of people in the world, those who understand binary and those who don't.

          1 Reply Last reply
          0
          • Richard DeemingR Richard Deeming

            NB: In Windows, printers are installed and configured per user. Even if the server admin installed and configured a printer under the administrator account, it wouldn't be available to the server account(s) under which IIS applications run. Getting the printer configured on the server for IIS would involve manipulating the registry.


            "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

            N Offline
            N Offline
            Nathan Minier
            wrote on last edited by
            #5

            Richard Deeming wrote:

            Getting the printer configured on the server for IIS would involve manipulating the registry.

            Or GPO and a print server. I guess environment does have a big impact on worldview.

            "There are three kinds of lies: lies, damned lies and statistics." - Benjamin Disraeli

            1 Reply Last reply
            0
            • N Nathan Minier

              So you're trying to access the default printer from C#, which means that your application is trying to print on the server. If you're trying to print on the client side, you'll need to do it in the client-side language, namely JavaScript (window.print()). This sort of things often "works" in a development environment, where the server and client are normally the same machine. In the cloud, though, servers are generally VMs with no printer setup. If a printer was setup you wouldn't see an error message: the document would simply print at the server's default printer, and only the IPP admins know where that is.

              "There are three kinds of lies: lies, damned lies and statistics." - Benjamin Disraeli

              A Offline
              A Offline
              areenamichael
              wrote on last edited by
              #6

              Great information you have share with us. Thank ypu for this. ioS App Developers

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups