|
Once you get the data back, why not just do a string replace LOCALHOST -> real host name? The issue isn't on your side, the web service isn't implemented properly. A web service should *NEVER* be returning LOCALHOST in URLs. You just need to work around the web service bug with the string replace.
|
|
|
|
|
Thank you very much that is what I needed.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
I guess you did find a developer to help you.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
You are not a developer but he was because of his answer (it doesn't matter if he is a beginner or advanced one). His solution worked out and will also work when upload my web service on any server. A developer mean is not God of coding? Are you?
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
JUNEYT wrote: You are not a developer but he was because of his answer
Thanks I needed a good laugh at the end of the day
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I am glad that I made you happy somehow but please have a toothpaste and toothbrush. Take it easy.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
A toothbrush and toothpaste? Sorry I think something got lost in translation. Why not just give up while your behind.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
We were actually not translating something but your behavior...
I didn't ask you if he was a developer. I was looking for a solution and he provided me so.
So don't give up! keep coding your own behavior.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
JUNEYT wrote: I was looking for a solution and he provided me so.
Yes, you asked "How can I set LOCALHOST in web config..."
To which my replay was, "You can't. There is no setting in the web.config file..."
How is that not a solution? Must have gotten lost in the translation, or perhaps I didn't use enough toothpaste
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Mark, I'm surprised by this response. The last bit is unusually unkind of you; you're always very helpful, in my experience. Are you having a bad day? Yes, the question implied a solution approach that won't work, but we are not all professionals here, with years of experience to draw from, and sometimes we get lost on a wrong track because of it. Your answer was initially excellent, but it wouldn't have taken a lot of effort for an expert like you to suggest another approach. I hope you have a better day tomorrow, and thank you for the help you've given me, a perpetual tyro, over the years...
Will Rogers never met me.
|
|
|
|
|
Roger Wright wrote: a perpetual tyro
Is this a common expression? I wonder how many people know what "tyro" means outside of the military and (possibly) civil aviation.
|
|
|
|
|
Well, I'm not military and I know what a tyro is; and I didn't need to look it up either.
|
|
|
|
|
I had to look it up. Is that some British word? I'd never heard it used in the US before, but then again, I'm not in the military.
|
|
|
|
|
I had the benefit of studying Latin at school, which helps. And no - it was a dead language when I studied it, I'm not that old.
|
|
|
|
|
As far as I've heard, I'm the only one among my vast collection of friends and acquaintances who has used it in a sentence, but they all understood what I said.
I learned the word as a child, and don't recall where; I wasn't aware of any connection to the military.
Will Rogers never met me.
|
|
|
|
|
hi
i have attach a Nokia 7610 as GSM to my cell phone. i received a call on my computer using AT command ATA in hyper terminal. but now i want to implement it in c#. any idea how can i do this. i have done all about serial port connection checking in c#.
thanks
|
|
|
|
|
You just need to use the SerialPort class to do this. Below is a sample that should help you get the idea on how to do this:
SerialPort serialPort = new SerialPort("COM1", 115200, Parity.None, 8, StopBits.One);
serialPort.WriteTimeout = 5000;
serialPort.ReadTimeout = 5000;
serialPort.DataReceived += new SerialDataReceivedEventHandler(serialPort_DataReceived);
serialPort.Open();
serialPort.DtrEnable = true;
serialPort.RtsEnable = true;
serialPort.Write("AT+CMGF=1\r\n");
Thread.Sleep(500);
serialPort.Write("AT+CNMI=2,2\r\n");
Thread.Sleep(500);
serialPort.Write(string.Format("AT+CSCA=\"+{0}\"\r\n",serviceCentreAddress));
Thread.Sleep(500);
|
|
|
|
|
thanks but this is i guess sending data from pc. but i want to receive a call on pc. i dont find it how to start. i knw i have to use serial Port class. n i have set the com port and burd rate etc.
but how whn a fon ring the pc receive that call? how should pc come to knw that there is a call? should i write a code in Load()?
|
|
|
|
|
Did you not see that there's a data received event? You'd hook into this.
Please, don't use textspeak when posting in the forums. It's extremely irritating.
|
|
|
|
|
To elaborate on Pete's response, the sample code he provided implemented a hook to capture received data events. All you have to do is write the code that handles those events. You'll probably want to create a buffer to capture the incoming stream of data, based upon the expected size of incoming transmissions, then spawn a separate thread to respond to the message so that your handler doesn't block other incoming streams. Of course, if your application is one which is supposed to wait for a response from the recipient before sending another message, this step won't be necessary. How you handle incoming messages depends a lot on what you're trying to do, but Pete's already given you the entry point you need to capture incoming data.
Will Rogers never met me.
|
|
|
|
|
Hi,
We have a windows app which is installed in many systems..and the server is resided
on different PC..so whenever users loading the app due to many hits to server..the application is becoming very slow..
so i tried to use caching the data ..with expiration..(as we dont have any db changes during expiration time..)
i tried the below article which was posted in codeproject...
"http://www.codeproject.com/KB/cs/webservicecache.aspx"
but this article explains to cache data locally..but i need o cache the data in the server...so that eventhough many users run the app the load will be less...
Please help me regarding the same..
|
|
|
|
|
try some other techniques
|
|
|
|
|
Subin Mavunkal wrote: try some other techniques
This is a really pointless answer and does nothing for CodeProject's reputation, and even less for yours.
The best things in life are not things.
|
|
|
|
|
pradeep455 wrote: but this article explains to cache data locally..but i need o cache the data in the server...so that eventhough many users run the app the load will be less...
That won't help much; database-servers are optimized to return data as fast as possible from their datastore. You'd still have the same amount of network-traffic, and the extra caching-application might consume CPU-time that the database-server wants, moving the delay from one application to another.
Caching on the client side will remove the need to transport the data over the network and moves some work from the server to the local machine. That's the way to go, unless you have a server that never runs into capacity-problems. A simple way to achieve this is to synchronize the database from the server with a local copy. I'd only sync the readonly data; lookuplists do better when local, especially if required often.
Or, if you have those in a real List , serialize them after retrieving them once, save it locally, and deserialize from the local path the next time your app starts.
Bastard Programmer from Hell
|
|
|
|
|
Let me get this right - you have a WinForms/WPF application that connects to a server to retrieve data and manipulate it. You want to retrieve information from the server and use it locally, but you think you will get better performance if you retrieve it from a cache at the server end. Have I understood your requirements properly?
What I am unclear about here, is whether the remote machine is merely a database server, or whether it has web services that serve up the data. The client side architecture is greatly affected by this fact.
If the remote PC is merely a database, then you should just retrieve the data and do any caching locally. It is possible that you are issuing slowdown problems because you are trying to run an enterprise database on a simple PC, and have other issues because of that design.
If the remote PC is a web service (whether or not served up by WCF), then it could make sense to cache the data at the server side.
Unfortunately, we cannot offer any more detailed help because you have not offered sufficient detail as to what your architecture actually is.
|
|
|
|