VS 2008 Working With A Service - User Form?

Jun 25, 2009

I am jsut adding bits on to a Windows Service we are making here at our company, its an Asset Management tools with a few built in extras. It runs as a service on everyones machines but we can also do things like request a reboot etc through it.At the moment when We send a Reboot/shutdown etc command to it the Service on the machines calls 'C:WindowsSystem32Shutdown.exe' with the appropiate switches. This displays the windows shutdown warning to the users but nothing they can do about it.

What I was wondering if I create a seperate exe (or even better built into the service but I am not sure if this is possible) instead of the Service Calling 'shutdown.exe' it calls this form up to the user which states that we have requested a reboot etc but there is a 'Cancel' option. The Cancel can just end the form/program and nothing more, if the timeout that we specify is reached then that form/program then calls shutdown exe for an instant shutdown.

I know that the Service runs in a different user Space and we have no telling of who is logged on to that machine so I will need a way to just launch the form to any logged on users. Doesn't matter to much if there is no one logged onto the machine but if it does display this form while noone is logged on that is not a big deal.

View 7 Replies


ADVERTISEMENT

VS 2008 Service Suddenly Stops Working?

Aug 16, 2010

I'm having trouble getting my archive service working. The service counts files in a directory and sends a email. Pretty simple. However, it randomly stops working. I debugged the service and found nothing wrong. I also have it writing to the eventlog so that I can use it to determine where it fails It progresses through each function normally. I thought my program was failing at on point, because it was only posting "Email Notification Service is Running". However, I realized it wasn't posting to the eventlog source so I've been playing around with different ways to post the message to the eventlog. Am I missing something from my code below? I'm really scratching my head with this one.

[Code]...

View 5 Replies

Windows 2003 Service With VB 2008 Not Working?

Aug 26, 2010

I am working on a VS .NET 2008 windows service for 2003, however it doesn�t appear to work correctly.I am basically reading a file from a networked computer and trying to display it�s content, the code is as follows:

Code:
Public Class LB_Analyzer
Private WithEvents Timer1 As New System.Timers.Timer
Protected Overrides Sub OnStart(ByVal args() As String)

[code]....

Now, everytime I run this service it logs the events inside the "GetMachineVol" function, but I never get to the ""Ticked at "" event log from the "main" sub, pretty much as if the service stopped working after trying to assign the value returned from "GetMachineVol" to the string "MachineVolBSFull". I tried using this code on a windows form and everything works fine, and since debugging a service is quite beyond my skills, I really do not know what could be wrong.

View 1 Replies

Service Reference Stops Working When Make Changes To WCF Service?

May 26, 2011

I'm using Visual Studio 2010 and .NET3.5. I've created a WCF service application. I'm including two DLLs that contain the types I'm returning. The first method I wrote works both in WCF Test Client and also in a console application I created to test. When I move on to the next method that returns a generic list of a type. It works great in WCF Test Client, but when I update the service reference it acts as if the service is unavailable. All my objects say can't find reference, and I can no longer see it in the object browser. It's like it just disappears. I can still see it in the Service Reference folder. If I go back to the WCF app and comment out the contract and implementation of that one method it work again. I created a local class very similar to the class I'm using from the dll, and the it works. Is there something I'm missing here? Can someone point me in the right direction?

View 1 Replies

Show User Form On A System Service Event Via IPC Remoting?

Jul 7, 2009

I am struggling with this issue for serveral days now.My application needs to work like wsus (windows updates) does. On a certain event triggered by a windows service working under SYSTEM account it needs to show a (second) form under the user context.The IPC Remoting works fine so I think my issue is in the threading.When I use form2.Show() form2 appears but the form freezes.When I use form2.ShowDialog() the form appears but I cannot get the focus on it.

Service running under system account (in this example a simple console application)

Code:Imports ClassLibrary1Module Serv
Sub Main() Dim SDSIPC As Semaphore = CType(Activator.GetObject (GetType(ClientFromServer), "ipc://Client/SreeniRemoteObj"), Semaphore)
SDSIPC.DoSomething()

[Code]...

View 5 Replies

User Settings Not Working On Form

Jun 3, 2011

So, I've created a form that allows for the user to save his or her settings after closing it. When using Visual Basics to run the program, there is no problem and it works wonders. When I run the program not in Visual Basics, when I go to open the form, it fails. At first, it was because I didn't update the configuration file to include the new settings. Which was dumb, of course, but I updated the file and made sure to put it with the program.

However, when I opened the program again, it failed. So, I tried putting an error message in the form so I know why it failed. This time, it would come back saying "Error Occurred. The Following Error Occurred:" and that is it. No details at all why it was having any problems reading my new user settings. Once again, the user settings work fine in visual studios. It has the updated configuration file in the same place it is.

View 1 Replies

User Created Control Not Working In Form?

Dec 30, 2010

