How To Do Remote Execution In .net
Feb 25, 2009how can we do remote execution in vb.net?
View 4 Replieshow can we do remote execution in vb.net?
View 4 RepliesWe are working on a VB.Net project to execute a SQL Stored Procedure and passing it parameters. We have the execution up and working as expected, however the application will only successfully execute once. On the second execution, it throws the following error: Login failed for user NT AUTHORITYANONYMOUS LOGON..For readability I have broken the code down into relevant 'chunks'.[code]As mentioned, on first run - this works without issue. However future executions fail with the error noted above. To clear the error we have to open the stored procedure in Ms SQL Management Studio, click to modify it, then chose execute from the tool bar. Obviously this doesn't actually execute the stored procedure or return results, but for some reason seems to clear the error.the stored procedure does collate data across several SQL servers, so I am guessing its the 'hop' between them that's causing the issue.
View 2 RepliesIn VBScript, to create a new process on a remote machine, you could use this
[Code]...
I would like to do the same thing in .net using WMI, and I tried to do this on my own, but my code is not working properly. If I specify my logon credentials, the process will execute on the remote machine and the code works fine, but I want the program to send the WMI query by using impersonation. I believed this was supposed to send the user credentials of the user using the program to the remote WMI provider on the remote machine. Here is the code I am using:
[Code]...
Working in VWD 2010 Express I have an aspx.vb file with the following connection string:
Protected Function getPasswordLength() As Integer
Dim conn As New SqlConnection("Data Source=localhost;database=MyDB;Integrated Security=true")
Dim cmd As SqlCommand = conn.CreateCommand()
[code]....
This works when the code is on the web server / which is collocated with the SQLServer.However, when I want to debug, I have to copy to the server. I would like to be able to "debug in place" on my development machine and only copy files to the production machine periodically. Technically the production machine is not in production at the moment, but that's beside the point.Anyway, I followed the following instruction: [URL] I can now see the remote database, functions, etc. on the other machine (from the VWD running on the development machine). However, I thought I should then be able to execute this same code locally on the development machine using ctrl-F5, but I get the following error:
**Server Error in '/' Application.A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)**
Rather than use an Entry name of an existing VPN connection, is it possible to connect to a remote network by creating a temporary connection on the fly by using the remote IP/Host name, username and password?
View 6 RepliesI want to do a small application that made the broadcast of images from a PC. The idea is to make an application of remote management but without the management part, only with the viewing of images. Anyone know any code already done or any API that helps in the project?
View 8 RepliesI'm trying to develop a windows application where i can get connected to remote server and look for process state going in remote server.We have many remote servers where automatic installation of software going on. We have an xml file(installstatus.xml) where it tells us at what stage the installation is (Example : Inprogress , Completed, Failed.)
So our aim is to develop a windows application where i can get connected to that servers and look for their installation status(may be we can use installstatus.xml to look for installation status). Every time i connect to a server, the server information should get stored in XML file(i want to create a xml file where all the servers list i connect to should get stored)
The UI at left side should will have list of servers i can connect to. When i get connected to server, at right side of UI, i want to display the status of installation (In progress, failed , completed).
read the COMPLETE email before giving me instructions.I say that because it seams like who ever is responding is only reading part of the email and responding.I have followed your instrutions and I still can not get myhello.vb to compile.
Both vbc.exe and mylello.vb is in the same folder c:program files
"C:Program Filesvbc.exe myhello.vb"
You stated that I should run command prompt as administrator and tye the same command as you do. what (as administrator) is. Please walk me through the complete process. Please do not tell me to run the command prompt as administrator because I do not know what that mean.I can not speak to my administrator. Also I attempting to compile a sample VB that came with the software, so using Visual Studio is not the solution.
Private Sub LoadData(Of T)(ByVal query As ObjectQuery(Of T),
ByRef result As IEnumerable(Of T))
If Connection.State = ConnectionState.Open Then
result = query.ToArray
Else
AddHandler Connection.StateChange,
[Code]...
In the above code I am trying to recurse the LoadData function when the connection is unavailable, I want to defer the loading to when it becomes available. The problem is the above code leads to a compiler error, since a ByRef param cannot be used in lambda expressions.
I have a simple dos command, I use to stop a java service which I am trying to execute within VB.NET, however it doesn't seem to stop my service.My DOS command which works is as follows:
NET STOP "Java Quick Starter"
My VB.NET attempt is as follows but it doesn't work:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Visible = False
[code].....
I like to clarify the doubt regarding vb.net programming. my question is as follows.1. While executing the vb.net program, whether it takes RAM space or Hard disk space.
View 4 RepliesI wish to get my VB 2010 program to wait a few seconds after executing a command, and then exit.
For example:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'do.stuff
'wait a few seconds
[code]....
I am in need to delay the execution of a line of code, say, by 5 seconds. But by doing System.Threading.Thread.Sleep(5000)
the whole UI hangs and I don't want that to happen. Because I want to be able to display something in a Window that a user will be able to see. Does anyone know of an alternative of achieving this?
I have finished creating the code for my client/server application although both parts currently execute modules/in console(this was for testing purposes).I am now looking at making both parts of the program completely invisible (they will eventually be executed as a Windows service upon startup). How do i go about this? Does the code need to be copied in to a "Windows Service" project, or is there a way I can hide both of the modules upon execution?
View 5 RepliesI created an MSI for my application and i want my dll to execute during installation of this MSI. How can i add my dll to MSI. I read something on ORCA but getting error.
add my dll to msi using orca. My dll contain a message box and registry entry
i am getting an input from the user and i m checking in try catch statement. what i want to do is when the exception is caught i want to stop executing the rest of the code. my code is as below
Public Class AddForm
Private Sub Add_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Add.Click
Dim inc As Integer[code]......
I have this commandline in a cmd file "C:MentorGraphics7.9EESDD_HOMEcommonwin32inasc_out.exe" "-PROJECT=D:VeribestData55250u0555250u05.prj" "-OUT=D:VeribestData55250u0555250u05.inp" "*(*)"
And this peace of code
Dim program As New Process()
Try
program.StartInfo.FileName = Chr(34) & PrjSets.ProjPath & "ascii.cmd" & Chr(34)
[Code]....
And it generates no output If I double click on the command file it generates output
I Just want to know is is possible to execute a ssis package from vb.net application?If so how to do that???
View 3 RepliesMy application does some intensive tasks on a second thread, while updating the main form. I want to show how long these tasks have been running (increments every second), i've read timers can get out of sync and even fire off multiple ticks at once, so how can that be fixed, or what's a better solution for this?
View 3 RepliesPFB the code for a search button where when a user enters a text in the text box ,it takes the keyword compares it with an xls which has 1600 rows and 16 columns with keywords.If the keywords match, it has to full the 3rd column where the name is specified.Its running but its taking more than 20-25 mins for processing.I knw searching 1600 rows and 16 columns will take time but pls advice if i can make this process a lil faster.
[Code]...
i'm building a basic server program that I want to recieve commands and execute them sent from a client program and I'm using my home network to test it out. I've got no problem with the communication between the client and server programs and have used a simple Send Text function to communicate to the server program which simply brings up whatever text was sent in a message box.
I've decided that constantly updating the program and transferring the new EXE file just doesnt work as I have to keep starting and stopping the server program to do that just to update the list of commands it recieves. So say for example I've got a button on my client program that tells the server to open the cd-rom draw on that computer, it sends this in the form of simple text openCDdraw" and when the server recieves this, it pops open the cd draw and so on and so on... but I thought a better way of doing this may be to say have the commands listed in a SQL database and when the server recieves a message it searches through the database to find the correct command and executes the code associated with the command.
Now I can retrieve the information fine in to a string variable ("Dim a as string, a = dr.getvalue(3)") but where do I go for there? This is the problem see. My apologies if I've gone a bit long winded on this one but thought it necessary to explain what I'm doing. I've heard of dynamic code execution but when I tried a project I found on the internet it had been coded in C# and I don't know any C nor do I want to as I'm a VB veteran and have updated myself with the way of .NET now so am not going to start all over again with learning C. Does anyone know of an easier way of doing this? Static code is so easy to do because it is typed straight into the coding sections and I had already thought about creating loads of subs/functions to execute each command but again that involves updating the EXE file every time so there must be a better and easier way of doing it.
Can I also just point out that this little project i'm working on is not for a TROJAN or whatever that old NETBUS program used to be called, it is simply so I know how to do it and can use it for other things that I'm working on and through. Also I'd just like to know how to retrieve and execute code from a database or text file.
How to make a program wait till a shell command finishes? For example:[code]In this example the line "Finished" is first written and only after then the shell function starts. How to start the shell function first, and only when it has been finished write the line "Finished"?
View 6 RepliesAccording to the answers to another question, the VB user interface cannot be updated if the thread that created it is busy: hence why big computational jobs usually have to go in a background task.Here's what's mystifying then. I have the following code. It's called over in-process COM, like this
client calls showform()
client does loads of work, freezing up its own UI in the process
client finishes work, returns to updating its own UI
At step 2, the VB form is there but frozen - you can't interact with it. At step 3, the VB form becomes usable. But why is this? Surely the thread of execution has returned to the client? If the client is somehow handling events for the form, by what magic did it know what events to handle and where to send them?
[Code]...
I have an old ASP (not ASP.NET) application It runs okay on Window 2000, and Window 2003 servers, but not on Window 2008 server. What I should do to find out the cause of probelm on Wind2008.[code]...
View 1 RepliesI am trying to run a vb .net 2005 executable file in the Windows Pre Execution Environment. Tha application is very simple, it will show a form with 2 buttons, one button is exit, the other runs a shell command.When i try to run the exe, absolutely nothing happens. The form is not displayed at all. Anyone know why? The app works fine in a normal windows environment.
View 2 RepliesI have the next code that works with AS400
1.- ConexionODBC = New OdbcConnection("dsn=" & gStrDSNIBS & ";uid=" & gStrIdUsuarioDBIBS & ";pwd=" & gStrPasswordDBIBS & ";")
2.- ConexionODBC.Open()
3.- sQuery = "CALL MIFSTORE.SP_TPVFEE1"
[code]....
The purpouse is to execute a SP, but sometimes the DBA modifies the SP without any notification.When the SP is modified and runs the app, the code freezes in the line 7 but does not return a value nor error, even, after 2 hours it remains in that line, I have set the command.timeout (line 6) but it doesn't work either.how to stop the execution of the SP after a period of time.
How do I slow down the execution in the button1 sub. I want say a .10 of a sec. between the loop x after it displayed Pb1?
View 13 Replieshow to resolve the first time initialization stick when executing a sql ce command
View 1 RepliesI am trying to allow my VB.NET EXE to have a variable defined by the run command. The problem is I have no idea what the terminology would be for this type of run.
For example - the shortcut is set to do "myexe.exe debug" This would set a variable to "debug" which on execution my app knows to enable a debug mode.I've done it in batch scripts before - it just enables the "%1" variable or "%2" based on the location (e.g. test.bat hello world - hello would be %1 and world would be %2).Hopefully I explained it well. I tried searching for "variable in execution path" and "variable on execution" with other mixes, but none of those searches return what I am looking for.
Based on the code below..How do I stop the execution of the codes at a certain lines if a certain condition is fulfilled? Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
[Code]...