Re: Async coding pattern

2013-03-02 Thread Joseph Clark
Could you check whether client.GetFooCompleted is null before assigning a
handler to it?


On Sat, Mar 2, 2013 at 3:54 PM, Greg Keogh  wrote:

> Folks, I have some skeleton code like this in a Silverlight app:
>
> client.GetFooCompleted += (s, e) =>
> {
> Trace("GetFoo result is {0}", e.Result);
> };
> client.GetFooAsync(rowId);
>
> This works fine, but then I noticed that the completion handler code keeps
> getting added on every call and the completion code runs 1, 2, 3, 4, etc
> times.
>
> Is there an elegant way of rejigging  this code to get the correct
> one-call-one-completion behaviour.
>
> Greg
>


Re: does anyone know a good technique to keep track of your braces in C#?

2013-02-13 Thread Joseph Clark
Hi Katherine,

When I was just beginning with programming in C#, I found it very helpful
to add a code comment to the line with the closing brace to indicate what
it was closing.  For example:

public void MyMethod(int number, bool value) {
for (int i = 0; i < number; i++) {
if (value) {
DoSomething();
} else {
DoSomethingElse();
} // end "if"
} // end "for"
} // end "MyMethod"

Are you using Visual Studio or similar tool to write your code? "Smart"
tools like Visual Studio can help keep track of this by automatically
inserting braces at the right places, as opposed to writing your code in a
plain text editor.









On Thu, Feb 14, 2013 at 10:37 AM, Katherine Moss
wrote:

> Hello all,
> Does anyone know any methods I could use when practicing programming in C#
> (I'm kind of just learning, so it can get annoying sometimes), to keep my
> braces straight?  I will be writing something simple, and then before I
> know it, I'll have fifty errors show up all because of one brace not closed
> or two braces in the wrong place.  Very annoying when fifty errors come up
> because of a single problem.  And not only in keeping track of braces, I'm
> also confused as to what goes in between braces since C# gets layered
> sometimes in terms of code blocks.  Books demonstrate examples well,
> however, they do not do a very good job telling you where braces go to
> begin with and why.  Responses would be great on this.  Thanks.
>
>


Re: [OT] Game designer (Kodu) prerequisite

2012-11-18 Thread Joseph Clark
DxDiag should get you started in the right direction -
http://en.wikipedia.org/wiki/DxDiag


On Mon, Nov 19, 2012 at 2:11 AM, Ian Thomas  wrote:

> A series of questions for some of you who are perhaps a few years younger
> than me: 
>
> I would like a primary/high school age kid to use the 
> Kodugame design system,  and it has 
> these prerequisites –
> 
>
> ** **
>
> **· **A graphics card that supports DirectX 9.0c and Shader Model
> 2.0 or higher is required.
>
> **· **.NET Framework 3.5 or higher is required. 
>
> **· **XNA Framework 3.1 Redistributable is required.
>
> Kodu is a Microsoft game designer -  it’s not purely for games design, so
> it says.
>
> I need to check out his computer’s capabilities first. 
>
> ** **
>
> Is DirectX 9.0c a redistributable, OK on Windows XP? Is there some utility
> that can be run on his computer to see if it’s OK? What CPU/GPU runs Shader
> Model 2.0? 
>
> ** **
> --
>
> **Ian Thomas**
> Victoria Park, Western Australia
>


Re: [OT] Secure page?

2012-05-02 Thread Joseph Clark
It really depends what the page does.  You could try installer a web
debugger like Fiddler  or
Charles(or look at the network tab in
Firebug or the Chrome inspector) to see
exactly where the page transmits your information to.

Even if the username and password are transmitted securely, presumably
there is some kind of ongoing session identifier being sent to & from your
browser and the non-secure endpoint, in which case you may still be
vulnerable to session hijacking.

On Thu, May 3, 2012 at 10:39 AM, Brett Holden wrote:

> Is it safe to enter a password on a web page that is just http?
> I've stumbled across a http page asking for my username and password. The
> page itself is http but has a form posting to a https PHP page. I would
> think the password gets sent in clear text but wanted to be sure.
>
> Cheers
> Brett
>


Re: Users who compulsively highlight or click text as they read it - are you out there?

2012-04-16 Thread Joseph Clark
Woot!  Thanks all for your replies :) At least I know I am not alone.

I'll paraphrase as much of this as I can into some feedback for our team.

Thanks heaps!


On Mon, Apr 16, 2012 at 6:13 PM, Joseph Clark  wrote:

> Hi list!
>
> This is a bit of an odd request, but I'm yet to find the right incantation
> of search phrases that will yield results from the Internet - hopefully you
> can help!
>
> There is a certain subset of computer users who, when reading text on the
> screen, compulsively click or highlight text that they are reading on the
> screen (I am one of them!).  I didn't even know I was doing it until
> someone pointed it out to me whilst I was pairing with them a few years ago.
>
> One of our in-house products recently shipped a new milestone version
> internally with a new "feature" when viewing issues that allows you to
> instantly edit the content of the fields on the screen simply by simply
> clicking on them (turning the plain HTML into editable form controls
> on-the-fly). This is pretty neat, but as a serial text-clicker, this
> feature is downright infuriating.  I was happy to put this down as either a
> little personality quirk of my own, or merely some indication that I may be
> insane, but a quick straw poll of those nearby finds at least 3 other
> people who have the same behaviour, or some variant (one guy says he clicks
> on browser windows a lot as a muscle-memory thing to ensure the right
> browser window has focus).
>
> I'm trying to describe to the other team why this new feature sucks for
> some people, but I have no idea if that "some people" is one in ten users,
> or one in one million.  Have searched a bit online for information about
> this, but I don't really know what to search for. Does this user behaviour
> have a name? Are there other people like me out there (hello? hello?)? Any
> literature around on whether or not its a great idea to bind functionality
> to an innocuous user-action like text-selection or clicking in an
> apparently non-clickable area?
>
> Cheers!
> Joe.
>
>


Users who compulsively highlight or click text as they read it - are you out there?

2012-04-16 Thread Joseph Clark
Hi list!

This is a bit of an odd request, but I'm yet to find the right incantation
of search phrases that will yield results from the Internet - hopefully you
can help!

There is a certain subset of computer users who, when reading text on the
screen, compulsively click or highlight text that they are reading on the
screen (I am one of them!).  I didn't even know I was doing it until
someone pointed it out to me whilst I was pairing with them a few years ago.

One of our in-house products recently shipped a new milestone version
internally with a new "feature" when viewing issues that allows you to
instantly edit the content of the fields on the screen simply by simply
clicking on them (turning the plain HTML into editable form controls
on-the-fly). This is pretty neat, but as a serial text-clicker, this
feature is downright infuriating.  I was happy to put this down as either a
little personality quirk of my own, or merely some indication that I may be
insane, but a quick straw poll of those nearby finds at least 3 other
people who have the same behaviour, or some variant (one guy says he clicks
on browser windows a lot as a muscle-memory thing to ensure the right
browser window has focus).

I'm trying to describe to the other team why this new feature sucks for
some people, but I have no idea if that "some people" is one in ten users,
or one in one million.  Have searched a bit online for information about
this, but I don't really know what to search for. Does this user behaviour
have a name? Are there other people like me out there (hello? hello?)? Any
literature around on whether or not its a great idea to bind functionality
to an innocuous user-action like text-selection or clicking in an
apparently non-clickable area?

Cheers!
Joe.


Re: About Validate Email

2012-04-11 Thread Joseph Clark
I'm no expert on this either, but I'm fairly certain that this business
requirement is simply not achievable.  Due to the way mail servers operate
on the Internet, there is no way for a sender to know if an intended
recipient address is valid.

An email may go through several mail exchanges before it arrives at the one
that will ultimately deliver to the user's inbox. At any point along the
way, the email may be rejected for any variety of reasons and this
rejection may occur asynchronously.