I created a user control with a label and 2 combo boxes, and a public property called ControlDataSource that accepts a dataset - which it populates the combo boxes with. I added the reference to the VB project I want to use it on and to the toolbox. I was able to draw it on the form with no problem and use it. However, after changing the backcolor on the control and recompiling it, it is no longer seen by the form. When I bring up the form it's used on, I get a white screen with a bunch of xml. The problem seems to be in the designer, and I get an "object reference not set to an instance of an object" error. Here is the code from the designer:

[code]...

The reference error is pointing to the line: Me.UcDx1.ControlDataSource = Nothing

Here's the wierd part. If I hover the cursor over that property, it correctly identifies it as a dataset. So it does know what it is, but it can't seem to use it.

View 3 Replies

VS 2008 Local System Service Starts Process As Interactive User?

Aug 15, 2010

The original code came from AutoItI just rewrote what was necessary for VB.NET and added the structures and throws. If successful the PID of the process started is returned, else an exception is thrown. No imports needed.

View 3 Replies

Web Service Working In VB But Not In IIS 5.1?

Oct 20, 2009

Web Service working in visual studio but not in IIS 5.1

View 3 Replies

Calling DLL From Service Not Working

Nov 26, 2009

Makeing a service that should call a DLL.. When I run it i a Windows form app it works but in the service nothing happens. no error?? Is there some considers that i have to take care of when calling a DLL from a service app?

[Code]...

View 3 Replies

Asp.net Web Service OneWay Definition Not Working?

Apr 22, 2010

When I specify <SoapDocumentMethod(OneWay:=True)> on my webservice it doesn't seem to get called. If I remove that the webservice works properly. Also, everything works fine on the development machine just not on the server.

Here is my web method:

<SoapDocumentMethod(OneWay:=True)> _
<WebMethod()> _
Public Sub Write(ByVal processGroupId As Integer)
xslClass.xslHelper.writeDatabase(processGroupId)
End Sub

[code]....

View 1 Replies

Web Service Working In Visual Studio But Not In IIS 5.1

Jan 26, 2012

Public Function storeFile(ByVal intSRID As Integer) As Byte()
Dim engine As New AccessEngine.DBEngine
Dim db As AccessEngine.Database = engine.OpenDatabase(DBFile)

[Code]....

View 2 Replies

Windows Service Not Working With MySql

Dec 4, 2011

I'm creating a windows service with a timer that will tick every few seconds and then query a database. The timer for the service works fine, but as soon as I add any of the MySql details it stops working. Just adding the few lines below stops it from working

[Code]...

View 1 Replies

VS 2008 Form Lock Not Working

Oct 12, 2010

I want to lock my form to be full screen, and not allow the user to move it. For the form, I set

[Code]...

The form is full screen, but I can shift the location. I do have a dual screen system. The application goes full screen on the left most screen. This does this inside the development environment and using the EXE. What am I missing? I thought Locked is suppose to prevent the form from moving.

View 7 Replies

C# - Code Not Working In Windows Service Project?

May 16, 2011

I'm currently starting work on my first windows service and I've encountered what I find to be a strange error. For some reason the compiler is telling me that a whole bunch of typical classes (such as Image, Bitmap, Graphics, etc) do not exist. For example, these simple lines of code, which work perfectly in a normal project, return a bunch of errors:

Bitmap b = new Bitmap(destWidth, destHeight); //Error 13 The type or namespace name 'Bitmap' could not be found (are you missing a using directive or an assembly reference?)
Graphics g = Graphics.FromImage((Image)b); //Error 17 The type or namespace name 'Image' could not be found (are you missing a using directive or an assembly reference?)

[code]....

View 1 Replies

Send Method Not Working In Windows Service?

Nov 18, 2011

I have a windows service application to send emails.The same code works well with windows application but not with windows service.

Private Sub Timer_Elapsed(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs) Handles Timer.Elapsed
EventLog.WriteEntry("Started!!!!")
Dim cmd As System.Data.OleDb.OleDbCommand[code].....

View 1 Replies

VS 2008 Form - 'Exit' Button - When User Clicks It, Another Form Is Displayed

Jun 2, 2012

