|
What error do you get?
You need to catch and log any exception that occurs so you get some clue as to what went wrong.
Simon
|
|
|
|
|
ok,
i get the following exception
"Unable to establish connection to server via RemotingAn error occurred while processing the request on the server: Server encountered an internal error. To get more info turn on customErrors in the server's config file."
It occurs in the client whenever I call one of my proxy's method.
The weird thing is that sometimes I dont get it when I run from the exe file. usually when the client is inactive and for a long time. then I connect to the remote successfully. but most of the times I get that exception.
I Never get it when I run from debug, and that's what I am trying to figure out .
10x.
|
|
|
|
|
I suggest you do exactly what it says. It suggests the error is occurring on the server. Turn on logging on the server. If possible, run the server in debug mode (with VS attached) and see if the server methods are actually getting hit.
At a guess I'd say it's could be some kind of authorisation problem. Maybe a firewall? blocking the app, but not when run through VS. Or perhaps security permissions on the server or remote objects.
Simon
|
|
|
|
|
From what you have explained, it looks like the connection is timing out. Increasing the timeout time might fix the problem.
Hope this helps ,
Prateek
|
|
|
|
|
Iam using SMTP to send mails from my c# application.If I gave correct 'To' address and wrong 'CC' or 'BCC' then the mail is not sent, to the correct ('To') address also.
I expected it to fail, mail delivery for only the wrong mail addresses and it should be succeed for correct one.
Tahnk u
Bhargavi
|
|
|
|
|
bhargavichow wrote: I expected it to fail, mail delivery for only the wrong mail addresses and it should be succeed for correct one.
Seems like you were wrong then. Did you have a question, or was this just an observation?
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi,
I am working on a chatting project witch is to work using C# Sockets. There are two segments "Server" and "Client" as usual. I tried it on a local network and the result is with 5 systems in my lab, it is working nicely and on making a system Client and any one Server , we became able to have our conversations but with rest of two systems story is not same. When I am making my PC server and another one client , it is working but when I am keeping Client and making other one server it is not working and generating following exceptions:
"A connection attempt failed because the connected party did not properly respond after a period of time or established connection failed because connected host has failed to respond + C# socket program"
If it is working with other PC of the LAB nicely than why it is not working with only 2 PCs.
Structure is as :
Server picks IP and port of the system on which it is running that is like :
IP : 192.168.0.13
Port: 8000
On the Client PC We need to give IP of our Server and a port number, that is like
IP : 192.168.0.13
Port : 8000
Can any one tell me why is this happening .
Hemant S. Adhikari
|
|
|
|
|
Is there a firewall in place? Are the two PCs on the same network? The IP addresses given are on an internal range so if the connection crosses the internet it won't work, you need an external IP address.
|
|
|
|
|
Can you post the code that you have? If not, you can check out the code on this page (http://msdn.microsoft.com/en-us/library/w89fhyex.aspx). I would advise going through this page first. It provides good, working examples of client server sockets.
Hope this helps ,
Prateek
|
|
|
|
|
I have a Datagridview which has a Datagridviewcombobox column and an integer column for which the values are autogenerated by me.
The combobox is added like this
DataGridViewComboBoxColumn col = new DataGridViewComboBoxColumn();
col.Name = "Category";
col.DataPropertyName = "Category";
col.Items.AddRange(new string[] {"value1", "value2", "value3"});
this.datagridview1.Columns.Insert(1, col);
The combobox column works properly only when the VirtualMode property is false.
I have a serial no column, whose value is generated automatically in in datagridview_NewRowNeeded event like this:
this.datagridview.Rows[this.datagridview.Rows.Count-1].Cells[0].Value = something...
This event works only when the VirtualMode property is set to true.
Is there any workaround to achieve both these in the same datagrid?
Cheers
CNU
|
|
|
|
|
|
Check the link
[^]">
Cheers!!
Brij
|
|
|
|
|
i want to set the datatime picker visible and unfold at once when the user clicks on a button,up to now i can onlt set visible true/false only, what is the event i should call to unfold the datetime picker
|
|
|
|
|
There isn't a specific method call to do this. I suspect you can achieve it using a window message of some kind. But I don't know which one.
Look at the DateTimePicker class in reflector. You need to trigger the WmDropDown method (which is private).
This is called from the WmRelfectCommand method, which is called from the WndProc method.
You can use SendMessage[^] to transmit messages to a controls message queue, which will be processed by WndProc.
Maybe some else knows what message values you need to transmit. It's likely to be a base message + the WM_REFLECT message. http://www.tech-archive.net/Archive/VC/microsoft.public.vc.language/2005-08/msg00589.html[^]
Sorry I can't be more helpful.
Simon
|
|
|
|
|
Track the window message for mouse down ans mouse up and check if the active control is datetimepicker. If it is then do as required. I hope this helps.
C isn't that hard: void (*(*f[])())() defines f as an array of unspecified size, of pointers to functions that return pointers to functions that return void
"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live." - Martin Golding
|
|
|
|
|
Where can I download "msword.olb"
Hello Friends
|
|
|
|
|
Google ? I'd guess it's either part of Word or part of the Word toolkit.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi all,
im having a problem with retrieving a binary file from the database and reading it in my code, so far i have this:
byte AttachmentByte = new byte();
AttachmentByte = StringToByteArray(inputString);
and a function to convert it:
public static byte[] StringToByteArray(string inputString)
{
System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();
return encoding.GetBytes(inputString);
}
but when i run it i get the error:
Cannot implicitly convert type 'byte[]' to 'byte'
can someone please tell me what im doing wrong.
thanks in advance!
living life on the flip side
|
|
|
|
|
StringToByteArray returns byte[] while AttachmentByte is defined as byte.
|
|
|
|
|
Agweet wrote: byte AttachmentByte = new byte();
AttachmentByte = StringToByteArray(inputString);
byte[] AttachmentByte;
AttachmentByte = StringToByteArray(inputString);
|
|
|
|
|
Hi guys,
thanks for the quick replies,
the problem is that i tried using:
byte[] AttachmentByte;
then it gives the error on the filestream:
using (System.IO.FileStream fs = System.IO.File.Create(newPath))
{
fs.WriteByte(AttachmentByte);
}
i get the errors:
The best overloaded method match for 'System.IO.Stream.WriteByte(byte)' has some invalid arguments
Argument '1': cannot convert from 'byte[]' to 'byte'
is there something else im missing?
living life on the flip side
|
|
|
|
|
Agweet wrote: is there something else im missing?
Yes. A good C# book.
Seriously, the error message you got is self explanatory. It has some invalid arguments. Look at the documentation for that method and see what arguments it expects. BTW, this some different code you are showing than the one given in the original post.
|
|
|
|
|
thanks once again for the reply, i know that i posted other code...im trying to retrieve a binary file stored in the database and write it to my local machine, with use of creating a folder and using a filestream.
thanks for all the advise
living life on the flip side
|
|
|
|
|
WriteByte writes just a single byte to the stream but you need to write byte[] so use the overload that writes byte[] to the stream. That's it
|
|
|
|
|
Hi Giorgi,
sorry but i have never used filestreams or binary files before, how would i go about using the overload that writes byte[]?
living life on the flip side
|
|
|
|