On Thu, Apr 12, 2012 at 4:32 PM, Muhammad Niaz Rana wrote:

> Dear Michael, i know the whole process believe me :)
> but this is business requirement that any person come on my Web App give
> email address & search criteria do booking and get off :)
>
> Behind the scene we will send Leeds to him & vendor(Taxi company), and
> then off course when he has done final booking confirmation email.
>
> So any idea for this scenario.?
>
>
> On Thu, Apr 12, 2012 at 11:19 AM, Michael Ridland wrote:
>
>> Muhammad
>>
>> Have you ever signed up to a website before? Maybe you should review a
>> few different website sign-up processes to get some ideas.
>>
>>
>>
>>
>>
>> On Thu, Apr 12, 2012 at 4:13 PM, Muhammad Niaz Rana 
>> wrote:
>>
>>> David, thanks for reply.
>>> But point is this is one of my business requirements, let me explain.
>>>
>>> I am working on Booking system( like on line Taxi booking),
>>> so how user will book, just will enter his email address and enter
>>> search criteria, we will put his information in out DB and will send him
>>> Leed(s) info on his address.
>>>
>>> Because right now we cant do execute the Sign up process, just come
>>> enter email, and search criteria and do booking and use the Taxi.:)
>>>
>>> Any idea will be appreciated.
>>>
>>> On Thu, Apr 12, 2012 at 10:58 AM, David Richards <
>>> ausdot...@davidsuniverse.com> wrote:
>>>
 Muhammad,

 If such a thing existed, it would be used by spammers.  That's why
 confirmation emails are sent with links that go back to your server.

 David

 "If we can hit that bullseye, the rest of the dominoes
  will fall like a house of cards... checkmate!"
  -Zapp Brannigan, Futurama



 On Thu, Apr 12, 2012 at 15:47, Muhammad Niaz Rana 
 wrote:
 > Hi All,
 > I have to write code to validate the email, not just regex to
 > validate on client side :)
 > I have to validate the email i.e. weather is exists or Bounce back
 with some
 > error information.
 > Is there any standard way to validate email address and its source
 code.?
 >
 >
 > Thanks in advance.:)
 >
 > --
 >
 > Regards,
 > Muhammad Niaz
 >

>>>
>>>
>>>
>>> --
>>>
>>> Regards,
>>> Muhammad Niaz
>>>
>>>
>>
>>
>> --
>>
>> *Michael Ridland | ThinkSmart Digital*
>> Managing Director
>> P. 0404 865 350
>> E. mich...@thinksmartdigital.com.au
>> W. www.thinksmartdigital.com.au
>> T. www.twitter.com/rid00z
>> L. au.linkedin.com/in/michaelridland
>>
>>
>>  
>>
>>
>
>
> --
>
> Regards,
> Muhammad Niaz
>
>


Re: The cost of putting small websites online

2012-04-01 Thread Joseph Clark
Bitbucket supports basic website hosting, too:
http://confluence.atlassian.com/display/BITBUCKET/Publishing+a+Website+on+bitbucket


On Mon, Apr 2, 2012 at 4:20 PM, David Burela  wrote:

> All the "production quality" issues are non-issues.
> The goal here is a website to support hobby projects. Trying to get the
> yearly costs down to support the hobby project is the #1 priority here.
>
> The best way I've been linked to so far is hosting a site on GitHub and
> using a mark down generator such as Jekyll. Then you just need the DNS
> entries
> https://github.com/aeoth/Wp7JekyllTemplates#readme
>
> -David Burela
>
>
> On 2 April 2012 16:12, Ken Schaefer  wrote:
>
>>  Godaddy has .com registration for about US$6/year, and free DNS
>>
>> ** **
>>
>> Agreed with David that this is probably a fraction of the cost.
>>
>> ** **
>>
>> Cheers
>>
>> Ken
>>
>> ** **
>>
>> *From:* ozdotnet-boun...@ozdotnet.com [mailto:
>> ozdotnet-boun...@ozdotnet.com] *On Behalf Of *David Burela
>> *Sent:* Monday, 2 April 2012 1:42 PM
>> *To:* ozDotNet
>> *Subject:* The cost of putting small websites online
>>
>> ** **
>>
>> Over the weekend I was considering "supporting websites". Websites that
>> support the promotion of your small applications (such as phone apps).***
>> *
>>
>> ** **
>>
>> Lets say I'm making phone applications, and I just want to throw a
>> website up to act as a landing page. Something I can direct new users to
>> which displays an About page, have an embedded video, etc.
>>
>> I tried doing some calculations for how much something like this would
>> cost, this is what I came up with
>>
>> ** **
>>
>> *AppHarbor / DNSimple* (https://dnsimple.com/pricing &
>> https://appharbor.com/pricing)
>>
>> *Domain registration* - $16 / year
>>
>> *DNS mapping* - $34 / year
>>
>> *Website hosting* - $0
>>
>> *Website hosting with DNS mapping* - $120 / year
>>
>> *Total $170* / year / application.
>>
>> ** **
>>
>> *Wordpress.com*
>>
>> Domain registration - $5 / year (wordpress upgrade)
>>
>> Domain mapping - $12 / year (wordpress upgrade)
>>
>> Removal of adverts - $36 / year
>>
>> Custom design - $30
>>
>> *Total $83 / year / application*
>>
>> ** **
>>
>> Both options are probably more than I'll make on most of my small apps.
>> And gets expensive when promoting multiple apps.
>>
>> I could try and get more bang for my buck and extend the site so that it
>> can also host some supporting webservices that my application can use.***
>> *
>>
>> ** **
>>
>> ** **
>>
>> Are my calculations correct? 
>>
>> Is there another way to go about this?
>>
>> How do you guys go about creating small landing pages like this?
>> ("Buying your own server" seems a very heavy handed way to go about it,
>> and I don't want to become a full time sys-admin looking after my own
>> server)
>>
>> ** **
>>
>> -David Burela
>>
>
>


Re: Playing nicely with ServicePointManager.ServerCertificateValidationCallback

2011-12-14 Thread Joseph Clark
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  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  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: Event Log

2011-12-08 Thread Joseph Clark
As far I can remember from the last time I looked at this stuff... writing
to the event log as a Joe user is fine - the problem is that creating the
"event source" for the log entries required administrative escalation.



On Fri, Dec 9, 2011 at 4:24 PM, Peter Maddin wrote:

> I am looking at maintaining an old vs2005 vb.net application.
>
> ** **
>
> This has been running on XP Pro workstations.
>
> From trawling through the code, I have found that it uses the event log
> for recording errors.
>
> ** **
>
> I have open and converted the solution into VS2010.
>
> I noticed that errors are being written to the application event log.
>
> ** **
>
> I suspect that on windows 7 (probably Vista as well) that a normal user
> may run into problems when trying to write to the application event log.**
> **
>
> ** **
>
> Is this likely to be a problem if the application is installed on windows
> 7 and run by a user with minimal rights and permissions?
>
> ** **
>
> *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**.*
>
>  
>
> ** **
>


Playing nicely with ServicePointManager.ServerCertificateValidationCallback

2011-12-05 Thread Joseph Clark
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: 32bit apps

2011-10-20 Thread Joseph Clark
Ok, how about this: write a new .NET app, compile it as x86 and then
reference the other app and manually invoke the Main() method on it? :-)



On Fri, Oct 21, 2011 at 5:05 PM, Stephen Price wrote:

