Start Stop Exe On A Particular Machine Based On Ip Address?
Oct 21, 2010
I am makiing a web application and this application will run only in LAN enviorement.what i want to do is-
there is a textbox and a button start. in this textbox i want to give IP address and on button click i want to run a exe on the particluer system ( ip given). and on stop click i want to stop the exe.
View 5 Replies
Similar Messages:
Sep 27, 2010
I want to start and stop IIS on remote server using asp.net website.
When i try to stop IIS on remote PC, it raises error. I am using the following syntax "PsExec \Server2 -u Administrator -p somePassword IISReset /STOP". This works fine when called within VS IDE or from another C# code. However does not work when called from within asp.net app. I am using "Administrator" as user which has Admin access to both of machines.
View 1 Replies
Jan 12, 2011
How can I make my application installed in my PC to start(ie., to popup for username and password) when I logged in to my PC, so that I can provide my username and password to the application and log in to it,similarly like gtalk that popsup for username and password once logged in to PC?
View 4 Replies
Aug 17, 2010
My situation: when I deploy assemblies .NET in GAC, I get errors (Cannot access to xxx.dll because is in use for another process). The IIS use those dll (assemblies).
Which is the best way (more performance,quick and safe way) or all ways to stop, start IIS 6.0 Windows 2003 ? (for C#, .NET 3.5)
options, I think:
Detect IIS installed in machine.
Process.Start() using commands: iisreset /stop andiisreset /start
Use ServiceController class for get "World Wide Web Publishing Service" ( "W3SVC" )
and do stop
controller.Stop();
controller.WaitForStatus(ServiceControllerStatus.Stopped, TimeSpan.FromSeconds(timeoutSeconds));
and do start
controller.Start();
controller.WaitForStatus(ServiceControllerStatus.Running, TimeSpan.FromSeconds(timeoutSeconds));
Process.Start() using command: taskkill /IM aspnet_wp.exe /F (use w3wp.exe in Win2003)
another options that I don't know?
View 1 Replies
Mar 29, 2011
In my project i am having the VB Script file openHTML.vbs which is used to open the .HTML file in the server location.
If i run the following code in VS2005 it's working fine but if i use the same code to publish and work in the server machine it's not working.
[Code]....
[Code]....
View 11 Replies
Jan 7, 2010
How to get MAC address of client machine in c# and vb.net
View 3 Replies
Jun 3, 2010
so i have a code which gets me the ip address of a machine i am wroking on.
so if my gui is published on the server and i access it from my local machine it gives me tha address of my local machine and when i access the gui from the server itself it gives me the server address.. which is fine.
But when i put the gui on a VM server and run it from a VM server itself i dont get the ip address. this works fine if i access it from another machine but does not work only when accesing gui on VM server..
[code]....
View 1 Replies
Nov 23, 2010
I have my GUI files published on a server... this server is where the IIS is running..
Now i access my GUI from a remote machine. how can i get this machines IP address or username.
I get the server name of the machine using this code:
string svrName = System.Net.Dns.GetHostName();
there are 2 machines A and B.. A is where i have my published files for the GUI and also the IIS... the above code gives me the name of machine A
now i call the GUI from machine B. and i want the name of machine B
View 2 Replies
Dec 15, 2010
I have a web site where I need to capture the IP address of the logged in user. Earlier my code used to work fine. But all of a sudden it is giving me only one IP address from whichever machine may be the user logging in. I have tried almost all possibilites :
Request.ServerVariables("REMOTE_ADDR")
Request.ServerVariables("HTTP_X_FORWARDED_FOR")
Request.UserHostAddress()
Still it is giving me the same IP address.
View 3 Replies
Dec 16, 2010
We need the a solution for our ASP.NET website. in which a user needs to activate his machine and next time if he visits the site then we need to check the machine is activated or not. if the machine is activated then we want to redirect the user on different page.
Is there any way by which we can get the client machine MAC address and store it our database?
I have found some solution in which this can be done but it works on on IE and some ActiveX setting needs to be done.We want this should work on atleast IE and FireFox.
View 3 Replies
Dec 14, 2010
I want to get ip address of client machine Like I opened website on my machine which is hosted on any server So i need IP address of my machine not hosted server IP.
View 2 Replies
Sep 22, 2011
I want local/Client machine ip address, for that i have written below code. but this code gives me Application server address where my web site is hosted. where as i wanted client machine IP from where my web site is getting accessed. so if my website accessed from 10 different machine in that case i want 10 different IP address of those machines.
Code:
using System.Net;
private string GetIP()
{
string strHostName = "";
strHostName = System.Net.Dns.GetHostName();
IPHostEntry ipEntry = System.Net.Dns.GetHostEntry(strHostName);
IPAddress[] addr = ipEntry.AddressList;
return addr[addr.Length - 1].ToString();
}
Also the below server variable return global ip address.
Code:
HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
What is the correct code.
View 6 Replies
Mar 26, 2016
How to get Client MAC address(Web). I used this it's only work in IE. But i want work all browser. How i can solve this?
This script is for IE only:
<script language="javascript" type="text/javascript">
function showMacAddress() {
var obj = new ActiveXObject("WbemScripting.SWbemLocator");
var s = obj.ConnectServer(".");
var properties = s.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration");
var e = new Enumerator(properties);
var output;
[CODE]...
View 1 Replies
Oct 8, 2013
i want to login using ip address and (ip address as userid),and for this i need to find the ip address of the sysem.
View 1 Replies
Feb 11, 2013
i have a asp.net web with vb code and sql database. i am willing to store the details of the users as ip,computer name and time of using the web is it possible.
View 1 Replies
Oct 28, 2010
What is the right approach when users (authenticated domain admins) should be able to start batch jobs (usually exe files) from an IIS (7.x) aspx (c#) page? This is an intranet site. The batch jobs have to run on the web server as Domain Admins. The website pool is executed by network service or some similar restricted account in AD.
Approaches I can think of (and their disadvantages):
1. Start exe file with System.Diagnostics.Process.Start with another account. This feature is disabled in IIS 7.x, how do I allow it?
2. Create a sheduled task and call scheduled task-api. This unmanaged dll is giving VS compiler warnings because it's unsafe to call from managed code.
3. I suppose there's a better approach, because the previous suggestions doesn't appear safe or robust.
View 2 Replies
Feb 22, 2011
The following code is throwing Exception. I don't get what mistake I am making in the code. I think it is of some security rights issue. If so, how can I give the security rights to any user or application to access this windows service programmatically?
Dim sc As New ServiceController
sc.ServiceName = "DataLoad"
If sc.Status = ServiceControllerStatus.Stopped Then
sc.Start()
Else
sc.Stop()
End If
Exception:
System.InvalidOperationException: Cannot open DataLoad service on computer '.'. --->
System.ComponentModel.Win32Exception: Access is denied --- End of inner exception stack trace --- at
System.ServiceProcess.ServiceController.GetServiceHandle(Int32 desiredAccess) at
System.ServiceProcess.ServiceController.Start(String[] args) at
System.ServiceProcess.ServiceController.Start() at
WEBSITE.DataLoad.Submit1_ServerClick(Object sender, EventArgs e) in C:InetpubwwwrootWEBSITEaDataLoad.aspx.vb:line 46
View 1 Replies
Feb 22, 2011
I have my code sitting on Bitbucket (it is a ASP.net web application). I want to put together a build machine that has a web-based dashboard. I go to the dashboard and I say: show me all the branches and stuff on my Bitbucket project. Now get the latest code from this branch for me and build it. Then deploy it to this location for me or maybe this other location. I want this dashboard give me a history of all this builds and deployments too. I am very new to this concept I have been reading about CC.net and MSBuild and other stuff but I can not find.
View 1 Replies
Feb 2, 2010
I need to redirect some users based on their ip address to specific page else they would be redirected to another page my code is as below.
string myIP = HttpContext.Current.Request.UserHostAddress.ToString();
switch(myIP)
{ [code]....
View 2 Replies
Jul 16, 2012
I am using multiple parameter for binding gridview. i used following code for binding.
string constr = ConfigurationManager.ConnectionStrings["connect"].ConnectionString;
//string query = "select * from bug_details where (auditor_name=@auditor_name or @auditor_name='')and
(datee=@date or @date='')and((datee between @from and @to) or @from='' and @to='')";
string query = "select * from bug_details where (auditor_name=@auditor_name or @auditor_name='')and (datee=@date or @date='')and(datee between (@from or @from='') and (@to or @to=''))";
[Code] ....
If I enter date in txtfromdate text box in will get record from particuler date and if i enter date in both the text box it will get records between these two date and one more two text box may be empty also. How can I achieve this...
View 1 Replies
Nov 9, 2010
Is it possible to programmatically set the session timeout for a user-session based on the user's IP address?
Example: if IP address is in the range of 192.0.X then set session timeout to 6 hours. Otherwise, leave at default set in web.config (or set to 30 minutes).
Presumably this would be done in Global.asax:Session_Start. For now I would be ok with just using the IP address of the user's first request in a session (allowing for the fact that a user could change IP addresses mid-session).
ASP.net 3.5, IIS 7
View 3 Replies
Aug 26, 2010
I am looking into making a voting system for an event.
I would like to base the voting system off of MAC addresses. I would like to get the voters mac address, check to see if they have voted within the last 5 minutes, if they have not, let them vote and add their mac address and current date-time to a table as a record. If they have voted within the last 5 minutes, i would then inform them and tell them to try again later. If it has been longer then 5 minutes, i would clear their record from the database, let them vote and add a new record with their mac address and date-time.
The problem with using IP, is that most of the people voting will be on the same network (large organization) and i believe the ip the website would pickup would be the same.
View 1 Replies
Feb 24, 2011
I'm trying to stop the rest of a page loading based on some parameters; but am not sure of the correct syntax.
@if(dayRes + dayTri == 2){<text>Sorry, etc</text> @Response.End}
The above throws this error: CS1502: The best overloaded method match for 'System.Web.WebPages.WebPageExecutingBase.Write(System.Web.WebPages.HelperResult)' has some invalid arguments
View 1 Replies
May 10, 2010
suddenly, with my Visual Studio 2008 I can no longer debugging my web applications (ASP.NET 3.5). I obtain this error: Unable to start debugging on the web server. Click Help for more information. Auto-attach to process [8360] w3wp.exe' on machine 'DELL' failed. The weird thing is that I haven't done special changes to my IIS.
View 1 Replies
May 19, 2010
In one online application, like online exam, If two users are on same IP address series then I need to generate questions that are completely different.
I am having no idea what approach should I follow.
View 1 Replies