|
Ok, what you saying is
- each server has a number of asp.net application
- each application consumes the same web service
- the web service calls console application
- the console application performs some configuration.
is this right?
If so, I'm totally at loss. See my first post again. The solution you trying to reach at does not seem optimal to me. Here is how I solve it.
1. Since all the servers are running asp.net pages, I eliminate the web service and console up and write the functionality of both in the asp.net app.
2. If solution #1 is not possible, then I will eliminate the web service and call the console from the asp.net app
3. If solution # 2 is not possible, then what can I say.
As far as the console app, I will not show it at all. Instead I call it as following (Take it with a grain of salt, you will need to modify the code to your needs)
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = <insert your application including path here>
startInfo.Arguments = <insert all your arguments you want to pass to your application here>;
startInfo.CreateNoWindow = true;
startInfo.RedirectStandardOutput = true;
Process convertProcess = new Process();
convertProcess.StartInfo = startInfo;
convertProcess.StartInfo.UseShellExecute = false;
EventLog.WriteEntry(mySupperApp, what ever :-) , System.Diagnostics.EventLogEntryType.Information);
convertProcess.Start();
convertProcess.WaitForExit();
string result = convertProcess.StandardOutput.ReadToEnd();
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Thanks for your help. I have created a sample web service, where I have copied your code and calling a sample console application, and testing on Windows XP, but still not showing the console window.
Pankaj
|
|
|
|
|
Pankaj Saha wrote: but still not showing the console window.
Stop what you doing and find different job. Apparently programming is not for you. If you looked though the code and comments in the code I posted, and expected what you wrote, then you are not qualified to write software.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
First of all you must understand the problem. As there is a client requirement and I am not going to tell you everything. I have a problem and need help, and there is no need to explain our requirement to you. I have tried to explain you the situation and instead of concentrating to the problem you wanted to know the architecture of the system. And before be a software engineer you must learn lot's of things. To see your replay I can tell that so many people are suffering from you.
Pankaj
|
|
|
|
|
Pankaj Saha wrote: First of all you must understand the problem.
No I don't need to understand your problem. You need to understand the problem. All I need to know is subset of the problem to which you asked for help.
Pankaj Saha wrote: As there is a client requirement and I am not going to tell you everything.
That is your problem, your did not understand the client requirement, and If you did understand it then you are clueless. You stuck your head in the sand. You trying to do something, in my view, unnecessary.
Pankaj Saha wrote: I have tried to explain you the situation and instead of concentrating to the problem you wanted to know the architecture of the system.
That shows your lack of understating. You have no freaking clue of what your architecture is. All you want to do is you want to run console application. I gave you a code that do exactly that, except instead of showing the command window, it does it in the background. You can control all the inputs and get the output as well. What the heck more do you want. It is you who have no idea what the requirements are.
Pankaj Saha wrote: To see your replay I can tell that so many people are suffering from you.
It is simply halarious
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Hi,
I have a website with a Page that can start or stop a Windows Service. I get the error:
Cannot open Service Control Manager on computer 'NZDB-TST'. This operation might require other privileges.
My code:
private void RunAlongServices(String ServiceName)
{
ServiceController ctrl = new ServiceController(ServiceName, "NZDB-TST");
if (ctrl.Status.Equals(ServiceControllerStatus.Stopped))
{
ctrl.Start();
}
else
{
ctrl.Stop();
}
}
How to solve this issue, so the Windows service(s) can be started or stopped via de website?
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
digimanus wrote: This operation might require other privileges.
digimanus wrote: How to solve this issue, so the Windows service(s) can be started or stopped via de website?
It appears you need to effect a change in privileges some way. What do you think the odds are that Microsoft has documented Privilege issues associated to using ServiceController? I guess those are pretty good odds. I also guess a simple Google search using the keyword MSDN along with other key words in your original post would turn up that documentation.
Of course I am just guessing. Good luck.
|
|
|
|
|
asp.net runs under IUser_machine_name account. Do you think it has permission to run services?
Why do you want to start/stop service from asp.net anyway? Can't you solve it using other ways?
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Hello Yusuf,
the reason I want this done via a website is to givethe real administrator of the website I am creating the possibility to control the services from the website.
If it can be done indirectly with a command via the website it is allright too. So, do you know any better options?
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
digimanus wrote: the reason I want this done via a website is to givethe real administrator of the website
So are you targeting website administrators? what does web admin has to do with windows services?
digimanus wrote: I am creating the possibility to control the services from the website.
why? again I fail to see why web admin needs to interact with windows services.
Windows services are meant to be running in the background on the server. Why do your application need to start/stop services. If there is a service your web app needs to interact, then make sure it is running. If needed you can change its properties from Services windows.
If this is a windows service you wrote for the web application, then let it run automatically all the time. Alternatively, move the code to your code behind or write an assembly.
If the target audience is Server Administrators then they need to remote login and perform what ever they want.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
hello i am using a web based application i required the client machine ip address and host name
plz help me soon
|
|
|
|
|
This works for me in my intranet application:
Me.TextBox1.Text = System.Net.Dns.GetHostEntry(Request.ServerVariables("REMOTE_HOST")).HostName.ToString
Me.TextBox2.Text = Request.UserHostAddress
|
|
|
|
|
|
We use a method for this functionality
static public String GetClientIP(Page page)
{
String strIpAddress = String.Empty;
try
{
strIpAddress = page.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
if (strIpAddress == null)
strIpAddress = page.Request.ServerVariables["REMOTE_ADDR"];
if (strIpAddress == null)
strIpAddress = page.Request.UserHostAddress;
}
catch
{
strIpAddress = "IP address not found";
}
return strIpAddress;
}
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
Hi all,
I have a dataset having 1000 records and I want to bind the gridview with the dataset with only 10 records at a time. suppose I want to bind recordno-20 to recordno-30 then how to fetch a part of data from the dataset.I am using asp.net 2.0 with vb.net.I cannot change my main storedproc for this.
kindly provide some solutions for that....
Thanks and Regards
bikash
|
|
|
|
|
why reinvent the wheel? GridView does this already. RTFM
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Here is a Solution
http://www.codeproject.com/KB/aspnet/Paging_without_a_Wizard.aspx[^]
Hope it Helps
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
|
|
|
|
|
DataTable have method Select() and try to use that method to filter your data with every 10 rows.
In your Next button filter data with next 10 rows based on last row of current result,in Previos button filter data with 10 previous rows based on current data result.
Or you can use Paging property of GridView
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
hi,
can we check if the selected value of the drop down list box has been changed?
scarface
|
|
|
|
|
yes when ever selected value of dropdown is changed the event selected index changed is called if ispost back property of dropdown list is set to true.
or you can check it on client side also without postback.
Government Dyal Singh College Lahore.
|
|
|
|
|
Here is an example of how it can be done. On the main page i have a label that reads the value of the dropdownlist and once the dropdownlist updates it re-populates the label.
the main page
<asp:label id="Label1" runat="server" xmlns:asp="#unknown"></asp:label><br />
<asp:dropdownlist id="DropDownList1" autopostback="true" runat="server" xmlns:asp="#unknown">
<asp:listitem value="Update1">Update1</asp:listitem>
<asp:listitem value="Update2">Update2</asp:listitem></asp:dropdownlist>
and the code behind
protected void Page_Load(object sender, EventArgs e)
{
Label1.Text = DropDownList1.SelectedValue;
}
This is a quick example just to point you in the right direction. Hope it helps.
|
|
|
|
|
Use selected IndexChange event of DropDownList
|
|
|
|
|
I have used ffmpeg.exe for convert .wmv or .avi file to .flv file. its working fine in local machine but when i upload it web server its not working. Also i don't get any error, my web server is windows server.
I think need some setting in IIS Server.
Please help me.
Thanks
Rajesh
|
|
|
|
|
vnsraj wrote: its working fine in local machine
How do you access it in local machine
vnsraj wrote: i upload it web server its not working.
be specific. what is not working? what are you doing. give better detail
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Hi,
I have an asp.net page in my application hose size is very large about 650k.I am using only one update panel and few server side controls.The size of .axd file is about 400k.How could i minimize the size of .axd file?
|
|
|
|