For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
I was wondering, if there is any way to create out of office rules (Reply-With Templates, forwardings... http://office.microsoft.com/en-us/outlook-help/send-out-of-office-notices-automatically-with-an-exchange-account-HP001232830.aspx#BM2[^]) in Exchange 2010 using c#? (Preferably EWS)
I know that this can be done in Exchange 2003 using MAPI, but I was unable to find any Information for Exchange2010...
I would advise you to examine very carefuly your use of the streams and the WebResponse -- also avoid trying to reuse them -- this is an inherently asynchronous process and trying to create an SMS bulk texting application is not what those classes are intended to do -- it is one thing to use them to mimic browser fetches, but quite another to use them statically for multiple texts.
At the very least, close them and get them each time -- the Response -- are you reading to the end and closing the response?
There are two ways of doing this through a single process called a SnapShot.
1. You can capture your entire display area, or
2. by defining a rectangular area on the display area called the ROI (Region Of Interest)
There are lots of code samples out there that covers both scenarios. Use Google to search for "How to take a snapshot of my display" or "How to capture an area of my screen".
You can then save the memory stream (the captured information will be stored in a memory stream) in a few formats - JPG, TIFF, PNG and BMP.
I have a program created by me which I've been using for some time now. It's a tool for android and ios. I want to make it so if there is a connected android or ios device on my computer my program will automatically detect it but unfortunately where to start. I've been searching all over Google and found nothing of use. For example when the device is connected my label1 text will say something along the lines of "ios device connected"
Presumably your wrote this tool. And presumably it already does something with both devices.
So why can't you just find a do nothing API for each device, such as a query for version number, and put that in a thread that polls every X seconds. If it gets a result then the device is there. If no result then the device isn't.
I would like to see your code, too but -- I can offer you some help anyway.
Always use try/catch for network communications and db access and ignore anyone that tells you not to -- unless it is your boss, but even then -- you should use it. I am saying this -- not to chastise you or puff myself up -- I am saying it because if you do you will not only learn how to fix this yourself -- you will learn to write code that can handle issues and also it will perform better. Generally, I will wrap most all of a function in try/catch if it involves communications or database access. You do not need it everywhere, just in key areas that warrant it.
If you ignore it altogether -- your application will halt because you did not use try/catch-- not good for anyone and not good for you. If you use try/catch -- at least you know that an error occurred and at least the code can exit gracefully instead of spitting out that page that tells your users that your code just died on them.
You said -- continuously -- but, the exception seems to be telling a different story. I suspect that your buffer read is either missing data that is in the buffer, or you are not servicing it often enough or -- your buffer is too small to begin with. TCP has some built-in defense against many errors, but it cannot force you to service the socket properly, so -- it is the buffer, the socket properties or your read code. How large is the expected data?
Mostly, guessing buffer sizes is a bad idea -- either you get one too small or you waste resources by making it too large. This is not a career where guessing is a good strategy and asynchronous communications demands that we code properly and not make assumptions.