HI, Edbert P & ManfrerRbihy.
ClientForm is Main form.
TestuForm is subForm.
I'm using WCf.
IService1 channel = null;
NetTcpBinding bining = new NetTcpBinding();
&
private void ClientForm_Load(object sender, EventArgs e)
{
try
{
bining.Security.Mode = SecurityMode.None;
var endPoint = new EndpointAddress("net.tcp://localhost:8080/Service1");
channel = ChannelFactory<IService1>.CreateChannel(bining, endPoint);
lblBinding.Text = string.Format("IP: {0}", endPoint.Uri.Authority);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
when I exit ClientForm I use:
private void izietToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Close();
}
ON button:
testID = new TestuForm();
testID.SelectedTestID = _selectedTestID;
testID.SelectedSkolenuID = _selectedSkolenuID;
testID.SelectedSkolotajuID = _selectedSkolotajuID;
testID.Show();
this.Hide();
I pass some variables to TestuForm() & hide ClientForm.
on TestForm i use same channel,binding
IService1 channel = null;
NetTcpBinding bining = new NetTcpBinding();
private void TestuForm_Load(object sender, EventArgs e)
{
bining.Security.Mode = SecurityMode.None;
var endPoint = new EndpointAddress("net.tcp://localhost:8080/Service1");
channel = ChannelFactory<IService1>.CreateChannel(bining, endPoint);
}
I have tried only open and close ClientForn but still have the problem.
the sutpid process name is WindowsClient.vshost.exe
Description vshost.exe
a few minutes ago I runed the program -> closed.
some times process closes, sometimes not.
Sometimes I just click End Process Tree it closes.
Sometimes I need to try close multiple times before it closes.
this program is my first project I'm playing with C# only about 2 months.
So bee nice. :)
thanks.