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
D

daveg55

@daveg55
About
Posts
5
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Using system.printing namespace to get print queue status
    D daveg55

    Hi I'm trying to use the system.printing namespace to get the status of print queues on a print server. Unfortunately the only status I ever get for any queue is "None". Here's the code:

    dim myPS as PrintServer = New PrintServer("servername")
    dim myPrintQueues as PrintQueueCollection = myPS.GetPrintQueues()

    For Each pq as PrintQueue in myPrintQueues
    pq.refresh()
    'output pq.name
    'output pq.QueueStatus.ToString
    Next

    I must be missing something obvious. Can anyone give me a pointer. I previously posted this question to the .NET framework forum with no luck so reposting here. Thanks.

    Visual Basic csharp dotnet sysadmin data-structures question

  • Trying to use sytem.printing to get print queue status
    D daveg55

    Hi I'm trying to use the system.printing namespace to get the status of print queues on a print server. Unfortunately the only status I ever get for any queue is "None". Here's the code:

    dim myPS as PrintServer = New PrintServer("servername")
    dim myPrintQueues as PrintQueueCollection = myPS.GetPrintQueues()

    For Each pq as PrintQueue in myPrintQueues
    pq.refresh()
    'output pq.name
    'output pq.QueueStatus.ToString
    Next

    I must be missing something obvious. Can anyone give me a pointer. Thanks.

    .NET (Core and Framework) sysadmin data-structures

  • Choosing which service to use based on an appsetting
    D daveg55

    Interesting. But how are you actually using the server name in the code? The problem I can't get my head around is how to do this without explicitly using the server when I define my objects.

    Visual Basic question wcf sysadmin debugging

  • Choosing which service to use based on an appsetting
    D daveg55

    Hi Sure, I understand why the example doesn't work. For this trivial example it would be easy enough to define myVar within the code block. However, my question is whether there's another way of approaching this problem. Dave

    Visual Basic question wcf sysadmin debugging

  • Choosing which service to use based on an appsetting
    D daveg55

    Hi all Noob question :) I'm using different web services depending on whether I want to connect to the development back end server or the production one. I'd like to choose which web service to use based on a setting in the web.config file. If I use a case statement (or if etc) to define my object the code complains that the object isn't declared. e.g. if Appsettings("Debug") = "True" then dim myObj as new devServer.Service else dim myObj as new prodServer.Service end if myVar = myObj.somethingClever name myobj is not declared Can this be done in some other way? Thanks Dave

    Visual Basic question wcf sysadmin debugging
  • Login

  • Don't have an account? Register

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