On each of my form I have put an 'Exit' button. When user clicks it, another form is displayed (I don't want to use 'MessageBox') asking user whether he really wants to quit. If user clicks yes the form closes. If user clicks no, form is redisplayed.

However, out of 4 forms only one form refuses to redisplay. The code is exactly same on all forms. I have included 2 Express 2008 projects showing one form each in the zip file apps-ssk.zip

View 15 Replies

Service With Timer SMTP Email Stops Not Working?

Jul 21, 2010

I'm having complications with imlementing a service that uses a timer to send emails. In my code, it stops in GetDocuments() after TisValid() validates the directory path. I tried using a addhandler and threading but neither worked.

View 3 Replies

Can Service Run .exe Without User Logon

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

Restart Service As User?

Feb 24, 2011

I would like to know if it's possible to stop | start | restart service as a User with a vb program?

The reason is that for some reason, I have to restart some service for a special application on certain station but the people who use them are log on as Admin and I can't go there each time or use vnc.

View 2 Replies

VS 2008 Create Windows Service Using Windows Form Common Control?

May 3, 2012

It is possible to create windows service using windows form control in vb.net. give me the url or links. The windows forms control such as, Timer control, list-box, notify-icon control etc.

View 1 Replies

.net User Registration With SQL Service Database?

Jun 2, 2011

I want to create a log in and registration form in VB connecting to a sql database.

Databse Name: Users
Table Name: UserDetails
Table Fields: ID, Username, Password

The ID field was specifed as primary and self incrementing by 1 and the table has one username and password (being Id: 1, Username: peter, Password: admin). The Login form works, it checks to see if the user exists, if they do, they gain access, if not a message box is displayed. The Registration form however does not and I have no idea why, its probably something simple but yeah, hence the reason Im here! When I register I can add a user fine, and it wont allow me to add the same user, but when I look at the table, it is not updated :S and I have no idea why!! Even after registering the user closing the application and starting again, say I registered the following:

Username: Fred
Password: 123

Then I login with these credentials, it works. When I close the program and reopen the program, it still works and will not allow me to register a new user being Fred, 123. However after 3 or 4 minutes when I try again, the user no longer exisits and I can re-register with set credentials? The code is shown below (1st the login form that works, second the registration that doesnt).

Public Class Login
Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
Dim connection As New SqlClient.SqlConnection("Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|Users.mdf;Integrated Security=True;User Instance=True")

[code]....

View 5 Replies

Detect User Log On From A Windows Service

Jan 28, 2011

Is there for my .Net application to detect if a user has logged on? It is a Windows Service, so it will be running before logon.What I want to do is display a "popup" when a user logs on to tell them the status of the application

View 2 Replies

Optimal Way For A Service To Interact With User

Feb 10, 2011

My application needs to be a service (it needs run regardless of whether a user is logged on), but I also need some sort of client control/oversight over what it is doing. What is the optimal way to do this?Write a separate application to communicate with the service application - I see that as best solution in terms of stability, since the applications will be decoupled somewhat Use callbacks on system events in the service application to load UI forms directly from the service application - I see this as being easier to deploy.

View 2 Replies

VS 2008 - Allow The User To Draw On The Form?

Nov 2, 2009

How would I be able, with the click of a button, allow the user to draw on the form? Maybe as if, taking a screen shot of the whole form, and then drawing on top of it? Dose not have to be a lot of colors, just a simple way to draw a line.

View 4 Replies

VS 2008 Form Still Showing For One User?

Jan 7, 2010

I have an MDI application. Upon starting it, the MDI form is instantiated, then it kicks off a Username/Password log-in form and makes itself invisible(user never sees the MDI form). If the user logs in, the log-in form becomes invisible and the MDI form becomes visible. This works fine, except for one user.When the log-in form comes up, the MDI form is also visible. If he clicks on something, it crashes(certain variables aren't set at that point). If he logs in, however, the log-in goes invisble and everything works fine. This guy is a network admin/IS type and has several versions/hotfixes of the .Net Framework installed. Could that be the problem? Does anyone know what could be causing this problem for this one user and no one else?

View 2 Replies

.net - WCF Service Hosted In A Managed Windows Service Connect Using A WCF Service Application

Jul 14, 2011

i have a Windows service that is hosting a WCF service through net.tcp and this is working great. I have also created a WCF service application. I am trying to add the net.tcp service reference to the service application. Then I add it to the GAC that goes ok but if I try to RegAsm the WCF service application to allow it to be called from Server.CreateObject I get the error:

Warning: Type library exporter encountered a type that derives from a
generic class and is not marked as
[ClassInterface(ClassInterfaceType.None)]. Class interfaces cannot be
exposed for such types. Consider marking the type with
[ClassInterface(ClassInterfaceType.None)] and exposing an explicit
interface as the default interface to COM using the
ComDefaultInterface attribute.

It does not work. I have tried to call it through a class library but this does not work either as the end point is not set correctly.

View 1 Replies

Allow User To Input A Value During The Msi Installation Of A Windows Service?

Feb 1, 2012

I currently have a windows service that is packaged up as an msi installer. However, during the installation i need the user to input their required filepath (to string) location. The filepath variable currently resides in my component class called MyNewService that is inherited from System.ServiceProcess.ServiceBase.

Is there anyway i can allow the user to define the filepath variable during installation?

View 1 Replies

C# - Launch A Process In A User's Session From A Service?

Jun 27, 2010

In Windows Vista/7/2008/2008R2, is it at all possible to launch a process in a user's session from a service? Specifically, the local session would be most useful.Everything I've been reading seems to say this isn't possible, but I figured I'd ask here before giving up completely.My service signs on as Local System.

View 3 Replies

C# - Web Service Do Not Return Current Windows User Name

Jan 26, 2010

This is the function that I use in web service for getting current windows user.

<WebMethod()> _
Function User() As String
Dim p() As String = Split(My.User.Name, "")

[code]....

When I run service on localhost it realy return current windows user name!The problem is when i run service from remote PC, in that case I got nothing from this function. What is problem with this service, and how I can get name of Windows user?

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved