|
Hi cpians,
I have a program where :
The form creates a class then calls a method on that class, in this method I create a new thread to call another method in that class (which calls a webservice which is why I want it in another thread) .
Once the original method returns I call thread.sleep on the main thread so that I can ensure that the webservice call has completed (this is just for test purposes in the real world the program would go on regardless)
Problem is the call to thread.sleep causes my other thread, which should be going about its business un-interupted to pause.
Whats the vibe, when I tested it a few days ago Im sure it wasnt doing this ?
Thanks in advance.
|
|
|
|
|
Hello
I'm working on a Web Services consummer application for Windows and Pocket PC.
I meet a problem :
I get images from a database in a byte array :
myStream = System.IO.MemoryStream(myByteArray)
then I rebuild images with :
myImage = Image.FromFile(myStream)
It works on desktop
But on PPC, the FromFile method doesn't exist !!! Does anybody know how to convert some bytearray into image with the Compact Framework in C#.
thanks a lot !!
Julien
|
|
|
|
|
Am I going mad or was there an article on CP a few days ago that included a .NET-written application for viewing all cookies on a user's machine? I've searched all over and cannot find this article.
Cheers,
Tom Archer, Inside C#
Mainstream is just a word for the way things always have been -- just a middle-of-the-road, tow-the-line thing; a front for the Man serving up the same warmed-over slop he did yesterday and expecting you to say, "Thank you sir, may I have another?"
|
|
|
|
|
Hello,
I make a web service, and the ws export this method:
////////////////////////////////////////////
String __gc* Class1::GetString()
{
String *s;
s=new String("<root>Esto es una prueba>/Root>");
return s;
}//String __gc* Class1::GetString()
///////////////////////////////////////////////////
When "Invoke" wiith internet explorer, this is the result:
<string xmlns="http://tempuri.org/">
<root>Esto es una prueba
But, I want to modify this result:
<root>Esto es una prueba
How I do this, using Visual c++.NET
Thanks,
Regards,
Imanol
|
|
|
|
|
I just delevop a project using webservice,there are more than one webservice(.asmx file) in my project,how do i write the .disco file to let me refer these webservices
in other project?
thank u in advance!
|
|
|
|
|
I've seen some applications that apparently take a small screen shot of the are around your mouse cursor when you begin a drag operation, and rather than change your cursor to the default Windows drag cursor, show that bitmap following your cursor. Are there any samples either here on Code Project (that I'm just missing, because I did look first), or else where of how to do something like that? I'm sure that once I see it, I'll kick myself, but right now, I just can't think how to do it.
Thanks in advance.
Kyosa Jamie Nordmeyer - Cho Dan
Portland, Oregon, USA
|
|
|
|
|
Little Background:
I have a customer class with 2 properties (FirstName and LastName). On the set of the FirstName property I have code that will not allow the name to be longer than 35 characters, if it is the property throws an exception. This works fine...
Here's the problem:
I have a textbox that I databind to the Customer Firstname property. This displays correctly and binds correctly. But when I enter a value that causes the Customer FirstName property to throw and exception I can't catch the exception and display a message to the user. Instead the textbox will not let me leave until it is fixed.
Is there a way to catch the exception that the underlying Class throws?
Mediajuggle - Design House Quality At Freelance Prices
http://www.mediajuggle.com
|
|
|
|
|
I have had this problem before. I don't remember how I solved it...but, if you are still having trouble with this in a couple of days, then email me and I will dig through my old files.
Sincerely,
Jon Fitzgerald
jonfitzgerald2@hotmail.com
|
|
|
|
|
The way I solved the problem was by overriding the OnValidating method of the textbox. It works but it is not the most elegant solution, does this sound familar?
Mediajuggle - Design House Quality At Freelance Prices
http://www.mediajuggle.com
|
|
|
|
|
I have problem with calling websevice method Asyncronously using WebService behavior. I can not make more than two request simultaneously to webservice. If I call webservice method 3rd time, it won't event go to web service until response of 1st or 2nd is received.
But if I use the same web service in a windows application using Proxy. I can invoke web service method any number of times Asyncronously without waiting for response for the pervious calls.
Does anyone know why its behaving like this? Is there any way to solve this problem?
Thanks in advance.
Sanjeev
|
|
|
|
|
Sanjeev Kumar wrote:
If I call webservice method 3rd time, it won't event go to web service until response of 1st or 2nd is received.
Is it possible that the web server only has 2 threads handling requests from users?
|
|
|
|
|
The problem is not on the WebService, it's on the client. On the client, check the System.Net.ServicePoint.ConnectionLimit, it defaults to 2. Does this number raises an "A-HA" on you?
It's not the fall that kills you: it's the sudden stop - Down by Law, Jim Jamursch (1986)
|
|
|
|
|
Then, why it works with windows application?
How to check ServicePoint.ConnectionLimit in ASP Application ?
Thanks
sanjeev
|
|
|
|
|
Sanjeev Kumar wrote:
Then, why it works with windows application?
Because probably you are passing through a proxy, which only supports HTTP/1.0 forwarding, and in this case, the default connection limit is 4.
Check the documentation for ServicePointManager.DefaultPersistentConnectionLimit and ServicePointManager.DefaultNonPersistentConnectionLimit to see this difference.
Sanjeev Kumar wrote:
How to check ServicePoint.ConnectionLimit in ASP Application ?
Just print the damn thing!
It's not the fall that kills you: it's the sudden stop - Down by Law, Jim Jamursch (1986)
|
|
|
|
|
Hello,
I had written few articles for a major publishing company which unfortunately went out of business. I put together a website to publish these myself. The code samples are all in C#. Please check it out:
http://dotnetuser.www2.dotnetplayground.com/
Thanks
Madhuri Mittal
|
|
|
|
|
Madhuri Mittal wrote:
I had written few articles for a major publishing company which unfortunately went out of business
GlassHaus? Wrox?
Madhuri Mittal wrote:
I put together a website to publish these myself. The code samples are all in C#. Please check it out:
http://dotnetuser.www2.dotnetplayground.com/
If you want a better reaction then submit them to CP. I have not read them properly yet but from first glance they seem of high quality and would be received well here. Plus you get to say to potential employers "300k CPians say my articles rock"
Paul Watson Bluegrass Cape Town, South Africa
Macbeth muttered:
I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er
DavidW wrote:
You are totally mad. Nice.
|
|
|
|
|
Yes- Wrox, well I am considering doing it on CodeProject, but the amount of time everybody takes to publish them....I wrote these back in November 2002. Wrox decided to publish them in March and went out of business- anyways, thanks for your feedback I will definitely look into publishing them.
Madhuri Mittal
|
|
|
|
|
|
thanks- post them where you mean? Code project?
Madhuri Mittal
|
|
|
|
|
Madhuri Mittal wrote:
Code project?
Of course;)
Steve
McLenithan
Is Bert Evil?
|
|
|
|
|
Is it possible to write a trace with a EventLogTraceListener using a level of priority for an event like EventLogEntryType ???
By default using EventogTraceListener write trace event like info Event not like Warning or Error ? 
|
|
|
|
|
Hello all,
I've made a COM component that uses CryptAcquireContext. When I call it from VB.NET application it works perfectly, but when I try to call it from an ASP.NET web service CryptAcquireContext fails. The error is: "The system cannot find the file specified". How do I fix this error, is there some additional tag to put in Web.config file ?
Thanks in advance
Raphael Amorim Dantas Leite
VC++, VB, Java, .NET and eMbedded Programmer
|
|
|
|
|
Hi,
I have a major problem in .Net Remoting..
I want to implement a ActiveX Control on Server Side but there seems no way out. Here is how i tried to implement it.
1) Created a form which containd the activex control
2) Implemented by a Class object inheriting System.MarshalByRefObject.
3) Created a instance of form in the class, like:
public class Class1 : System.MarshalByRefObject
{
FormControl fc = new FormControl();
}
and then tried to call it's member function on constructor.
4) on calling this object , from a server component implementing Remoting, it works fine.
5) but the problem comes now.. On implementing the client, a exception is thrown:
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has
been thrown by the target of an invocation. ---> System.Threading.ThreadStateExc
eption: Could not instantiate ActiveX control '11111111-7ba3-1111-9623-1111111
bd0' because the current thread is not in a single-threaded apartment.
Please help me out.
Ashok Singh
Real Programmer's do not comment their code, if it is hard to write then it should hard to understand
|
|
|
|
|
Try putting the following attribute in your client app. Remove the [STAThread] and put [MTAThread].
[MTAThread]
static void Main()
{
Application.Run(new Form1());
}
|
|
|
|
|
These two options appear to have no affect on the appearance of status bar panels. Anyone else observed this?
Marc
Help! I'm an AI running around in someone's f*cked up universe simulator. Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus Every line of code is a liability - Taka Muraoka Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"
|
|
|
|