RE: ASP.NET web site
Maintaining it as it is will cost more in terms developer life span Yes will, my life span is expected to be short enough already! Time for a white lie - along the lines of not supportable, not feasable or if you prefer more of the Mythbusters slant: not plausable I have previously undertaken such a conversion as what you might call technical debt/death but it always leads me to Developer Pain so I tend to be upfront. R -Original Message- From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Arjang Assadi Sent: Wednesday, 14 December 2011 18:09 To: ozDotNet Subject: Re: ASP.NET web site On 14 December 2011 18:55, Peter Maddin petermad...@iinet.net.au wrote: I could not agree more but the powers that be would prefer one to maintain what's there and avoid a rewrite if possible. Peter, I feel your pain. Some things must not be maintained but scrapped, this is a perfect example, otherwise why not leave it running on whatever ancient server it was running on as it was? Maintaining it as it is will cost more in terms developer life span. Regards Arjang
RE: VB6 calling modal .net dialog
Hi Greg, Did you try the forms interop toolkit ? http://msdn.microsoft.com/en-us/vstudio/bb419144 Failing that, I would have tried the .NET UI as a user control ;) |-Original Message- |From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet- |boun...@ozdotnet.com] On Behalf Of Greg Keogh |Sent: Wednesday, 14 December 2011 4:55 PM |To: 'ozDotNet' |Subject: RE: VB6 calling modal .net dialog | |In VB6 the main window handle is actually a hidden window, so you'd |need to get the form's handle | |Good grief! I suppose that makes sense considering how VB6 windows behave. | |It would be quicker to re-write the pop up form in VB6, and add the |.net |database |layer logic as dll with a com wrapper, if there is one, or just |implement |some ado |in vb6 for the database stuff. Or we-write the vb6 stuff in .net :) | |My colleague has decided to write the picker UI in VB6 and all the data stuff will |be in a .NET DLL with an Interop wrapper. | |The lesson from this is that VB6-.NET Interop of library code is not too hard, but |doing so with Forms/dialogs is very hard to improbable. I haven't tried wrapping |.NET Controls as ActiveX for VB6 to consume, I almost did a few weeks ago and |then remembered all the registering of COM and the install footprint and I |abandoned the idea. | |Greg
RE: ASP.NET web site
I think the cost to my sanity is probably too much as well. Regards Peter Maddin Applications Development Officer PathWest Laboratory Medicine WA Phone : +618 6396 4285 (Monday, Wednesday,Friday) Phone : +618 9346 4372 (Tuesday, Thursday) Mobile: 0423 540 825 E-Mail : petermad...@iinet.net.au; peter.mad...@health.wa.gov.au The contents of this e-mail transmission outside of the WAGHS network are intended solely for the named recipient's), may be confidential, and may be privileged or otherwise protected from disclosure in the public interest. The use, reproduction, disclosure or distribution of the contents of this e-mail transmission by any person other than the named recipient(s) is prohibited. If you are not a named recipient please notify the sender immediately. -Original Message- From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Arjang Assadi Sent: Wednesday, 14 December 2011 4:09 PM To: ozDotNet Subject: Re: ASP.NET web site On 14 December 2011 18:55, Peter Maddin petermad...@iinet.net.au wrote: I could not agree more but the powers that be would prefer one to maintain what's there and avoid a rewrite if possible. Peter, I feel your pain. Some things must not be maintained but scrapped, this is a perfect example, otherwise why not leave it running on whatever ancient server it was running on as it was? Maintaining it as it is will cost more in terms developer life span. Regards Arjang
Re: ASP.NET web site
There's a pretty good explanation (and resolution) to the '__o' is not declared issue on stackoverflow - http://stackoverflow.com/questions/750902/how-do-i-get-rid-of-o-is-not-declared On 14 December 2011 16:55, Peter Maddin petermad...@iinet.net.au wrote: I have been given a couple of applications written in vb.net (which I dislike, having only used c#) ** ** One solution is ok, I have managed to tweak the database, asmx web services and add a web site to IIS so that it actually runs. It was written in vs2005 and uses lots of obsolete ideas (still at the time it was probably hot stuff). ** ** The other solution has got me flummoxed. It has code in-line with html.*** * When I open the web site with vs2010, it does not complain but won’t build. I get lots of errors like ** ** Error 1949 '__o' is not declared. It may be inaccessible due to its protection level. ** ** I have no idea how to address this. ** ** Some of the aspx have include statements like this ** ** %@ Page explicit=true % %@ Import namespace=ADODB % script language=VB runat=Server Dim Conn As ADODB.Connection Dim rst As ADODB.Recordset Dim SQLstr As String Dim varErrors As Double Dim lngCounter as Long /script !-- #INCLUDE FILE=includes/include-header.aspx -- !-- #INCLUDE FILE=includes/include-adovbs.aspx -- !-- #INCLUDE FILE=includes/include-ErrorHandler.aspx -- ** ** I am not familiar with asp.net using vb.net in this manor (vb code mixed in with javascript and html). Are these include statements being honoured? If not, it might explain why some variables/properties cannot be found.*** * ** ** I am not sure how old this code is but it looks pretty archaic to me. ** ** *Regards Peter Maddin* *Applications Development Officer* *Path**West Laboratory Medicine WA* *Phone : +618 6396 4285 (Monday, Wednesday,Friday)* *Phone : +618 9346 4372 (Tuesday, Thursday)** Mobile: 0423 540 825* *E-Mail : petermad...@iinet.net.au; peter.mad...@health.wa.gov.au* *The contents of this e-mail transmission outside of the WAGHS network are intended solely for the named recipient's), may be confidential, and may be privileged or otherwise protected from disclosure in the public interest. The use, reproduction, disclosure or distribution of the contents of this e-mail transmission by any person other than the named recipient(s) is prohibited. If you are not a named recipient please notify the sender immediately**.* ** **
Re: Playing nicely with ServicePointManager.ServerCertificateValidationCallback
Thanks, Corneliu. Didn't think of using an AppDomain to circumvent the static nature of the callback - good idea! Thanks, Joe. On Tue, Dec 13, 2011 at 12:06 PM, Corneliu I. Tusnea corne...@acorns.com.au wrote: Joseph, Firstly you should never (for production use) hook onto that method. It's a stupid design from MS to even have that method available as a static for the clear reasons you already identified (racing conditions mostly). The best way to play nicely is to start your plugin (or some part of it) inside a new app domain. The app domain will have its own ServicePointManager that you can hook onto without worrying you mess up with the rest of the application. Once done you can tear-down the app domain. If you need it for a longer time just keep that AppDomain live until the end of the app pool. Corneliu. On Tue, Dec 6, 2011 at 3:27 PM, Joseph Clark jcl...@atlassian.com wrote: Hello list! I have a requirement to relax SSL certification validation on certain web requests in my application. I know that I can do this by setting a custom delegate on the ServicePointManager.ServerCertificateValidationCallback property - which works fine. The problem I have is that I am not in full control of the host application - I am writing a plugin package that gets hosted in a 3rd party IIS application. Is there a way I can achieve what I'm after whilst still remaining a 'good citizen' in the host app? I have written the delegate so that it only performs my custom validation when it matches the request URI to the URI I expect (otherwise performing the default check), and I only register the callback for as long as I need it during the execution of a single method before setting it back to the original value. Even so, this is still vulnerable to race conditions if there is another request executing concurrently, and my code would be vulnerable to other code overriding the certificate validation callback in a similar manner. Any suggestions on how I can make this more robust? Examples and samples for this API on the Internet are mostly shocking, encouraging developers to just set the callback and return true (ie. no validation) with no discussion of the pitfalls this entails. Cheers, Joe.
RE: VB6 calling modal .net dialog
Did you try the forms interop toolkit ? http://msdn.microsoft.com/en-us/vstudio/bb419144 Hey now that's really interesting. The trouble is the web page doesn't explain how it works. I'll install the MSI and see if it has technical information on what it does. I'm wondering if it avoids COM registration. Failing that, I would have tried the .NET UI as a user control ;) Yes, we're not going to try and make VB6 call .NET Forms (separate windows). Our first option was to write everything but the UI in .NET, leaving only a thin shell of a UI in VB6. Now we have a second option ... if this Interop kits works well then we can perhaps easily reuse complete .NET controls in the VB6 app and slowly phase it out. Greg
RE: VB6 calling modal .net dialog
| |Did you try the forms interop toolkit ? |http://msdn.microsoft.com/en-us/vstudio/bb419144 | |Hey now that's really interesting. The trouble is the web page doesn't explain how |it works. I'll install the MSI and see if it has technical information on what it does. |I'm wondering if it avoids COM registration. | It provides templates and will generate COM wrappers as well. For VB6 you still need COM registration or write a SxS manifest for it (probably too painful to get the VB6 IDE to recognise the manifest though (never tried)) From .NET the SxS stuff should just work. |Failing that, I would have tried the .NET UI as a user control ;) | |Yes, we're not going to try and make VB6 call .NET Forms (separate windows). |Our first option was to write everything but the UI in .NET, leaving only a thin |shell of a UI in VB6. | |Now we have a second option ... if this Interop kits works well then we can |perhaps easily reuse complete .NET controls in the VB6 app and slowly phase it |out. | Good luck
wcf nettcp reliable session 'duplicating' messages
calling wcf gurus (again) firstly, i've logged this on both microsoft connect and stackoverflow I have a nettcp wcf service with a CallbackContract for duplex communication using reliable sessions. After the session is established the server uses the callback channel to push several messages to the client: message1: 1024kb message2: 200bytes message3: 300bytes message4: 400bytes On slower connections (but still decent, say 20-40kb/sec) I observe the first message is received however subsequent messages are delayed for a period of time and using various networking utilities I established that the server *resends* message1 several times. Depending on the network speed it may resend as many as 5 times (the slower your link speed is). *If you change the bindings and remove reliableSession the problem disappears.* It looks like this is 'normal' behaviour from some things I've read but is causing havoc for people on slower connections (even 50kb/sec you get 'duplicate' messages) I have reproduced my issue in a test project with as few moving parts as possible. https://connect.microsoft.com/VisualStudio/feedback/details/713819/wcf-nettcp-reliable-session-duplicating-messages#details http://stackoverflow.com/questions/8487240/wcf-nettcp-reliable-session-duplicating-messages
RE: ASP.NET web site
Thanks for the link. That sort of explains why one is getting that bizarre error message. I am about to try and build this using vs2003, to see if that is better. Regards Peter Maddin Applications Development Officer PathWest Laboratory Medicine WA Phone : +618 6396 4285 (Monday, Wednesday,Friday) Phone : +618 9346 4372 (Tuesday, Thursday) Mobile: 0423 540 825 E-Mail : petermad...@iinet.net.au; peter.mad...@health.wa.gov.au The contents of this e-mail transmission outside of the WAGHS network are intended solely for the named recipient's), may be confidential, and may be privileged or otherwise protected from disclosure in the public interest. The use, reproduction, disclosure or distribution of the contents of this e-mail transmission by any person other than the named recipient(s) is prohibited. If you are not a named recipient please notify the sender immediately. From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of William Luu Sent: Thursday, 15 December 2011 7:24 AM To: ozDotNet Subject: Re: ASP.NET web site There's a pretty good explanation (and resolution) to the '__o' is not declared issue on stackoverflow - http://stackoverflow.com/questions/750902/how-do-i-get-rid-of-o-is-not-decla red On 14 December 2011 16:55, Peter Maddin petermad...@iinet.net.au wrote: I have been given a couple of applications written in vb.net (which I dislike, having only used c#) One solution is ok, I have managed to tweak the database, asmx web services and add a web site to IIS so that it actually runs. It was written in vs2005 and uses lots of obsolete ideas (still at the time it was probably hot stuff). The other solution has got me flummoxed. It has code in-line with html. When I open the web site with vs2010, it does not complain but won't build. I get lots of errors like Error 1949 '__o' is not declared. It may be inaccessible due to its protection level. I have no idea how to address this. Some of the aspx have include statements like this %@ Page explicit=true % %@ Import namespace=ADODB % script language=VB runat=Server Dim Conn As ADODB.Connection Dim rst As ADODB.Recordset Dim SQLstr As String Dim varErrors As Double Dim lngCounter as Long /script !-- #INCLUDE FILE=includes/include-header.aspx -- !-- #INCLUDE FILE=includes/include-adovbs.aspx -- !-- #INCLUDE FILE=includes/include-ErrorHandler.aspx -- I am not familiar with asp.net using vb.net in this manor (vb code mixed in with javascript and html). Are these include statements being honoured? If not, it might explain why some variables/properties cannot be found. I am not sure how old this code is but it looks pretty archaic to me. Regards Peter Maddin Applications Development Officer PathWest Laboratory Medicine WA Phone : +618 6396 4285 tel:%2B618%206396%204285 (Monday, Wednesday,Friday) Phone : +618 9346 4372 tel:%2B618%209346%204372 (Tuesday, Thursday) Mobile: 0423 540 825 E-Mail : petermad...@iinet.net.au; peter.mad...@health.wa.gov.au The contents of this e-mail transmission outside of the WAGHS network are intended solely for the named recipient's), may be confidential, and may be privileged or otherwise protected from disclosure in the public interest. The use, reproduction, disclosure or distribution of the contents of this e-mail transmission by any person other than the named recipient(s) is prohibited. If you are not a named recipient please notify the sender immediately.