> No the 32bit shell launched from within a 64bit shell didn't seem to
> work. I suggested running the 32bit shell from Start/Run but his shell
> environment took ages to get up and running and he didn't seem keen on
> that. (said it's the same thing anyway...)
> The assemblies are signed too so guess that rules out the other option.
>
> Thanks for the reply!
>
> On Fri, Oct 21, 2011 at 1:55 PM, Joseph Clark 
> wrote:
> > I recall this coming up on the list recently (like in the last 6 months?)
> >
> > You can try:
> >
> > * Using the CorFlags tool to change the executable headers, but this will
> > invalidate the assembly if it is signed.
> >
> > * Launch the app from a 32-bit console, which should only be able to
> spawn
> > 32-bit processes, I think... haven't tried this myself.
> >
> >
> > On Fri, Oct 21, 2011 at 4:51 PM, Stephen Price  >
> > wrote:
> >>
> >> If you have a .Net app compiled as AnyCPU and want to force it to run
> >> 32bit on a 64bit machine, is there a way to do that without a
> >> recompile?
> >>
> >> cheers,
> >> Stephen
> >
> >
>


Re: 32bit apps

2011-10-20 Thread Joseph Clark
I recall this coming up on the list recently (like in the last 6 months?)

You can try:

* Using the CorFlags
tool to
change the executable headers, but this will invalidate the assembly if it
is signed.

* Launch the app from a 32-bit console, which should only be able to spawn
32-bit processes, I think... haven't tried this myself.


On Fri, Oct 21, 2011 at 4:51 PM, Stephen Price wrote:

> If you have a .Net app compiled as AnyCPU and want to force it to run
> 32bit on a 64bit machine, is there a way to do that without a
> recompile?
>
> cheers,
> Stephen
>


Re: [OT] Job linux developer (with dotnet skills)

2011-10-20 Thread Joseph Clark
I think you'll find that every OS
sucks.
:-) 



On Fri, Oct 21, 2011 at 11:19 AM, Michael Ridland  wrote:

>
> Linux sucks.
>
>
> On Fri, Oct 21, 2011 at 11:00 AM, Michael Anderson <
> michaelanderson...@hotmail.com> wrote:
>
>>  Hi Anthony,
>>
>>
>> Thanks for your interest but I’m afraid that I don’t have any Linux
>> skills.
>>
>>
>> Thanks anyway,
>>
>>
>> Michael Anderson
>>
>>
>>
>> --
>> Date: Fri, 21 Oct 2011 10:43:19 +1100
>> Subject: [OT] Job linux developer (with dotnet skills)
>> From: ifum...@gmail.com
>> To: ozdotnet@ozdotnet.com
>>
>>
>> Looking for someone who can develop for linux environment(a must) but have
>> some skills with dotnet.
>>
>> If interested send me an email...thanks
>>
>> Anthony
>>
>
>
>
> --
>
> *Michael Ridland | ThinkSmart Digital*
> Managing Director
> P. 0404 865 350
> E. mich...@thinksmartdigital.com.au
> W. www.thinksmartdigital.com.au
> T. www.twitter.com/rid00z
> L. au.linkedin.com/in/michaelridland
>
>
>  
>
>


Re: Opening .MSI databases

2011-10-14 Thread Joseph Clark
Orca  is the "official" tool, but I
haven't used it in ages and I found it a bit painful.


On Fri, Oct 14, 2011 at 7:36 PM, Ian Thomas  wrote:

>  Bing! New 
> version,
> 2010. But I’d like to know of other tools available. 
>
> ** **
>  --
>
> **Ian Thomas**
> Victoria Park, Western Australia
>   --
>
> *From:* ozdotnet-boun...@ozdotnet.com [mailto:
> ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Ian Thomas
> *Sent:* Friday, October 14, 2011 4:33 PM
> *To:* ozdotnet@ozdotnet.com
> *Subject:* Opening .MSI databases
>
> ** **
>
> I need to open an .MSI data package (installable file) to extract just the
> .CHM (Help) file. Does anyone know a simple utility? 
>
> In the past, I used “Les Mis” – actually, *lessmsierables* written by
> Scott Willeke, but the last version he produced was 2005-11-10 and although
> it has C# source code, I suspect the package structure might have changed
> and I know (from trying it just now) it is not UAC-aware. I’d rather not
> change his code in an attempt to improve it, if there is something else. *
> ***
>
> (I don’t want to install WiX, either). 
>  --
>
> **Ian Thomas**
> Victoria Park, Western Australia
>


Re: first chance exception

2011-10-12 Thread Joseph Clark
Looks like you need to run it with escalated privileges on Vista/Win7 in
order for the settings to be configurable.


On Thu, Oct 13, 2011 at 2:42 PM, Ian Thomas  wrote:

>  Well, fuslogvw is a problem – Settings has logging disabled, and for the
> life of me I can’t enable anything (or find online how to do it). 
>
> I have VS2010, VS2008 installed and all’s fine. 
>  --
>
> **Ian Thomas**
> Victoria Park, Western Australia
>


Re: first chance exception

2011-10-12 Thread Joseph Clark
Try using the Assembly Binding log viewer
(fuslogvw)
to see where it is binding the serializer assemblies from (make sure it is
configured to log all binds to disk).

On Thu, Oct 13, 2011 at 1:54 PM, Ian Thomas  wrote:

>  Looked everywhere under my user account, for all DLLs. But even w/o
> locating it/them, should Debug show the first chance exceptions after I have
> done the generation? I would have thought the message would disappear. ***
> *
>
> ** **
>  --
>
> **Ian Thomas**
> Victoria Park, Western Australia
>   --
>
> *From:* ozdotnet-boun...@ozdotnet.com [mailto:
> ozdotnet-boun...@ozdotnet.com] *On Behalf Of *David Kean
> *Sent:* Thursday, October 13, 2011 8:46 AM
> *To:* ozDotNet
> *Subject:* RE: first chance exception
>
> ** **
>
> Where are you looking? I believe they generate them in the temp directories
> somewhere.
>
> ** **
>
> *From:* ozdotnet-boun...@ozdotnet.com [mailto:
> ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Ian Thomas
> *Sent:* Wednesday, October 12, 2011 5:18 PM
> *To:* 'ozDotNet'
> *Subject:* first chance exception
>
> ** **
>
> As I understand the documentation, Generate Serialization Assembly should
> produce a DLL (“Serialization assemblies are named *TypeName*
> .XmlSerializers.dll”). Is that right? I don’t see any DLLs, and I still
> receive the  The FileNotFoundException (which are first-chance handled
> exceptions) in debug. 
>
> I did explicitly set it On. 
>
> I know (from David Kean’s advice) these FileNotFoundExceptions are nothing
> to worry about, but I’d like to see reality match MSDN documentation. 
>  --
>
> **Ian Thomas**
> Victoria Park, Western Australia
>   --
>
> *From:* ozdotnet-boun...@ozdotnet.com [mailto:
> ozdotnet-boun...@ozdotnet.com] *On Behalf Of *David Kean
> *Sent:* Wednesday, October 12, 2011 2:12 PM
> *To:* ozDotNet
> *Subject:* RE: XMLSerializer error
>
> ** **
>
> The FileNotFoundException (which are first-chance handled exceptions and
> not unhandled) are expected – the XmlSerializer looks for a pre-compiled
> serialization assembly before it generates one on the fly.
>
> ** **
>
> You can pre-generate serialization assemblies via the Generate
> serialization assembly option on the Build tab of the Project properties.*
> ***
>
> ** **
>


Re: Window Management software

2011-09-07 Thread Joseph Clark
I've been using Ultramon for years for just one single feature - it extends
the Windows taskbar onto secondary monitors. Can't live without it, now.



On Wed, Sep 7, 2011 at 10:38 PM, Wallace Turner wrote:

> Does anyone use any window management software, free or otherwise, that
> they swear by ?
>
> I'm looking at Divvy right now...
>


Re: Good looking WinForms apps

2011-08-18 Thread Joseph Clark
Steering clear of the "whether or not choosing WinForms over WPF is a good
idea" debate, it's definitely possible to create some nice looking UI's in
WinForms.

The System.Drawing namespace gives you a fairly open licence to do whatever
the heck you want with the window.  Bob Powell has some excellent (a bit
dated, but still applicable) articles on some of the cool things you can do
with GDI+ in .NET (see http://www.bobpowell.net/faqmain.htm).

There are some things you "can't" do (or can't do *easily*), such as doing
matrix transformations or using pretty WPF fonts - but I guess these are the
kinds of things that usually aren't a problem for "line of business" apps.
It's also pretty easy to shoot yourself in the foot with memory leaks, and
it's easy to create performance problems by doing intensive painting or
calculation in the wrong places.

Joe.



On Thu, Aug 18, 2011 at 2:33 PM, Matt Siebert  wrote:

> Hi folks,
>
> Can anyone point out some particularly good looking WinForms apps?
>  Screenshots will do, a working app I could show someone would be better.
>
> This is a bit of a strange request so I should probably explain a little...
>
> We've built a product using WPF but we have lots of constraints imposed by
> the environment we're coding for.  This has caused a lot of extra work with
> more to come.  As such, I don't think WPF is the right choice and I'm trying
> to convince my manager that it's worth considering switching to WinForms
> which is much better suited to this environment.  He's not a developer and
> is fairly visually oriented, and he's worried that if we were to use
> WinForms then we may not be able to produce a good GUI / UX.  I've assured
> him that this isn't the case but some good examples would help.
>
> Cheers.
>


Re: 64 bit wcf service library

2011-06-08 Thread Joseph Clark
Failing that, you could try using Corflags to set the assembly to be 64-bit
compatible: http://msdn.microsoft.com/en-us/library/ms164699.aspx

This has a number of caveats though, most notably the fact that you won't be
able to do this if the 3rd party assembly is strong-named.


On Thu, Jun 9, 2011 at 3:01 PM, Peter Maddin wrote:

> Thanks
>
>
>
> I am referencing a third party logging assembly. I suspect that it is 32
> bit and that is my problem.
>
> I have asked the vendor if they can provide a 64 bit release.
>
>
>
> Regards Peter
>
>
>
> *From:* ozdotnet-boun...@ozdotnet.com [mailto:
> ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Stephen Liedig
> *Sent:* Thursday, 9 June 2011 12:28 PM
> *To:* ozDotNet
> *Subject:* Re: 64 bit wcf service library
>
>
>
> Hi Peter,
>
>
>
> Typically, any cpu will run apps on the platform onto which they are
> deployed, so that should be fine. does your service have another references
> (third party) which may not be installed on the server? If so make sure they
> are also installed or they are compatible with x64.
>
>
>
> HTH,
>
>
>
> Steve
>
> On 9 June 2011 11:15, Peter Maddin  wrote:
>
> I have written a fairly simple wcf service library.
>
>
>
> This will be hosted in a virtual instance of windows server 2008 r2,
> presumably running IIS 7.5 or better.
>
> The server will have 6 cores and 36 GB of memory.
>
> It will run 3 virtual web servers each will be bound to 2 cores and have
> 1/3 of the memory allocated.
>
>
>
> The system administrator has requested that the web service be 64 bit.
>
>
>
> The WCF service library is set with a Platform Target of ‘Any CPU.’
>
> If I set this to x64, did  clean and rebuild, it does this ok.
>
>
>
> The IIS web site chucks a fit however and gives me this error
>
>
>
> Error  2  Could not load file or assembly
> 'PathWestDirectServiceLibrary' or one of its dependencies. An attempt was
> made to load a program with an incorrect format.
>
>
>
> I removed the web site and created it anew and added my wcf service library
> but it still does not like an assembly that targets x64.
>
> If I change it back to AnyCPU its happy with the format.
>
> Looks like I am stuck with it being set to AnyCPU.
>
>
>
> I am developing on Windows 7 64 bit.
>
>
>
> Is what I am doing just not possible. Any reason why?
>
>
>
> *Regards Peter Maddin*
> *Applications Development Officer*
> *Path**West Laboratory Medicine WA*
> *Phone : +618 6396 4285
> Mobile: 0414 240 307*
> *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**.*
>
>
>
>
>
>
>


JetBrains enters the .NET decompilation business

2011-05-11 Thread Joseph Clark
For those who haven't seen it, looks like the RedGate debacle has given some
room for others to try and muscle in on the business. JetBrains (ReSharper,
et al.) have released a new decompiler product for C#:
http://www.jetbrains.com/decompiler/


Re: SSD minimum size question

2011-05-10 Thread Joseph Clark
The hibernate file apparently can’t be moved.

Not a direct answer to your question, but although you can't move
hiberfil.sys, you can remove it entirely if you don't use Windows Hibernate
(seehttp://www.hanselman.com/blog/GuideToFreeingUpDiskSpaceUnderWindowsVista.aspx
)




On Wed, May 11, 2011 at 3:36 PM, Ian Thomas  wrote:

>  A colleague recently bought a desktop built by a local computer shop, and
> was talked into a 60Gb SSD drive as his system boot – his intuition was to
> go for 120Gb.
>
> No problems until he tried to install the SP1 of Windows 7 Ultimate, when
> Microsoft assistance calls still couldn’t solve why it failed to install.
>
> It turns out his 60Gb drive is 55Gb only, and he had 47Gb used. So he moved
> all his special folders off to another drive, and I suggested he change the
> swap file to another drive too.
>
> The hibernate file apparently can’t be moved.
>
> Anyway, this just an interim strategy until he gets SP1 of Windows 7
> installed. Then I guess he can put the swap file onto the SSD to get
> performance back.
>
> It raises the question to me of what size system drive – SSD or other – is
> optimum (and how the hell do you decide on that)?
>  --
>
> Ian Thomas
> Victoria Park, Western Australia
>


Re: Unable to download Sharepoint Foundation from MSDN

2011-04-17 Thread Joseph Clark
Hi Dave,

I intermittently had the same problem in the past while downloading
SPFoundation, too.  I tried a few times over a 24 hour period and eventually
it worked, so perhaps there is a stale CDN node floating around somewhere.

I had a hunt around for alternative download sites but couldn't find any.

You could try hitting the download link from a tunnelled or anonymised
location, to see if you get served from a different node?

Joe.




On Thu, Apr 14, 2011 at 4:39 PM, David Burstin wrote:

> Hi all,
>
> I'm getting odd results when trying to download Sharepoint Foundation from
> MSDN - it just keeps downloading as 0kb. I initially thought it might be
> because I am using Chrome, so I tried from IE - same result - download
> completes in about 2 seconds and gives me a file called
> SharepointFoundation.exe that is zero bytes in size.
>
> Any suggestions? Alternate MSDN download sites (do they exist)?
>
> Cheers
> Dave
>


Re: [OT] Virtual machine alternatives

2011-04-06 Thread Joseph Clark
+1 VirtualBox.


On Thu, Apr 7, 2011 at 3:15 PM, Adrian Halid
wrote:

> Virtual Box is also another free alternative.
>
>
>
> http://www.virtualbox.org/
>
>
>
> * *
>
> *Regards*
>
> * *
>
> *Adrian Halid*
> *Senior Analyst/Programmer*
>
>
>
> *IT Vision Australia Pty Ltd* (ABN: 34 309 336 904)
> PO Box 881, Canning Bridge WA 6153
> Level 3, Kirin Centre, 15 Ogilvie Road, Applecross, WA, 6153
> P:  (08) 9315 7000  F:  (08) 9315 7088
> E:  adrian.ha...@itvision.com.auW: http://www.itvision.com.au
>
>
>
> ___
>
>
>
> NOTICE : This e-mail and any attachments are intended for the addressee(s)
> only and may
> contain confidential or privileged material. Any unauthorised review, use,
> alteration,
> disclosure or distribution of this e-mail (including any attachments) by an
> unintended recipient
> is prohibited. If you are not the intended recipient please contact the
> sender as soon as
> possible by return e-mail and then delete both messages.
> ___
>
>
>
> *From:* ozdotnet-boun...@ozdotnet.com [mailto:
> ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Chris Walsh
> *Sent:* Thursday, 7 April 2011 1:05 PM
> *To:* ozDotNet
> *Subject:* RE: [OT] Virtual machine alternatives
>
>
>
> Why not use the XP 
> Modefunctionality 
> in Win7?
>
>
>
> *From:* ozdotnet-boun...@ozdotnet.com [mailto:
> ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Greg Keogh
> *Sent:* Thursday, 7 April 2011 3:03 PM
> *To:* 'ozDotNet'
> *Subject:* [OT] Virtual machine alternatives
>
>
>
> Folks, I’m just building a new machine for my wife. She needs Win7 as the
> boot OS and XP virtualised. I was wondering what choices I have for
> virtualising and avoiding problems with mouse jitter and video performance
> in the virtual OS.
>
>
>
> I ask because early last year I had to drop VMWare Server because of mouse,
> sound and video performance problems with XP. I moved to WMWare Player and
> the sound and video problems seem to be solved.
>
>
>
> Microsoft VM is also a contender I suppose, but I haven’t used it for a
> couple of years.
>
>
>
> What’s the latest recommendation for a home user machine with Win7 and
> virtual XP?
>
>
>
> Greg
>


Re: Obtaining support hotfixes from Microsoft

2011-03-20 Thread Joseph Clark
Thanks, Chris.  Looks like it's done the trick, too!

@DavidBurstin: Thanks ;-) I did see that blurb, but it seemed
counter-intuitive to me to publicly post details of a bug and fix, but then
make people go through the support system to get their hands on the fix
anyway.  I wanted to make sure that I wasn't missing something glaringly
obvious on the page.

ozdotnet saves the day, yet again.

Joe.



On Mon, Mar 21, 2011 at 2:20 PM, Chris Walsh  wrote:

> Here it is.
>
>
>
> http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=971521&kbln=en-us
>
>
>
>
>
> *From:* ozdotnet-boun...@ozdotnet.com [mailto:
> ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Joseph Clark
> *Sent:* Monday, 21 March 2011 2:18 PM
> *To:* ozDotNet
> *Subject:* Obtaining support hotfixes from Microsoft
>
>
>
> Hi List,
>
> I've recently run into some deployment problems on a local SharePoint
> server.  A bit of digging reveals a KB article (
> http://support.microsoft.com/kb/971521/) as a likely culprit.  The article
> says there is a hotfix download available, but either I am blind, the hotfix
> is not available for public download, or I have to contact Microsoft to
> obtain the patch?
>
> What's the correct procedure here?
>
> Thanks,
> Joe.
>


Obtaining support hotfixes from Microsoft

2011-03-20 Thread Joseph Clark
Hi List,

I've recently run into some deployment problems on a local SharePoint
server.  A bit of digging reveals a KB article (
http://support.microsoft.com/kb/971521/) as a likely culprit.  The article
says there is a hotfix download available, but either I am blind, the hotfix
is not available for public download, or I have to contact Microsoft to
obtain the patch?

What's the correct procedure here?

Thanks,
Joe.


Re: Debugging webservice with a nullable int32

2011-01-30 Thread Joseph Clark
Hi Anthony,

I don't if this is normal or not, but as a general rule I think it's a good
idea to try and avoid using complex types in web services.  :-)

Joe.



On Fri, Jan 28, 2011 at 11:56 AM, Anthony  wrote:

> I have  weird issue..i have a webservice with some parameters of type
> string, nullable(of int32), Boolean.
>
>
>
> I have not being able to step into the webservice from my winforms
> application until i made the nullable(of int32) to type integeris this
> normal behaviour?
>
>
>
>
>
> Using vs 2010,dotnet 3.5
>
>
>
> regards
>
> Anthony (*12QWERNB*)
>
>
>
>
>


Re: [OT] Ticketing System

2011-01-23 Thread Joseph Clark
If a Java app doesn't scare you off, have a look at
JIRA.


disclaimer: I work for Atlassian. :-)


On Mon, Jan 24, 2011 at 5:11 PM, Hemal Modi  wrote:

> Hi,
>
> I am currently looking for a good ticketing system for IT helpdesk support.
> Is there something you are impressed with which is cost-effective as well
> easy to manage?
>
> Thanks,
> Hemal
>


Re: .NET friendly cloud-compute recommendations

2010-12-13 Thread Joseph Clark
No, I don't think you're missing anything. I've probably just been soured by
word-of-mouth from people who think Windows isn't worth the magnetic
platters its stored on.

I'll check out the docs and see how I go. :-)

Thanks

On Mon, Dec 13, 2010 at 10:42 AM, silky  wrote:

> On Mon, Dec 13, 2010 at 10:31 AM, Joseph Clark 
> wrote:
> > Howdy all,
> >
> > Does anyone have any experience with Windows/.NET friendly
> cloud-computing
> > solutions, specifically for the purpose of farming out compilation and
> test
> > agents?
> >
> > Internally we've semi-standardised on EC2 for all our java-based builds,
> but
> > from the literature I've read on the tubes, setting up a Windows image
> > doesn't sound like very much fun.
>
> I found it exceptionally trivial; I'm sure you won't have any problem.
> I mean, there's nothing to it really. Choose a Windows server, install
> things, image it? Or am I missing something?
>
>
> > I had a brief skim-read on the Azure platform, but it looks like it
> doesn't
> > provide any bare-bones infrastructure like msbuild.
> >
> > Are there any other alternatives?
> >
> > Cheers,
> > Joe.
>
> --
> silky
>
> http://dnoondt.wordpress.com/
>
> "Every morning when I wake up, I experience an exquisite joy — the joy
> of being this signature."
>


.NET friendly cloud-compute recommendations

2010-12-12 Thread Joseph Clark
Howdy all,

Does anyone have any experience with Windows/.NET friendly cloud-computing
solutions, specifically for the purpose of farming out compilation and test
agents?

Internally we've semi-standardised on EC2 for all our java-based builds, but
from the literature I've read on the tubes, setting up a Windows image
doesn't sound like very much fun.

I had a brief skim-read on the Azure platform, but it looks like it doesn't
provide any bare-bones infrastructure like msbuild.

Are there any other alternatives?

Cheers,
Joe.


Re: OPen File not working...

2010-11-15 Thread Joseph Clark
Definitely sounds like it could be an encoding problem.  You could try
replacing this function of yours with
System.IO.File.ReadAllText,
which should attempt to automatically detect the file encoding for you.

Alternatively, open the file in a decent text editor (like Notepad++), which
will be able to tell you the encoding of the file.

Also, have you checked if an exception is being thrown? I notice you are
catching it and printing it to trace output. Any leads there?

Joe.




On Mon, Nov 15, 2010 at 10:32 PM, Jano Petras  wrote:

> Hi Anthony,
>
> It seems related to encoding mark (see
> http://en.wikipedia.org/wiki/Byte_order_mark).
>
> Just throwing few ideas into the air here as haven't really tried this
> myself - but maybe you could try using StreamReader constructor overload
> that accepts encoding so you could pass Encoding.Unicode to see if it solves
> the issue.  If not, reading the file as stream of bytes and then use the
> Encoding converter to convert it to string or strip off the byte order mark
> at the beginning and convert then?
>
> There is a similar topic discussed here
> http://stackoverflow.com/questions/1835430/byte-order-mark-screws-up-file-reading-in-javabut
>  uses Java to explain the issue and resolution.
>
>
> Cheers,
> jano
>
>
>
>
> On 15 November 2010 10:10, Anthony  wrote:
>
>>  I have been using this function for years with no problem..now when i
>> try to open a file(contains XML)..it returns an empty string even though it
>> has text.  I have noticed that the XML  fie has some null charcaters at
>> the begining..any suggestion?
>>
>> Public Shared Function GetFileContents(ByVal FullPath As String) As
>> String
>>
>>Dim stream As FileStream = Nothing
>>
>>Dim strContents As String = String.Empty
>>
>> Try
>>
>> stream = File.Open(FullPath, FileMode.Open, FileAccess.Read)
>>
>> Dim Tin As System.IO.StreamReader = 
>> NewSystem.IO.StreamReader(stream)
>>
>> strContents = Tin.ReadToEnd()
>>
>> Tin.Close()
>>
>> stream.Close()
>>
>> Return strContents
>>
>> Catch ex As Exception
>>
>> Trace.WriteLine(ex.Message)
>>
>> Return ""
>>
>> Finally
>>
>> If Not stream Is Nothing Then
>>
>> stream.Close()
>>
>> End If
>>
>> End Try
>>
>> End Function
>>
>>  *Is your website being 
>> IntelliXperienced?*
>> | www.yougoingmyway.com ?
>> regards
>> Anthony (*12QWERNB*)
>>
>> Is your website being IntelliXperienced?
>>
>>
>>
>>
>


Re: Recommendations for a ERP system

2010-10-21 Thread Joseph Clark
Hey Andrew,

Shameless plug, but I used to work for Technology
Onein Brisbane.  They're a
home-grown ERP vendor who've been quite successful
in competing locally against the Oracles and SAPs of the world. I know they
have Financials, Payroll & Supply Chain modules in their suite.

I have no first-hand experience in interacting with the products as an
un-biased end-user or customer, but the technology platform is quite sound
and modern by comparison to other ERP suites (.NET WinForms client +
ASP.NETWeb Services).

If you're interested, I should be able to put you in touch with someone in
(pre-)sales.

Cheers,
Joe.


On Fri, Oct 22, 2010 at 10:13 AM, Andrew Tobin  wrote:

> Hey all,
>
> We're currently looking at changing our Warehousing/Inventory/Financials
> package and I was just wondering if anyone had some experience with a good
> product they would recommend?
>
> We're looking at something that is current technology, would be not
> impossible to interface with, and has a local support presence.
>
> Anyone come across a good package they're happy to recommend to others?
>
> Andrew
>


Re: Mixing development software versions

2010-08-03 Thread Joseph Clark
I've had no problems mixing different versions of Visual Studio (2008 &
2010) and the .NET Framework (2, 3 & 4) on the one machine.  Can't vouch for
Silverlight though/

HTH,
Joe.


On Wed, Aug 4, 2010 at 9:20 AM, Greg Keogh  wrote:

>  Folks, I’m preparing for the big migration of all of my projects to
> VS2010, Framework 4 and Silverlight 4. I built a Win7 in WMWare with the
> latest software development installed so I could rebuild and test everything
> in parallel with my real work. Unfortunately, problems with the mouse and
> stalls in VM are ruining my plans.
>
>
>
> Win7 has a terribly “jittery” mouse in the VM which requires the VMWare
> drivers be installed to correct the problem. However, the installation of
> these drivers causes the VM to freeze dead randomly every 5-10 minutes. It
> seems to freeze when I am manipulating opening and closing tree control
> nodes in Windows Explorer and the VS2010 solution pane. I spent hours
> researching this problem and found that if I only install the mouse and
> video drivers then the problem only happens every 20-30 minutes. This is
> still unacceptable.
>
>
>
> I continue to search for a way of making the Win7 VM stable, but no luck so
> far. This isn’t a .NET related problem, but I’d love to hear from anyone
> else who has suffered from this problem and solved it.
>
>
>
> My other option is to not us a VM and install VS2010, Framework 4 and
> Silverlight 4 and all of the supporting kits on my work machine alongside
> their previous versions. Cramming everything together gives me a creepy
> feeling. Before I consider doing this, I just wanted to ask if this is
> acceptable in theory and in practise. Has anyone got everything installed
> side-by-side and can report success or side effects.  I don’t want to
> destroy the machine I use to make a living.
>
>
>
> Greg
>


Re: Retrieve parameters

2010-08-01 Thread Joseph Clark
Anthony,

You can use the
TargetSiteproperty
on the Exception class to access information about the method that
caused the exception to be thrown... this causes a walk of the call stack,
which has a performance overhead and also may not succeed in all cases,
depending on the situation.

Cheers,
Joe.





On Fri, Jul 30, 2010 at 9:48 PM, Anthony  wrote:

>  Sorry Exception Handling Application 
> Blockfrom
>  Microsoft
>
>
>
> I have already done what you have mentioned but would be nice to retrieve
> the parameters of a function.  I know i can manually code this for each
> function..but would be nice to use some sort of reflection to automate
> this..
>
>
>
> *From:* ozdotnet-boun...@ozdotnet.com [mailto:
> ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Glen Harvy
> *Sent:* Friday, 30 July 2010 5:47 PM
> *To:* ozDotNet
> *Subject:* Re: Retrieve parameters
>
>
>
> Trap the error and any required data in a tcf and then upload the data to a
> website for you to process etc.
>
> Trap unhandled exceptions with
> Application.ThreadException += OnThreadException;
> and do the same.
>
> What's an Exception Block?
>
> On 30/07/2010 3:08 PM, Anthony wrote:
>
> Adding some debugging cod to my winforms application.
>
>
>
> When an exception is raised..i want the application to send me the error
> with the parameters passed?  Can i use reflection to do this? Or is there a
> better way?
>
>
>
> Do people use the Exception Block by MS or roll their own?
>
>
>
>
>
> Is your website being 
> IntelliXperienced?
> | www.yougoingmyway.com ?
> regards
> Anthony (*12QWERNB*)
>
> Is your website being IntelliXperienced?
>
>
>
>
>
>
>


Re: Is it me..or is IIS 7 manager a crap interface?

2010-07-08 Thread Joseph Clark
I found it very confusing after first swapping to it from IIS 6.  Having had
time to adjust, I think it's a pretty good representation of a complex
system.  It's certainly easier to find the settings that were quite
esoteric/hidden away in previous managers.

The one thing I don't like is the swapping between site content/site
features via tabs in the main panel... my brain just doesn't grok it.
Personal preference though, I'm sure!




On Fri, Jul 9, 2010 at 3:30 PM, Anthony  wrote:

>  Intuitive spring to mind!
>
>
>
> Is your website being 
> IntelliXperienced?
> regards
> Anthony (*12QWERNB*)
>
> Is your website being IntelliXperienced?
>
>
>
>
>


Re: Get main form instance from usercontrol

2010-06-23 Thread Joseph Clark
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.findform.aspxshould
work?



On Thu, Jun 24, 2010 at 10:25 AM, Anthony  wrote:

>  What method do i need to use to the get the main instance  of a form from
> a usercontrol?
>
>
>
> The main form is of type FormMain but how do i access the instance from a
> usercontrol?  If i use me.parent..this would only give the instance of the
> container object. Using vb.net winforms
>
>
>
> Is your website being 
> IntelliXperienced?
> regards
> Anthony (*12QWERNB*)
>
> Is your website being IntelliXperienced?
>
>
>
>
>


Re: Method Invoke problem

2010-06-18 Thread Joseph Clark
The object[] objs array is indicating that the method expects three
parameters, rather than a single parameter which is an array.

You need an array that contains one array :)

object[] objs = new object[] { new object[] {"Hi", 123, DateTime.Now}};



PS. Who feeds the magpies?! My dad shoots them :P



On Fri, Jun 18, 2010 at 5:01 PM, Greg Keogh  wrote:

>  Folks, the following skeleton code dies on the Invoke with a
> TargetParameterCountException. The code is all in the same class.
>
>
>
> MethodInfo mi = this.GetType().GetMethod("TestMethod", BindingFlags
> .Instance|BindingFlags.NonPublic);
>
> object[] objs = new object[] { "Hi", 123, DateTime.Now };
>
> mi.Invoke(this, objs);
>
>
>
> protected void TestMethod(object[] args)
>
> {
>
> }
>
>
>
> I’m stumped, so I’m going to feed the magpies and when I come back I’ll
> either have the answer or some other genius will tell me ;-)
>
>
>
> Greg
>


Re: Implement IDisposable?

2010-06-14 Thread Joseph Clark
Good point, Michael.  I didn't consider the implications of messing with
other objects in the finalizer.  :)



On Tue, Jun 15, 2010 at 4:28 PM, Michael Minutillo <
michael.minuti...@gmail.com> wrote:

> The "Disposable Pattern" gets discussed a lot but I'm pretty sure you only
> need it when you are holding onto unmanaged resources. From a Finalizer you
> aren't supposed to mess with other objects, I presume this includes objects
> that the framework uses to wrap unmanaged resources for you.
>
> i.e. If you keep a FileStream object then you should dispose of it in your
> Dispose method. If you get to your own finalizer you should not touch the
> FileStream, it has its own finalizer to ensure it gets closed properly. That
> means you don't even need a finalizer. You almost never need a finalizer.
> You pretty much never need to implement the full disposable pattern.
>
> At least, that's how I understand it. If you are holding onto com objects
> directly then it might be a different story but for Files and SqlConnections
> and so on it shouldn't be required.
>
>
> On Tue, Jun 15, 2010 at 2:02 PM, Joseph Clark wrote:
>
>> I'm no expert, but I understand there is a "proper" way to implement
>> IDisposable to ensure that things always get cleaned up properly.
>>
>> Implementing IDisposable allows you to cleanly release your resources as
>> soon as practical, but relies on the consumer to call the Dispose method
>> properly.  So, to get around this, you can also define a Finalizer for your
>> class that performs your cleanup, in the event that IDisposable is not
>> called.
>>
>> The problem is that Finalizers have a bunch of caveats attached to them
>> (related to performance and memory consumption) and thus shouldn't be
>> defined unless you really, really need them.
>>
>> So, the trick is to call GC.SuppressFinalize in your Dispose method, which
>> stops the Finalizer from running needlessly (I don't know about C#, but if
>> you implement IDisposable in VB.NET, the IDE automatically injects a
>> correct implementation of this pattern for you).
>>
>> I did a quick Google search and found a codeproject article which looks
>> accurate enough and covers it in more detail:
>> http://www.codeproject.com/KB/cs/idisposable.aspx
>>
>> Hope this helps.  My knowledge of finalizers is only theory-based.
>>
>> Joe.
>>
>>
>>
>>
>> On Tue, Jun 15, 2010 at 3:34 PM, Bec Carter wrote:
>>
>>> Hi!
>>>
>>> I have a class which uses temporary files to do its stuff. What do you
>>> recommend for ensuring things get cleaned up when things go bad?
>>> IDisposable? Or perhaps a big try/finally inside the class functions?
>>>
>>> Cheers  --Bec--
>>>
>>
>>
>
>
> --
> Michael M. Minutillo
> Indiscriminate Information Sponge
> Blog: http://wolfbyte-net.blogspot.com
>


Re: Implement IDisposable?

2010-06-14 Thread Joseph Clark
I'm no expert, but I understand there is a "proper" way to implement
IDisposable to ensure that things always get cleaned up properly.

Implementing IDisposable allows you to cleanly release your resources as
soon as practical, but relies on the consumer to call the Dispose method
properly.  So, to get around this, you can also define a Finalizer for your
class that performs your cleanup, in the event that IDisposable is not
called.

The problem is that Finalizers have a bunch of caveats attached to them
(related to performance and memory consumption) and thus shouldn't be
defined unless you really, really need them.

So, the trick is to call GC.SuppressFinalize in your Dispose method, which
stops the Finalizer from running needlessly (I don't know about C#, but if
you implement IDisposable in VB.NET, the IDE automatically injects a correct
implementation of this pattern for you).

I did a quick Google search and found a codeproject article which looks
accurate enough and covers it in more detail:
http://www.codeproject.com/KB/cs/idisposable.aspx

Hope this helps.  My knowledge of finalizers is only theory-based.

Joe.




On Tue, Jun 15, 2010 at 3:34 PM, Bec Carter  wrote:

> Hi!
>
> I have a class which uses temporary files to do its stuff. What do you
> recommend for ensuring things get cleaned up when things go bad?
> IDisposable? Or perhaps a big try/finally inside the class functions?
>
> Cheers  --Bec--
>


Re: [OT] Does anyone know of any SharePoint developers looking for work in Adelaide?

2010-06-10 Thread Joseph Clark
I think that as a "general skill" for a .NET developer, familiarity with
SharePoint isn't particularly important.

Developing with SharePoint has a long, moderately-steep learning curve and
in my experience, what you learn isn't particularly transferable to other
areas; it's only useful when you're actually working with SharePoint.  I'm
about 9 months into my first role as a SharePoint dev and I still feel like
I'm barely scratching the surface of what I can "do" with SharePoint.

I haven't used Visual Studio 2010's SharePoint integration yet (because I'm
still stuck supporting MOSS and VS2008), but some of the online demos look
pretty cool.  It reminds me of the stage when ASP.NET development in Visual
Studio was starting to improve with the built-in web server etc. in
VS2005... ie. when they actually started seriously looking at improving the
development experience.




On Fri, Jun 11, 2010 at 10:47 AM, Arjang Assadi wrote:

> On 11 June 2010 09:43, David Connors  wrote:
> > There is another list called OZMOSS for this sort of stuff (asking for
> devs
> > that is, not sledging Sharepoint :)
>
> So this must be the list for sledging Sharepoint! :)
> On that note, does share point matter?  ( i.e. from a .Net developer
> point of view ).
>
> In VS2010 there are options for sharpoint dataSources, anyone uses
> that or knows what it is about?
>
> Kind Regards
>
> Arjang
>


Re: [OT] Does anyone know of any SharePoint developers looking for work in Adelaide?

2010-06-10 Thread Joseph Clark
No, unfortunately SharePoint development is a kind of masochism :P


On Fri, Jun 11, 2010 at 9:35 AM, DotNet Dude  wrote:

> Sharepoint "devs"?  I thought they just click here and click there... :p
>
> On Thu, Jun 10, 2010 at 3:04 PM, James Chapman-Smith
>  wrote:
> > Hi folks,
> >
> >
> >
> > Does anyone know of any SharePoint developers looking for work in
> Adelaide?
> >
> >
> >
> > Cheers.
> >
> >
> >
> > James.
>


Re: Friday [OT] (Sound Experts) Request for Sound Clening

2010-05-27 Thread Joseph Clark
I use Audacity  for all my sound editing
(and when I say "all" I mean "the handful of times I have wanted to crop a
segment of a song to use a ringtone" :P).  I'm pretty sure it has a noise
removal function built-in.

I don't think it understands video file formats though, so you'd probably
need some other tool that's capable of extracting the audio stream from the
file.



On Fri, May 28, 2010 at 12:00 PM, silky  wrote:

> On Fri, May 28, 2010 at 11:46 AM, Arjang Assadi 
> wrote:
> >
> > I am trying to filter out the horrible humming noise in the video and
> still hear the people talking,
> > I use GOM, VLC, WMP for players, but what was looking for a way to clean
> up the video not only for me but also for others as well.
> >
> > So I guess no DJ's or sound mixers on this mailing list :)
>
> I really doubt you're looking at actually doing this yourself (I mean
> writing a program to do it) but I think it's done using something like
> Fourier Transforms:
>
> http://en.wikipedia.org/wiki/Fourier_transform
>
> Images:
> http://idlastro.gsfc.nasa.gov/idl_html_help/Removing_Noise.html
> http://www.dspguide.com/ch15/2.htm
>
> Other:
> http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.23.5896
>
>
> > Regards
> >
> > Arjang
>
> --
> silky
>
>  http://www.programmingbranch.com/
>


Re: How to declare a class refrence as an argument type?

2010-04-29 Thread Joseph Clark
Use System.Type :-)


On Fri, Apr 30, 2010 at 9:45 AM, Arjang Assadi wrote:

> I need to have method with a a signature looking like this
>
> RegisterForm( typeof(Form) formType)
>
> where the forn type is actually a class refrence ( Delphi parlance,
> what are class refrences are called in C#?).
>
> so I would be able to call it like this :
>
> RegiterForm( typeOf(Form1) );
>
> Any further references sugeestions links?
>
> Thank you
>
> Regards
>
> if [OT] is short for [Off Topic], what is the short for [On Topic] ?  :)
>


Re: Web service call problem - The HTTP request is unauthorized with client authentication scheme 'Negotiate'

2010-04-27 Thread Joseph Clark
Dylan,

If Fiddler isn't working for you, try TCPTrace (
http://www.pocketsoap.com/tcptrace/).  It acts a man-in-the-middle for TCP
traffic, so you don't run in to the proxy problems inherent with the Fiddler
approach.

Joe.


On Wed, Apr 28, 2010 at 8:31 AM, Dylan Tusler <
dylan.tus...@sunshinecoast.qld.gov.au> wrote:

>  > you may have to ensure the service principal name is properly
> associated with that account (SETSPN is the tool to do this).
>
>
>
> That's a bit opaque to me.
>
> The setspn tool is for server principal account isn't it? I don't see what
> that has to do with service accounts. Our service accout is a domain
> account, and the server permissions are full control to everyone (until we
> sort  this out.)
>
> We've been trying to capture some trace with fiddler, but no luck at all.
> Despite being a web service call, the call doesn't route through the fiddler
> proxy, it seems.
>
> Agh!,
>
> Dylan.
>
>
>
>
>  --
> *From:* ozdotnet-boun...@ozdotnet.com [mailto:
> ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Paul Glavich
> *Sent:* Saturday, 24 April 2010 3:13 PM
> *To:* 'ozDotNet'
> *Subject:* RE: Web service call problem - The HTTP request is unauthorized
> with client authentication scheme 'Negotiate'
>
>  What security settings are you using? It looks like its trying to
> authenticate using Windows Authentication and failing (specifically using
> Kerberos). I would suspect the service account used to make the call to the
> server is not properly setup to do so and you may have to ensure the service
> principal name is properly associated with that account (SETSPN is the tool
> to do this).
>
>
>
> -  Glav
>
>
>
> *From:* ozdotnet-boun...@ozdotnet.com [mailto:
> ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Dylan Tusler
> *Sent:* Thursday, 22 April 2010 4:54 PM
> *To:* 'ozdotnet@ozdotnet.com'
> *Subject:* Web service call problem - The HTTP request is unauthorized
> with client authentication scheme 'Negotiate'
>
>
>
> We're getting authentication issues with a web service call, and have spent
> a couple of days struggling to get it to work.
>
>
>
> We have a C# class that invokes the service as part of a BizTalk process.
> The code that makes the call runs under the context of a service account
> and looks like this:
>
> try
> {
> TasksSoapClient client = new TasksSoapClient(bindingName,
> endpointAddress);
> string documentId = client.AddDoc(dclass, metaData,
> mimeType, rName, folder, contents);
> return documentId;
> }
> catch (Exception ex)
> {
> throw new Exception(String.Format("Error calling interface
> at '{0}' with binding '{1}' for method '{2}' with Retrieval Name = '{3}':
> {4}",
> endpointAddress,
> bindingName, "AddDocumentToFolder", retrievalName, ex.Message), ex);
> }
>
>
>
> The error that we are getting is
>
> *Error calling FileNet interface at '[our web service address]' with
> binding 'TasksSoap12' for method 'AddDocumentToFolder' with Retrieval Name
> = 'rc10120.xml': The HTTP request is unauthorized with client authentication
> scheme 'Negotiate'. The authentication header received from the server was
> 'Negotiate,NTLM'.*
>
>
>
> The BizTalk class has a config file that specifies the binding for
> TasksSoap12 like this (which was generated using svcutil.exe):
>
>   
> 
>  messageVersion="Soap12" writeEncoding="utf-8">
>  maxArrayLength="16384"
> maxBytesPerRead="4096" maxNameTableCharCount="16384" />
>   
>maxBufferPoolSize="524288"
>   maxReceivedMessageSize="65536" allowCookies="false"
> authenticationScheme="Negotiate"
>   bypassProxyOnLocal="false"
> hostNameComparisonMode="StrongWildcard"
>   keepAliveEnabled="true" maxBufferSize="65536"
> proxyAuthenticationScheme="Negotiate"
>   realm="" transferMode="Buffered"
> unsafeConnectionNtlmAuthentication="false"
>   useDefaultWebProxy="true" />
> 
>   
>
> Can anyone give me some pointers as to what we could try out here?
>
>
>
> Ideally we'd like to specify a login name and password for the web service
> to execute under, or let it run under our service account. I've tried
> messing with client.ClientCredentials.UserName.UserName and Password, but
> the results are the same. I guess the first step is to get rid of the above
> error message, but I guess I don't really understand the error message, and
> Dr Google (who has been extensively consulted) hasn't been much help either.
>
>
>
> We are not in a position to change the IIS settings on the web service
> side, but otherwise we can do quite a bit.
>
> Dylan Tusler
> Acting Development & Integration Manager
> Information and Communications Services Branch
> Sunshine Coast Regional Council

Re: FxCop custom dictionaries

2010-04-22 Thread Joseph Clark
Here's an interesting blog
articleabout
how Microsoft applies the FxCop rules to some of their own internal
projects.

I read it a few years ago now, so not sure how current it still is, but it
might give you a push in the right direction as to deciding which rules are
useful and which rules are just too painful.

Joe.



On Fri, Apr 23, 2010 at 8:49 AM, Greg Keogh  wrote:

>  Searches on this subject are completely confusing. I cannot yet find a
> definitive and clear description of how to create FxCop custom dictionary
> files.
>
>
>
> My solution has dozens of project files, grouped by subsystem of the app. I
> have an FxCop file for each subsystem and I want a custom dictionary for
> each one. Can someone point me to clear instructions on this matter?
>
>
>
> NOTE -- I’m returning to using FxCop in anger over the last week. After not
> using it for over a year, I can tell you that it’s cruel and unforgiving and
> points out how undisciplined you can be. Old habits like catch 
> (Exception)returned and I had stale code, methods that could be static, 
> incompletely
> implemented serializable classes and sloppy naming. David K will be pleased
> to know that it did in fact find my “bug” from last week where I forgot to
> SuppressFinalize in some classes. I highly recommend that anyone starting
> new projects should run FxCop as a part of their development process, it
> stops bad coding habits, teaches you some tricks and enforces standards.
>
>
>
> Some of the FxCop rules are really painful and repetitive and solving them
> risks making your code more dense unless you jump through small hoops. I
> plan to ask about them over the coming weeks and see how other people deal
> with them.
>
>
>
> Thanks
>
> Greg
>


Re: [OT - Java]

2010-03-10 Thread Joseph Clark

We're hiring in Sydney! http://www.atlassian.com/32/

Atlassian's a big Java shop.  I think I am one of about 2 or 3 .NET 
developers in the entire engineering division :)


I wish they'd hire more .NET people it gets so lonely

Tom Rutter wrote:

G'day,
I know some of the people on this list used to hang in the Java world. 
Can they please send the names of some places they know in Melbourne, 
Sydney or Canberra that do Java and may be hiring? A mate who has 
recently come down from overseas is looking.

Cheers
Tom

--

Register now for Atlassian Summit 2010, June 9-11 http://summit.atlassian.com

Joseph Clark
.NET Developer

Atlassian
+61 422 812 044 mobile
173-185 Sussex St.
Sydney, NSW
Australia