Re: [ADVANCED-DOTNET] Click Once and Internet Zone

2006-04-19 Thread John Davis
http://samples.gotdotnet.com/quickstart/winforms/Samples/IeSourcing/VB/IESourcing.htm > Date: Wed, 19 Apr 2006 12:23:57 -0400> From: [EMAIL PROTECTED]> Subject: Re: > [ADVANCED-DOTNET] Click Once and Internet Zone> To: > ADVANCED-DOTNET@DISCUSS.DEVELOP.COM> > I did not know you can host a WinFor

[ADVANCED-DOTNET] Click Once and Internet Zone

2006-04-19 Thread John Davis
With Framework 2.0 I can host a Winforms control in a web page with code running in the Internet Zone permission set. Everything works fine. However, if I create a Click Once application which also has it's runtime permissions limited to the internet zone it doesn't just deploy. The "Publishe

Re: [ADVANCED-DOTNET] HttpListenerRequest and chunking

2006-03-17 Thread John Davis
d exit, having set up to handle the EndRead. Sounds interesting At 11:54 AM 3/16/2006, John Davis wrote >Does this support chunking? If so, how does it work? Samples anyone? J. Merrill / Analytical Software Corp === This list is hosted by Deve

[ADVANCED-DOTNET] HttpListenerRequest and chunking

2006-03-16 Thread John Davis
Does this support chunking? If so, how does it work? Samples anyone? === This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com

Re: [ADVANCED-DOTNET] Who calls the async socket callback

2006-02-17 Thread John Davis
If you pass a callback method and call EndXXX in it then it is a completion port thread. From: Tony Hal <[EMAIL PROTECTED]> Reply-To: "Discussion of advanced .NET topics." To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM Subject: [ADVANCED-DOTNET] Who calls the async socket callback Date: Thu, 16 Feb 2

[ADVANCED-DOTNET] Graphics::CopyFromScreen

2006-02-16 Thread John Davis
The CopyPixelOperation values don't work if the destination is a graphics object backed by an in memory bitmap. However, it does work if the Graphics object is from a Control (ie backed with video memory). Is there a way in .Net to allocate a Bitmap which is allocated from video memory? ===

[ADVANCED-DOTNET] SupressContent property on HttpResponse

2006-02-15 Thread John Davis
Anybody know what this actually does? The documentation is pretty slim, and I can't see any samples on the web that use it. Perhaps it just tosses the http header? === This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your su

Re: [ADVANCED-DOTNET] Possible defect in BeginWrite on FileStream

2005-12-19 Thread John Davis
g OffsetLow and OffsetHigh to see if it can be made thread-safe. On Mon, 19 Dec 2005 13:54:47 -0600, John Davis <[EMAIL PROTECTED]> wrote: >I'd have to disagree. If the Seek logic was removed, BeginWriteCore would >be fine for multithreaded access. > > >>From: Pete

Re: [ADVANCED-DOTNET] Possible defect in BeginWrite on FileStream

2005-12-19 Thread John Davis
O operation; which the existing FileStream implementation is not designed to do. http://www.peterRitchie.com/ On Mon, 19 Dec 2005 12:11:20 -0600, John Davis <[EMAIL PROTECTED]> wrote: >Yes ... is it doing that? > > >>From: Peter Ritchie <[EMAIL PROTECTED]> >>Reply-To

Re: [ADVANCED-DOTNET] Possible defect in BeginWrite on FileStream

2005-12-19 Thread John Davis
. But you can't use the same overlapped structure for concurrent writes. On Mon, 19 Dec 2005 11:59:07 -0600, John Davis <[EMAIL PROTECTED]> wrote: >See BeginWriteCore ... it already allocates the OVERLAPPED. > >>From: Peter Ritchie <[EMAIL PROTECTED]> >>Repl

Re: [ADVANCED-DOTNET] Possible defect in BeginWrite on FileStream

2005-12-19 Thread John Davis
oesn't make sense. http://www.peterRitchie.com/ On Mon, 19 Dec 2005 09:09:52 -0600, John Davis <[EMAIL PROTECTED]> wrote: >Fair enough, we need an AsyncFileStream class which inherits from FileStream >and has BeginWrite/Read methods on it which contain file offset arguments.

Re: [ADVANCED-DOTNET] Possible defect in BeginWrite on FileStream

2005-12-19 Thread John Davis
happen to hit the case where you want to do something that you know would be pretty easy for the underlying implementation you happen to be using. But that doesn't translate into an argument that Stream is designed wrong. -- Ian Griffiths http://www.interact-sw.co.uk/iangblog/ > -Or

