|
ok... if you are free can u tell will the service crash when the exception eccurs in the service...and i am sending the data from systems on the network to the service. and when the number of clients get more i get the exception "The IAsyncResult object was not returned" at the client side and insted of client crashing my service crashes....can i get some help with this...
|
|
|
|
|
Im afraid i can not give you any detailed help on this subject but it appears that you have a problem handling your connections in your service. the service should ideally receive a request for a connection, check anything that may stop it using a new connection, and then report back to the client with a success/fail message in regards to the connection request.
EDIT:
max.4u wrote: will the service crash when the exception eccurs in the service...
Yes the service will crash just like any application would if an unhandled exception is thrown
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
its ok... i wil once again review my code in the service... and do u know whats the maximum number of connections the tcp listener can handle without queing....?
|
|
|
|
|
It appears to vary based on the OS, i just had a quick look at this[^]
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
thanks... and if i am not bothering you.... when i create a tcp socket and connect to the server and when the connection is established then is it regarded as the tcp connection or a socket connection..?
|
|
|
|
|
Im not sure but i would say it would be both
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Hi all,
How to write a xml file into Remote URL using its NetWorkCredentials(userid & password) ?
Please suggest me.
Thanks in advance
cheers
kvsekhar
|
|
|
|
|
So... you want to upload a file to a server? you could create an FTP for the server
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Thanks for your suggestion.
Is it not possible using DataSet.WriteXml(url) ?
because I could able to read xml file from url by following code
XmlUrlResolver resolver = new XmlUrlResolver();<br />
NetworkCredential nc = new NetworkCredential("id", "pwd");<br />
resolver.Credentials = nc;<br />
<br />
Uri myUri = new Uri("http://domain/Assessments/Expenses.xml");<br />
Stream s = (Stream)resolver.GetEntity(myUri, null, typeof(Stream));<br />
<br />
XmlTextReader xmlTextReader = new XmlTextReader(s);<br />
<br />
XmlDataDocument xdoc1 = new XmlDataDocument();<br />
xdoc1.DataSet.ReadXml(xmlTextReader, XmlReadMode.Auto);<br />
<br />
DataSet ds = xdoc1.DataSet;
How this logic will be applied for Writing XML to URL ?
|
|
|
|
|
im not sure if it is possible to write to a file like you are suggesting, and if it was possible it would more than likely require permissions to be set on the server for that kind of write access.
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Hi,
I'm trying to copy a URL to clipboard by using following code
Clipboard.SetText("http://somewhere.com" ,TextDataFormat.Html );
But nothing comes out, essentially i want to copy a URL and when i paste to Word or some place it should come out with Blue underlined i.e it should be a link.
Thanks in advance....
|
|
|
|
|
after a brief test it would appear that word expects a paste to be in the format of 'Text' so it will paste only the last 'Text' object on the clipboard. Setting the TextDataFormat to Html will therefore not paste into word. If you change it to text it will paste into word and word will auto handle the fact that it is a link when you hit 'enter'.
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Your URL is not a HTML link. Try
Clipboard.SetText("<a href=\"http://somewhere.com\">http://somewhere.com</a>" ,TextDataFormat.Html);
|
|
|
|
|
Hi, I had small application of BHO, through which I can retrieve the PDF files from cache using DocumentComplete and NavigateComplete2 Events of webbrowser. To get the PDF filepath, I used a filter of following:
http://theagussantoso.blogspot.com/2008/11/get-temporary-internet-explorer-files.html
The url can be obtained from the parameters of respective events.
but when I had retrived the PDF file copy through the filter present in above link, I was unable to get the URL through the events.
How can I get the copy of the pdf file when it is opened on IE?
|
|
|
|
|
why dont you check one of your many other posts on the subject? If you didnt get an answer in them, then dont repost. Go work it out for yourself.
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
get the .pdf url using this
http://www.omegacoder.com/?p=63
and download anywhere you want...
|
|
|
|
|
Hi Export
Pls Help Me I am Making dll and User Control in C#.NET.
i Want That My Dll and USer Control Not Used By Another Person.
|
|
|
|
|
Pretty much impossible with .net I'm afraid. Google for obfuscation and get your wallet out.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
I have an application where I am redrawing some images after each second. For this I have written a handler for timer in which i am calling one function which draws image. In timer i am incrementing number and based on the number i am displaying or redrawing image. In OnPaint event these images get displayed. But when I am trying to do this with timer event handler iam unable to display different image. I need to do ALT + Tab and again select the same application then my OnPaint gets called and whaever value of number the same image is get displayed. I want this to automatically displayed in sync with timer. What could be the reason.
|
|
|
|
|
Supra2 wrote: What could be the reason.
You are not calling Invalidate()[^] method. It will redraw the control.
|
|
|
|
|
Hi
I used the following code for listing files
int h=listBox1.SelectedIndex;
if(h==0)
{
try
{
reader = new XmlTextReader("path.xml");
while (reader.Read())
{
switch (reader.NodeType)
{
case XmlNodeType.Text:
String s1;
s1 = reader.Value;
String ss;
ss = listBox1.SelectedItem.ToString();
sss = ss + s1;
object o3 = (object)sss;
DirectoryInfo dire = new DirectoryInfo(sss);
if (dire.Exists)
{
String[] folder;
folder = Directory.GetDirectories(sss);
foreach (string foldername in folder)
{
DirectoryInfo di = new DirectoryInfo(foldername);
if (di.Exists)
{
String[] files;
files = Directory.GetFiles(foldername, "*.exe*");
foreach (String filename in files)
{
lvi = new ListViewItem();
lvi.Text = filename;
listView1.Items.Add(lvi);
lvsi = new ListViewItem.ListViewSubItem();
lvsi.Text = filename.Length.ToString();
lvi.SubItems.Add(lvsi);
}
this.Controls.Add(listView1);
}
}
}
break;
}
}
}
catch (System.Exception err)
{
MessageBox.Show("Error: " + err.Message);
}
}
if(h==1)
{
} The following line gets the selected item from listbox(C:\,D:\...)
ss = listBox1.SelectedItem.ToString(); It works for C:\.When D:\ is selected it again displays C:\ and not D:\
|
|
|
|
|
I think you need to re-think you design. And please use more descriptive variable names. and h can never be both 0 and 1, so your two if statements need to be and else if, or a swicth, or even better get rid of them completely as you never use h in your code so its value has no matter in the output you get.
I am assuming you have a list box with two entries. One c:/ and one d:/, correct? if so then ss (which i assume is getting the drive letter) is not working as you expect, try debuging it with a writeline or messagebox showing its value. if you can confirm this then you can move to the problem being else where.
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
itemcode and price are the fields in the table and i use sqldatareader to retreive data, when trying to do this using datareader.getstring(0) it works , but when call datareader.getfloat(1) it gives the exception Specified cast is not valid. i store the price as a float;
what might be the problem
|
|
|
|
|
either the column its referencing is not a float like you say, or your trying to assign a float to a different data type that does not support a cast from a float. does it compile? if not, lets see some code. If it does compile then try debuging by printing the value of the 'float' column as a string and see what value you get, just to check you have the right column
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
I had the same problem just last week. Try 'getdouble(1)' instead. It worked for me even though the database type is a float.
-NP
Never underestimate the creativity of the end-user.
|
|
|
|