|
Mohammad Dayyan wrote: I've found it. Can we do it programmatic ?
Not sure.
|
|
|
|
|
|
How do you know OnStart() doesn't execute? Is it because nothing is written to the file? I think you need to close your StreamWriter too, not only flush it.
|
|
|
|
|
Calla wrote: How do you know OnStart() doesn't execute?
If it executes , the file have to exist in Desktop , but the file doesn't create.
|
|
|
|
|
You need to find out whether the service is installed correctly or if you just have trouble creating and writing to the file.
Try writing something to the Application Log in the OnStart method of the service to verify the code is being run.
protected override void OnStart()
{
System.Diagnostics.EventLog.WriteEntry("In OnStart.", EventLogEntryType.Information);
}
|
|
|
|
|
Seems as the service is not installed correctly.Use InstallUtil,ServiceInstaller and ServiceProcessInstaller to figure it out.To debug the service you should open the project first and next use Attach to Process from tools menu to attach the service.
Life is a stage and we are all actors!
|
|
|
|
|
This is what I want to do:
- I have made a WSDL (interface) which can be implemented by different web-services. Lets call this provideData.wsdl
- I want to make a c# console application where I can dynamically add different services (different locations) which implements the same WSDL. Something like this:
static void Main(string[] args)<br />
{<br />
AddDataProvider("http://serviceA/a.asmx");<br />
AddDataProvider("https://serviceB/b.asmx");<br />
}
Normally when I consume a web-service in a C# project I just press "Add Service Reference...",
but how can I do this dynamically with code?
|
|
|
|
|
hello
how read memory variable file 0r files *.mem in c#.net?
|
|
|
|
|
If you just want to read the .mem file, it's easy :
byte[] array = File.ReadAllBytes(@"c:\test.mem");
|
|
|
|
|
|
|
Hello...
I m creating ASP Website in C#.
There is one drop down list and one text box
In drop down list, i have country's name.
Problem:
i just want is that textbox will display the selected item in drop down list.
Suppose if i select INDIA in Drop down list then textbox must display INDIA..
Please Help me out.
Thanks in Advance.
Lalit
|
|
|
|
|
In C# WinForm use the event SelectedIndexChanged from ComboBox :
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
textBox1.Text = comboBox1.Text;
}
But in ASP, ask in ASP.NET forum.
|
|
|
|
|
I wrote this below code but nothing is working.
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
TextBox1.Text = DropDownList1.Text;
}
|
|
|
|
|
above code i hav written in default.aspx.cs file
|
|
|
|
|
Have you ever used event handler ??
Do this first ...
comboBox1.SelectedIndexChanged += comboBox1_SelectedIndexChanged;
|
|
|
|
|
Hey thanks ...........
I solved my problem.
Nice site, and nice members too.
Once again Thanks
|
|
|
|
|
Yes, but did you hook into the event? Or just write the handler?
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Hi,
Please help me who know these answer:
I need to Know the which cultureinfo is used in system.
For example: I need to know my system has which datetime format is used us or uk. To know the datetime format of US or UK. Can any idea in Localization or Globalization
Thanx in advance
|
|
|
|
|
Clickity[^]
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Application.CurrentCulture
|
|
|
|
|
hi everyone...i have a basic knowledge of asp.net using vb.net and am working now on a project that use c# classes i get to code where i see someting like this Dictionary<string, PageConfig>...so whats that mean
please allow me to be a good programer
|
|
|
|
|
|
thank you
please allow me to be a good programer
|
|
|
|
|
I've been working on a CRS system, and was running into a nasty error...
For some reason every ~16 or so search queries, the program would crash, and give me a WIN32 exception, telling me that my program had used up all its allocated handles.
Ok, so I wasn't disposing of my objects correctly somewhere...
After much searching, I found that the foreach loop that was disposing of the results was not working as expected. (the search results were displayed using Panels).
If I called:
<br />
int i = window.FlowPanel.Controls.Count;<br />
It would return the expected number of (say) 20.
However when I ran:
<br />
foreach (Control c in window.FlowPanel.Controls)<br />
{<br />
c.Dispose();<br />
}<br />
It would cut out of the foreach loop at the 10th object.
If I ran the same foreach loop directly afterwards, it would cut out at the 5th object etc etc.
I solved the problem by using this snippet:
<br />
while (window.FlowPanel.Controls.Count > 0)<br />
{<br />
foreach (Control c in window.FlowPanel.Controls)<br />
{<br />
c.Dispose();<br />
}<br />
}<br />
<br />
GC.Collect();<br />
This solved the problem, but can anyone explain this behaviour?
Cheers,
Mark.
Mark Brock
"We're definitely not going to make a G or a PG version of this. It's not PillowfightCraft." -- Chris Metzen
|
|
|
|