Re: [ADVANCED-DOTNET] Possible defect in BeginWrite on FileStream

2005-12-16 Thread John Davis
ded access with FileStream you're either going to have to synchronize >access to a single FileStream object, or use one FileStream object per >thread. This is exactly how FileStream is documented; there's no bug. > >If you want a thread-safe object to perform multi-thread

Re: [ADVANCED-DOTNET] Possible defect in BeginWrite on FileStream

2005-12-15 Thread John Davis
DISCUSS.DEVELOP.COM Subject: Re: [ADVANCED-DOTNET] Possible defect in BeginWrite on FileStream Date: Thu, 15 Dec 2005 22:42:36 - John Davis wrote: > Ian I'm afraid you're really mistaken on this one. Which bit do you disagree with? Do you disagree that Stream is the wrong abs

Re: [ADVANCED-DOTNET] Possible defect in BeginWrite on FileStream

2005-12-15 Thread John Davis
ead/write operation is done "on the background"; but, it doesn't imply multi-threaded access to a file. http://www.peterRitchie.com/ On Thu, 15 Dec 2005 10:01:39 -0500, John Davis <[EMAIL PROTECTED]> wrote: >Ian I'm afraid you're really mistaken on this one

Re: [ADVANCED-DOTNET] Possible defect in BeginWrite on FileStream

2005-12-15 Thread John Davis
dly it's the only one we're offered >AFAIK.) > >But is this a defect? It's a bug to use a stream from multiple threads >without synchronization. It would still be a bug even with the atomic >method you propose. > > >-- >Ian Griffiths >http://w

Re: [ADVANCED-DOTNET] Missing callbacks from asynchronous sockets?

2005-06-20 Thread John Davis
Just wanted to put this link here for posterity. There is what I would call a bug in the async methods for v1.1 of the framework in that they really aren't compatible with the current GC. You need to preallocate to avoid a managed heap which will grow without end. http://blogs.msdn.com/yunjin/ar

Re: [ADVANCED-DOTNET] Possible defect in BeginWrite on FileStream

2005-05-25 Thread John Davis
a snapshot of the seek location when the operation starts? -- Ian Griffiths http://www.interact-sw.co.uk/iangblog/ > -Original Message- > From: John Davis > > The way I understand it, the current BeginWrite on the FileStream object > will write out it's buffer at the

[ADVANCED-DOTNET] Possible defect in BeginWrite on FileStream

2005-05-25 Thread John Davis
The way I understand it, the current BeginWrite on the FileStream object will write out it's buffer at the location of the last Seek. The problem comes when there are multiple threads using the same FileStream instance. Each one is looking to write to a different offset in the file. This mean

Re: [ADVANCED-DOTNET] using async http handler to the max

2005-03-29 Thread John Davis
Uncle! :) Ian Griffiths <[EMAIL PROTECTED]> wrote:> >2) To call blocking APIs > > That's what I was looking for. If we eliminate blocking IO API's > then there isn't a need to spawn off threads. Sure, but often once you've eliminated the blocking IO APIs you're left with nothing, because there t

Re: [ADVANCED-DOTNET] using async http handler to the max

