Get A Service "logon Username" Setting On A Remote Mach?
Feb 26, 2012
vb.net - how to get a service "logon username" setting on a remote machine so far i have this:
Dim localServices As ServiceController() = ServiceController.GetServices("myserver")
For Each localservice As ServiceController In localServices
ListBox1.Items.Add(localservice.DisplayName & " " & localservice.Status.ToString)
Next
View 3 Replies
ADVERTISEMENT
Aug 13, 2009
I have Logon and Detail forms. In Detail form combobox populated by Employee table. I would like, when user logon and open Detail form the combobox will automatically display name of employee who logon.
View 8 Replies
Sep 23, 2008
I need to logon to a NAS Drive to query directory listings. All users will be logging into a domain. The NAS also has security set up on it with a different username password.
I will have a handful of users (maybe 10 - each logging into the same domain, but from different pc's) that will need to access a NAS Drive to query a directory structure. All will have physical access, and can connect via windows explorer (manually entering a user and pass).
During my first attempt via my app - I get the error "Logon failure: unknown user name or bad password" Which is good cause I only want a handful of users logging on to this drive. If I logon to the drive via Windows Explorer and then go back to the app and it works.
So what I did was create a multi form app.
- At launch the parent form loads (as well as a logon window within that form). The logon window auto fills a text box with a username. That is pulled from the current logged on user - or can be replaced. I would like each user to then enter a password -> send that to the NAS for authentication -> then either open the app (mentioned above) or give some kind of a message box saying they now have connectivity to the drive.
View 6 Replies
Oct 8, 2009
This might seem obvious but I was doing some research and I was wondering if a service application start an executable. I know an .exe cannot start without some sort of logon but I was wondering if it was possible to work around this by having my service call it.
View 3 Replies
May 25, 2010
I am planning on creating a service that measures the bootup time for a computer. It would go something like this:
1. Service starts and waits for CTRL+ALT+DEL screen
2. Timer starts when logon screen appears
3. User logs in and timer stops
4. Service waits for process X to start
5. Process X starts and service gets System.Environment.TickCount
6. Service subtracts step 3 ticks from tickcount
The reason for the logon screen timer is I don't want to measure if the user booted up and went for coffee or something and shows up 20 mins later to log in. Is there any way for the service to detect when the logon screen is present and when it's gone?
View 12 Replies
Sep 14, 2010
I am trying to figure out a way to change the SQLSERVERAGENT service Logon password with one of my VB2008 applications. I can't seem to find any place in the registry were the password is stored and can find any solution other than manually going into the service and changing it myself.
View 12 Replies
Jul 23, 2009
I am trying to communicate with a Windows service on a remote machine on the network but i keep getting an exception saying the following: "System.InvalidOperationException: Cannot open Service Control Manager on computer 'machine001'. This operation might require other priviledges. ---> System.ComponentModel.Win32Exception: Access is denied.
[Code]...
View 4 Replies
Aug 20, 2011
I am wanting to create a logon similar to the Windows Live logon, so in other words. user has frmLogon and is located in Australia. The user enters his/her details and then the program connects to a server in the United States and checks the Username and Password to make sure it is correct if it is correct it allows the user to logon and move to the next stage, if it is wrong it will give him an error message. I am wondering if anyone has a tutorial or source code laying around that I can rip apart and see how it works. I want to put the database on my server and connect to it from my desktop using the logon form.
View 3 Replies
Feb 16, 2010
how can i get the currently interactive logged user from a windows service?
note that i want the logged user (not the system account of the windows service) and the logged user, may be, is more than one (so i cant just get the owner of explorer.exe).
View 5 Replies
Jun 10, 2010
Here is the final code that worked for me. This uses WNetAddConnection2 to establish a connection first, before using DirectoryEntry.
Imports System.Runtime.InteropServices
Imports System.Net
Imports System.DirectoryServices
Imports System.IO
[Code]...
So I moved the code to an ASP.Net web app, which is impersonating a service account through the Impersonate section of web.config. The account I am impersonating does not have admin rights on any of the workstations so I put in a username/password into the constructor for the computer entry like so:
Dim deComputer As New DirectoryEntry("WinNT://" + Computername + ",computer", username, password).The username is that of a domain account which has local admin rights on every workstation. If I look at the Username property of the resulting deComputer object I can see that the username matches what I entered.Also if I enter in an invalid password it throws an error, so it is authenticating in some fashion.
However if I now try and add or remove a user from a remote workstation I get a general access denied error. If I add the service account that ASP.Net is using as a local admin on that workstation it will add and remove no problem.So next I tried using the LogonAPI (advapi32.dll ->LogonUser call) to login as the user account that is a local admin on all workstations, impersonated the resulting WindowsIdentitiy and tried running just the original deComputer instantiation. When I do this every property, excepty Path, returns an OLE exception..
View 1 Replies
May 13, 2011
I need to query a web service that basic authentication, putting the username and password in the request header. My client is written in VB.NET Visual Basic Express Edition 2010. I've added the web service to the Service References. It has auto-generated the appropriate classes for me. [code]...
View 1 Replies
Aug 7, 2010
I Downloaded MySQL Connector (the latest, 6.1.X), and i cant really understand how to use it in VB.Net... I Added it to references. All what I need to know is what imports to use, how to set connection with remote server and how do I select and insert to tables.
View 6 Replies
Jan 18, 2010
I'm using asmx web service to lock a folder on remote computer! When I run web service on local machine everything working fine, but when I run it on remote computer nothing happen, folder on remote computer stay unlock! I supose that I need to set security permission for this web service on remote computer, but i don't know where! So, what I need to enable executing this service on remote computer?
View 5 Replies
Jul 9, 2011
I have a problem with service references, I add the reference and use code similar to the one below, in VS my app conects fine to the web service, also it runs fine launching the app directly. But after I created the installer and give to final users to install they can not connect to the web service.
a)Use service reference.
First, add service reference
Second, call it like this:[code].......
View 2 Replies
Mar 10, 2011
I put together a small app I want to use on my local network for service monitoring across a few of my servers.
I'm using vb.net express 2010 with system.serviceprocess imported The problem I am having is that my code only seems to work locally, and will not retrieve the service data for any server on my network.
For example, my local machine is called "office-pc", and when running the app on it, I get all the service information.
Dim localServices As ServiceController() = ServiceController.GetServices("office-pc")
For Each localservice As ServiceController In localServices
ComboBox1.Items.Add(localservice.DisplayName)
Next
But, if I want the service info from my web server called "casper", I use the same code, but i change the GetServices() parameter like so;
Dim localServices As ServiceController() = ServiceController.GetServices("casper")
For Each localservice As ServiceController In localServices
ComboBox2.Items.Add(localservice.DisplayName)
Next
After a few seconds delay, nothing happens, ComboBox2 remains empty.
It was my understanding that GetServices() would get the local machines service info unless a machine name was specified, which in both cases is true.
So why isn't it working? Do I need to set something up on the network servers first?
View 8 Replies
Jan 22, 2009
Am trying the following to start a windows service
Try
Dim myController As New ServiceController("FCR GEFU Server 1", "10.1.1.208")
myController.Start()
TextBox1.Text = "Service Started"
Catch ex As Exception
TextBox1.Text = ex.Message
End Try
Am getting the following error:Cannot open Service Control Manager on computer '10.1.1.208'. This operation might require other privileges.How should I provide the log in credentials for the remote PC !?
View 9 Replies
Aug 13, 2011
I am writing a vb.net client application that uses a web service to connect to the remote database.So far I am able to connect to the web service and read, add new and delete data from the database. I am having a hard time updating data.
I have a datagridview control that is bound to a dataset retrieved from the remote database using the web service.When a record is edited in the datagridview control, I need the dataset that is bound to that control to be updated and then that updated dataset to be sent to the webservice to update the remote database.
My client code in the btnUpdate_Click event
dim new_ds as new dataset = datagridview1.datasource
Dim es As New testwebservice.equipmenttracker 'the web service reference
dim msg as string = es.updateequipment(new_ds)
messagebox.show(msg)
View 1 Replies
Jan 29, 2009
What is best for this one? Should I be using those socket classes or is there a more appropriate one that I could utilize? Those machines will be connected over internet.
This is another thread in VB6.0 but I don't mind doing it all in .Net.
View 3 Replies
Mar 21, 2011
I've got a webservice called Converter.asmx and I've just noticed that on the remote server I basically can't connect to it. The error that I get: "No connection could be made because the target machine actively refused it 127.0.0.1:49792" and the error occurs where I'm calling the web service (second line below).
Dim webservice As New localhost.Converter
results.InnerHtml = webservice.ParseData(txtInput.InnerText, options)
On my localhost it works fine. How can I change the webservice so that it'll work on the remote host as well?
View 1 Replies
Dec 28, 2009
I am using this code to try to connect to a computer/server from my desk top. but keep getting errors The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
Dim options As ConnectionOptions
options =
New ConnectionOptions()
[Code]....
View 5 Replies
Jul 19, 2010
I have to admit that I was sceptical it would work... but below is the code. I had to make a minor change to the code you suggested. Whenever I tried IPC$ it would return a 53 result code, even though I'm sure the share exists. So at the suggestion of another website I removed the share and just the computer name and this worked.
Imports System.Runtime.InteropServices
Imports System.Net
Imports System.IO
[Code]....
View 1 Replies
Sep 7, 2009
Basically i have a wcf service that returns a dataset of 2000 records.
When i run the function from an application i get the standard error.
"The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element."
Now i know how to fix this problem at the client end. What i'm wandering is if there is any options i can set at the server that will automatically cause the MaxReceivedMessageSize property at the client to be increased.
View 1 Replies
Apr 5, 2010
The conditions are I don't have administrator privilege I want to see the status of a service in remote machine (server)I use the following code (vb.net with framework 2.0) to see the status
Dim sqlSvc As ServiceController
Svc = New ServiceController(My.Settings.serviceName, My.Settings.machineName)
If sqlSvc.Status.ToString.Equals("Running") Then
displayStatus("success", sqlSvc.Status.ToString)
Else
displayStatus("error", sqlSvc.Status.ToString)
End If
When running the code, InvalidOperationException is raised and found out that I need admin right in the server.Can I lookup the status of the service without having admin right in remote machine ?
View 2 Replies
Jul 14, 2011
I am connecting to a web service that returns a dataset that I use as a datasource for a windows client datagridview.
Once a user has made changes to the datagridview record(s), how do I get those changes back to the connected dataset and back to the remote database.
I wrote the sql update function in the service:
Code Snippet from web service
<WebMethod()> _
Public Sub Update_equipment_repair(ByVal repair_id As Int64, ByVal date_entered As DateTime, ByVal date_sent_in As DateTime, ByVal date_returned As DateTime, ByVal damage_description As String, ByVal vendor_id As Int64, ByVal repair_description As String)
[Code]....
This displays the records perfectly and I figured out how to delete and insert records via web service.
writing updates from the datagridview back to the database.
View 1 Replies
Jul 14, 2011
I am writing a small windows client application that accesses data using a web service that returns datasets.When the dataset is returned, a datagridview's datasource is set to the dataset.
My question is, how do I write changes that were made in the datagridview back to the dataset and then back to the remote database.
[Code]...
Now the client snippet that connects to the service and lists the equipment
View 7 Replies
Nov 22, 2011
I am trying to change the "logon as" userid and password for a service on a remote machineMy user is a domain admin Here is the code I am using...
Dim wmiScope As ManagementScope
Dim wmiConOpts As New ConnectionOptions
wmiConOpts.Impersonation = ImpersonationLevel.Identify
[code].....
View 6 Replies
Feb 12, 2009
im not 100% sure this is the right place for this, but thought I'd give it a shot.I created a windows service, and it accepts startup parameters to set the connection string for my database connection. (-L for live, -D for dev, -S for stage etc.)[code]I installed the service using installutil (I already tried using sc.exe) and I can't specify startup parameters.So if I go into Services and go into my service properties and manually type -D into the Startup Parameters box and hit start, I get -D as my parameter, life is good. But the parameter won't save in the startup parameters box, it just reverts to a blank box whenever I close the properties page.[code]
View 1 Replies
Feb 23, 2011
I have a Vb.Net 4.0 Windows Service.The service is setup to run in DEBUG with generate debug set to pdb-only. Configuration is set to debug.Installer project is set to DEBUG. VS IDE is set to debug.I do a clean build and clean install of the DEBUG version.
I run x64msvsmon.exe on remote machine (W2008 R2 64bit).I attach to the process via workstation (XP PRO 32bit) in VS2010 without issue.Everything is set to debug but I get the infamous message breakpoint will not currently be hit, no symbols are loaded.
View 4 Replies
Oct 9, 2009
What are best practices when creating a custom event log for a windows service? I've set my service on a timer so it fires up every day (except weekends) at the same time. For the last 3 days, I've been getting the following error: The source 'DMCS57ExportService' is not registered in log 'DMC S57 Export Log'. (It is registered in log 'DMCS57ExportLog'.) " The Source and Log properties must be matched, or you may set Log to the empty string, and it will automatically be matched to the Source property.Based on that error, I know there's something wrong with the code that creates the custom event log (see below)
[Code]...
View 3 Replies
Jan 26, 2011
I figured out that i could use Dim serv() As ServiceController = System.ServiceProcess.ServiceController.GetServices(".") to get my services.
Now i want to set (change) the depending services for some.
how to use DependentServices.SetValue.
View 3 Replies