2005-03-17 Thread John Davis
x27;t shipped yet. I think calling the current product 'legacy' code is a bit of a stretch. (Whether you'd use this technique with databases is a separate question of course - arranging to have hundreds of concurrent requests to the DB might not help your performance much...) -- Ian G

Re: [ADVANCED-DOTNET] using async http handler to the max

2005-03-16 Thread John Davis
this case, ASP.NET's built-in threading works pretty well. The case where the technique that Fritz illustrates works best is in heavily IO-bound work where the IO you are doing happens to force you to use a synchronous API. But I do concur with your assessment of your comment's value

Re: [ADVANCED-DOTNET] using async http handler to the max

2005-03-16 Thread John Davis
I'm sure Fritz is a great guy and all, but that "how to create an extra thread pool" article is one of the worst pieces I've seen yet. The whole point of async IO is to have the async work pump through IO completion ports, this eliminates the need for thread pools. The only value I see in Frit

Re: [ADVANCED-DOTNET] SSE, SSE2 etc.

2004-12-14 Thread John Davis
e, generates optimized code for other processors as well." From http://msdn.microsoft.com/msdnmag/issues/04/03/ScientificC/ also http://www.devx.com/Intel/Article/6960 Ben > -Original Message- > From: Unmoderated discussion of advanced .NET topics. [mailto:ADVANCED- > [EM

[ADVANCED-DOTNET] SSE, SSE2 etc.

2004-12-14 Thread John Davis
It's been a couple years now and we still can't access parallel instructions from within managed code. If there are no plans for vectorizing through the jitter, at least give us IL instructions similar to the C++ intrinsics for SSE and SSE2. __

Re: [ADVANCED-DOTNET] .Net Service getting combined with Windows Forms AppDomain

2004-10-31 Thread John Davis
No, there isn't any remoting connection. But there is a socket connection between the two. - Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. === This list is hosted by DevelopMentor® http://www.develop.c

[ADVANCED-DOTNET] .Net Service getting combined with Windows Forms AppDomain

2004-10-29 Thread John Davis
I just had our main eventing service crash. It is a .Net Service written in C#, all of it is managed code. Upon attaching a debugger to the service process and looking at the threads I noticed one of them had System.Winforms calls on it. There are no references whatsoever in the service to Wi

[ADVANCED-DOTNET] Async Sockets and BeginSend

2004-10-26 Thread John Davis
If I call BeginSend, and then call it a couple more times before the first one has completed can I rest assured that the corresponding byte buffers will will go out on the wire in the same order? ie Are all calls to BeginSend on the same socket queued? - Do you

Re: [ADVANCED-DOTNET] Opening a file for async io operations

2004-09-08 Thread John Davis
way to do this (other than Managed C++ and P/Invoke); I am curious to know also. Srihari On Wed, 8 Sep 2004, John Davis wrote: > Got asked for more details. > > If you look at the latest docs on FileStream.BeginRead it says ... > > By default, FileStream opens the operating system h

Re: [ADVANCED-DOTNET] Opening a file for async io operations

2004-09-08 Thread John Davis
calls to the file handle. I would prefer to have my async operations fire through an IO completion port, like the socket implementation. Usually more efficient if done this way. John Davis <[EMAIL PROTECTED]> wrote: Is it possible to get the IntPtr file handle for this call without doing i

[ADVANCED-DOTNET] Opening a file for async io operations

2004-09-08 Thread John Davis
Is it possible to get the IntPtr file handle for this call without doing interop? [C#]public FileStream( IntPtr handle, FileAccess access, bool ownsHandle, int bufferSize, bool isAsync); - Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free stora

Re: [ADVANCED-DOTNET] Missing callbacks from asynchronous sockets?

2004-08-11 Thread John Davis
ternalWaitForCompletion on LazyAsyncResult) on the internal Event for you. What makes you think EndSend will not work in this form? Garry On Wed, 4 Aug 2004 19:29:46 -0700, John Davis wrote: >Do a WaitOne on the WaitHandle in the IAsyncResult, returned from BeginSend, before calling EndSe

Re: [ADVANCED-DOTNET] Missing callbacks from asynchronous sockets?

2004-08-10 Thread John Davis
Do a WaitOne on the WaitHandle in the IAsyncResult, returned from BeginSend, before calling EndSend. Or pass a callback to the BeginSend, and then call EndSend within the callback. A lot of the current socket documentation is just plain wrong. I reported it a couple weeks ago, and got a respo

Re: [ADVANCED-DOTNET] Missing callbacks from asynchronous sockets?

2004-07-26 Thread John Davis
I would really like to see a test app posted that reproduces this behavior. My best guess is that the problem is due to lack of synchronization somewhere. "J. Merrill" <[EMAIL PROTECTED]> wrote:I'm surprised that the framework code doesn't allocate a large block of (possibly unmanaged) memory t

Re: [ADVANCED-DOTNET] Missing callbacks from asynchronous sockets?

2004-07-23 Thread John Davis
Yes, synchonization out the wazoo. In terms of debugging deadlocks, etc. I always put my server code in a dll and then run it inside a console app when I'm debugging. And have it run in a service when things are in production. This makes your debugging, esecially things like deadlocks, a lot

Re: [ADVANCED-DOTNET] Missing callbacks from asynchronous sockets?

2004-07-22 Thread John Davis
Our server only has one appdomain, and it works great. Another thing you really need to be careful about is the whole callback thing. Assume that your callbacks will be coming back on multiple IO threads. This will definitely be the case when running on a multi-processor box (or hyperthreaded

Re: [ADVANCED-DOTNET] Missing callbacks from async sockets?

2004-07-21 Thread John Davis
Just realized I misunderstood the original post. Yep, sounds like a virus or something. I've never experienced your problem. John Davis <[EMAIL PROTECTED]> wrote:Recently finished writing an eventing server using async sockets. All I can say is that the performance is nothin

[ADVANCED-DOTNET] Missing callbacks from async sockets?

2004-07-21 Thread John Davis
it'll probably take around 3x longer. Have a good one, John Davis - Do you Yahoo!? Vote for the stars of Yahoo!'s next ad campaign! === This list is hosted by DevelopMentor® http://www.develop.com Some .NET courses

Re: [ADVANCED-DOTNET] Missing callbacks from asynchronous sockets?

2004-07-21 Thread John Davis
it'll probably take around 3x longer. Have a good one, John Davis Garry Barclay <[EMAIL PROTECTED]> wrote: It appears that we are NOT receiving the (completion port) callback from an asynchronous socket (BeginSend/EndSend) call. The sockets are clients and the failure seems to be r

Re: [ADVANCED-DOTNET] Socket class documentation needs some attention

2004-06-28 Thread John Davis
the TCP protocol will pipe the 1024 bytes, and wait patiently until I am ready to receive the data and deliver it to me. So, it shouldn't matter if I receive it in one chunk or 4 smaller chunks. At least, this is my understanding of the whole sockets thing :-) Srihari On Mon, 28 Jun 2004, John Davis

[ADVANCED-DOTNET] Socket class documentation needs some attention

2004-06-28 Thread John Davis
anyone wants me too. $500/hr :) Regards, John Davis http://www.dallas-csharp-sig.com - Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! === This list is hosted by DevelopMentor® http://www.develop.com Some .NET courses

[ADVANCED-DOTNET] Async Web Methods

2004-04-12 Thread John Davis
If an async web method call times out before the corresponding EndXXX gets called, does the corresponding HttpContext object automatically get freed? === This list is hosted by DevelopMentor® http://www.develop.com Some .NET courses you may be interested in: NEW!

Re: [ADVANCED-DOTNET] Thread with message pump (UI thread)

2004-03-01 Thread John Davis
Yes, Control.Invoke uses the message pump. The message pump is the queue you speak of. I'm guessing the mechanism uses a PostMessage with a WM_USER + x. - Original Message - From: "John Elliot" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 01, 2004 5:34 AM Subject: Re:

Re: [ADVANCED-DOTNET] Asynch sockets and IO completion ports

2003-08-21 Thread John Davis
ular receive request because it'll be handled by the pool of threads dedicated to async IO requests, if the OS supports IO completion ports. -- Ian Griffiths DevelopMentor > -Original Message- > From: John Davis [mailto:[EMAIL PROTECTED] > > Someone pointed this out to me the o

[ADVANCED-DOTNET] Asynch sockets and IO completion ports

2003-08-20 Thread John Davis
Someone pointed this out to me the other day in the docs ... When your application calls BeginReceive, the system will use a separate thread to execute the specified callback method, and will block on EndReceive until the Socket reads data or throws an exception. I would hope that the callback d

Re: [ADVANCED-DOTNET] Remoting Events Framework version 1.1

2003-04-06 Thread John Davis
It works for me. I've got some sample code on my website. www.pcprogramming.com - Original Message - From: "Borisov, William" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 03, 2003 4:51 PM Subject: [ADVANCED-DOTNET] Remoting Events Framework version 1.1 > I'm trying

Re: [ADVANCED-DOTNET] Socket Notifications....where are they?

2003-03-06 Thread John Davis
The most efficient way to program sockets is via io completion ports. If you use the (Begin/End)*** methods on the Socket class, and the host OS supports io completion ports, these calls will get mapped to io completion ports via the thread pool. - Original Message - From: "Nigel" <[EMAIL

Re: [ADVANCED-DOTNET] I/O completion ports

2003-02-14 Thread John Davis
Using the async begin/end method is 10x easier than doing this directly from the Win32 API, and just as efficient. One can pass arbitrary(generic) state around using the "object state" param. - Original Message - From: "Fiach Reid" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday,

Re: [ADVANCED-DOTNET] http channel in .NET Remoting

2003-02-04 Thread John Davis
Bingo, look at the IHttpHandler interface for the server side. You'll need to create your own signaling stream if you want to reach clients behind a firewall. You'll consume this stream on the client side via the HttpWebRequest class. Also be aware that some firewalls close the socket after so m

Re: [ADVANCED-DOTNET] IP Server Questions...

2003-01-27 Thread John Davis
gt; -- keeping everything from being marked for collection. > > -Mike > http://staff.develop.com/woodring > http://www.develop.com/devresources > > [1] > http://discuss.develop.com/archives/wa.exe?A2=ind0012C&L=DOTNET&P=R22579 > &I=-3 > > > -Original Me

Re: [ADVANCED-DOTNET] IP Server Questions...

2003-01-14 Thread John Davis
s, > Patrik > > > -Original Message- > > From: John Davis [mailto:[EMAIL PROTECTED]] > > Sent: 2003-01-13 20:46 > > To: [EMAIL PROTECTED] > > Subject: Re: [ADVANCED-DOTNET] IP Server Questions... > > > > > > Along this line ... is the Socket

Re: [ADVANCED-DOTNET] IP Server Questions...

2003-01-13 Thread John Davis
Along this line ... is the Socket class ever going to get layered on top of IO completion ports? - Original Message - From: "Scott Burrington" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 13, 2003 12:32 PM Subject: [ADVANCED-DOTNET] IP Server Questions... > Hi all, >

Re: [ADVANCED-DOTNET] AW: [ADVANCED-DOTNET] host and network byte order?

2002-10-23 Thread John Davis
and any Java app. Am I right, or have I overseen > an important issue? > > > -Ursprüngliche Nachricht- > Von: John Davis [mailto:jdavis@;PCPROGRAMMING.COM] > Gesendet: Mittwoch, 23. Oktober 2002 14:09 > An: [EMAIL PROTECTED] > Betreff: Re: [ADVANCED-DOTNET] host and network byte order?

Re: [ADVANCED-DOTNET] host and network byte order?

2002-10-23 Thread John Davis
Java is big endian (the MSB (most significant byte) comes first). .Net appears to be little endian (LSB (least significant byte) comes first). But I don't think the standard really specifies anything. So, I guess it just defaults to whatever the native ordering is for the CPU. For Intel CPU's t

[ADVANCED-DOTNET] Use of IO completion ports in .Net

2002-09-21 Thread John Davis
int32) > IL_00e5: throw > IL_00e6: ldarg.0 > IL_00e7: call instance class [mscorlib]System.Collections.ArrayList > System.Net.Sockets.Socket::get_AcceptQueue() > IL_00ec: ldloc.0 > IL_00ed: callvirt instance int32 > [mscorlib]System.Collections.ArrayList::Add(object) >

Re: [ADVANCED-DOTNET] Socket.BeginAccept vs. AcceptEx

2002-09-19 Thread John Davis
On NT kernel OS's BeginAccept calls AcceptEx, the completion of this comes back through GetQueuedCompletionStatus (in the thread pool) which is then used to call your AsyncCallback(OnConnected). Most our there who have not used IO completion ports don't realize how sweet this is. It's now possib

Re: [ADVANCED-DOTNET] No Socket Receive event

2002-09-09 Thread John Davis
Look at the BeginRead method on Socket, the event you're looking for is actually a callback. - Original Message - From: "Jeff Kryzer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, September 06, 2002 3:52 PM Subject: [ADVANCED-DOTNET] No Socket Receive event > I've searched a

[ADVANCED-DOTNET] Sockets, .Net Remoting take > 1min. for init in IEEXEC.EXE

2002-09-03 Thread John Davis
>that you're hitting the default HTTP 1.1 2-concurrent-connections to 1 >server per process maximum when .Net is trying to fetch the application >config file? There are ways to open more than 2 concurrent connections, but >I don't know them from the top of my head. Search MSDN

[ADVANCED-DOTNET] Socket class init within iexec.exe

2002-09-02 Thread John Davis
Couldn't get an answer in the last group so I'm askin the big guns now. The socket ctor acts strangely when executed within ieexec.exe The first call can take over a minute. If I attach the debugger and break, I get the call stack below when using a release build. -

Re: [ADVANCED-DOTNET] CAS: what's the diff between FullTrust and Everything permission sets?

2002-09-02 Thread John Davis
Had the same problem. I gave up on "Everything" and am just using "FullTrust". And believe it or not I am still hitting problems within ieexec.exe when the socket library initializes. Documentation is sorely lacking on all this security stuff. Windows forms controls act one way, href launched

[ADVANCED-DOTNET] Code Groups

2002-07-28 Thread John Davis
Why is it that I can programmatically add code groups to RootCodeGroup of the "Machine" policy level. But if I try to add a code group to any of the descendants ie Trusted_Zone it doesn't show up in the ".Net Framework Configuration tool" What's really got me puzzled is that I can manually add c