Re: SMS messages looking for a good gateway

2021-05-24 Thread Jamie Surman
 Any particular reason you don't use HttpClient for the request? I thought that 
was the direction MS was pushing people in these days.
On Sunday, 23 May 2021, 03:38:56 am GMT+1, Greg Harris 
 wrote:  
 
 Click Send just worked - Happy - Thanks for your help on this :-)
    private String SendSmsMessage_ClickSend( String aTargetPhoneNumber, String 
aMsg )
    {
      String lBaseUrl         = "https://api-mapper.clicksend.com/http/v2;;
      String lApiKey          = "";
      String lUsername        = "";
      String lTarget          = aTargetPhoneNumber.Trim().StartsWith("04") ? 
$"+614{aTargetPhoneNumber[2..]}" : aTargetPhoneNumber;
      String lMsg             = aMsg.Replace( " ", "%20" );
      String lRequestStr      = 
$"{lBaseUrl}/send.php?method=http={lUsername}={lApiKey}={lTarget}={lMsg}";
 
      // 
https://api-mapper.clicksend.com/http/v2/send.php?method=http===,,=

      WebRequest  lRequest    = WebRequest.Create( lRequestStr );
      WebResponse lResponse   = lRequest.GetResponse();
      String      lResult     = 
$"{((HttpWebResponse)lResponse).StatusDescription}";
      lResponse.Close();
      return lResult;
    }

On Sun, May 23, 2021 at 9:06 AM Greg Keogh  wrote:

We've been using MessageNet for 15 years, still using their SOAP service (nice 
of them to keep it going!) No dependencies at all -- Greg K
  

Re: Core 3.0 and C# 8

2019-09-27 Thread Jamie Surman
 I think when I did this I had to manually edit the proj file like so:
   netcoreapp3.0

Then you see it in the target framework list
On Friday, 27 September 2019, 05:18:29 am GMT+1, Greg Keogh 
 wrote:  
 
 Folks,
I'm keen to experiment with C# 8 features and get familiar early, but I can't 
get any project to use it. In Visual Studio 2019 16.2.3 I've tried to create 
Standard, Core and Framework projects of all the latest versions, then set the 
Build Advanced Language Version to 8 or preview, but it's never available.
I thought Core 3.0 projects could use C# 8, but the highest choice I have is 
2.2. So I installed 3.0 manually and dotnet --list shows me the following 
(truncated) as installed, but I never see 3.0 list in target frameworks.
>dotnet --list-runtimes
Microsoft.AspNetCore.App 3.0.0 [C:\Program 
Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.0.0 [C:\Program 
Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0 [C:\Program 
Files\dotnet\shared\Microsoft.WindowsDesktop.App]>dotnet --list-sdks
3.0.100 [C:\Program Files\dotnet\sdk]

So I have two issues: (1) I can't pick Core 3.0 Framework (2) How on earth do I 
coax C# 8 into action?
Any advice would be most welcome. Perhaps there are really strict conditions or 
dependencies I'm not aware of.
Cheers,Greg
P.S. Public holiday in Melbourne for some sort of ball game. A horse race I can 
understand, but this?  

Re: Blazor comments

2019-01-30 Thread Jamie Surman
 I thought they were migrating winforms for a version of core that only runs on 
Windows
On Wednesday, 30 January 2019, 8:26:22 AM GMT, Greg Keogh 
 wrote:  
 
 

I note with interest that they’re hiring people to migrate winforms to core.

I saw some .NET news articles mentioning that. Jeez, that will be a helluva job 
trying to unify all the platforms. Think of all the small and large differences 
in Windows, OS X and Linux …  it boggles the mind -- GK






  

Re: Visual Studio 2017 and WWF

2017-08-24 Thread Jamie Surman
No, I think you will find it should be able to open. Our workflow projects are 
very old, and they open just fine. We did upgrade them from .Net 3.5 to 4.0 
last year, but this was literally just a matter of changing the framework 
target, there was no other change required. Looking at the references, they are 
referencing System.Workflow.Activities and various other System.Workflow 
libraries. You can create new workflow projects too (in .Net 4 or later).Anyone 
who has to work in Workflow has my great sympathy though, it is a horrible 
technology.

On Thursday, August 24, 2017, 8:29:30 AM GMT+1, Greg Keogh  
wrote:

I think I found the answer here:
Thank you for your feedback! The .NET 3.5 Workflow project type is no longer 
supported in VS2017. This is by design as WF from .NET 3.5 (System.Workflow) 
has been deprecated since 2012. While you will not be able to create new 
projects, it is still possible to open old projects if you install Office 
Developer Tools. But only SharePoint 2010 workflows are still supported. 
I forgot that there was some huge WWF update years ago and all the plumbing and 
libraries changed. The project I'm trying to open is the old style that 
references System.Workflow. As a test I created a new stub WWF project and I 
see it references System.Activities.
So it looks like the project which opened in VS2015 two weeks ago is no longer 
supported by VS2017 ... another subtle trap for the complacent or trusting. The 
comment above hints that I might be able to open it if certain conditions are 
met, but I'm not confident of the outcome and waste of time.
GK

On 22 August 2017 at 08:51, Greg Keogh  wrote:

After upgrading to Visual Studio 2017 I can't open any Windows Workflow 
projects (Incompatible, The application is not installed).
Various advice from searches suggests to check WWF in the Individual Components 
list (seems obvious), but it weirdly makes no difference. Others suggest you 
need SharePoint support, others suggest Framework 3.5 is needed. It all makes 
no difference.
There must be some other dependent piece of dark matter that I can't find. Any 
ideas anyone?
Greg K



Re: Visual Studio 2017 and WWF

2017-08-24 Thread Jamie Surman
Funnily enough we had to do this at my work, and I can confirm it is indeed 
possible.
To get Workflow to work need to install
 Office\SharePoint development switch to individual components tab in the 
install, and select Windows Workkflow Foundation
(ref: 
https://developercommunity.visualstudio.com/content/problem/3903/cannot-load-workflow-foundation-project.html)
Jamie
On Thursday, August 24, 2017, 6:00:09 AM GMT+1, Greg Keogh  
wrote:

After upgrading to Visual Studio 2017 I can't open any Windows Workflow 
projects (Incompatible, The application is not installed).
Various advice from searches suggests to check WWF in the Individual Components 
list (seems obvious), but it weirdly makes no difference. Others suggest you 
need SharePoint support, others suggest Framework 3.5 is needed. It all makes 
no difference.
There must be some other dependent piece of dark matter that I can't find. Any 
ideas anyone?
Greg K

Re: [OT] Noise cancelling earphones for a quiet programming environment?

2014-03-24 Thread Jamie Surman
Slightly off topic, but I always find it a bit sad to be working somewhere 
where everyone is sitting at the computer wearing their headphones and I want 
to make a witty remark about something or other, or just generally chew the fat 
with the guy opposite. Kind of anti-social.





 From: Scott Barnes scott.bar...@gmail.com
To: ozDotNet ozdotnet@ozdotnet.com 
Sent: Tuesday, 25 March 2014 9:35 AM
Subject: Re: [OT] Noise cancelling earphones for a quiet programming
environment?
 


+1 .. I use Bose at work. Only actual downside with these is i often leave them 
on my desk at the end of the day still on..and drain batteries... thankfully 
work has unlimited supply of AAA batteries but yeah it can be a downer to walk 
in the next morning and here it making a ticking sound due to low battery.

Oh and at times your ears clammy / sweaty if you leave them on all day 
listening to music... but doubt anything will solve that..


---
Regards,
Scott Barnes
http://www.riagenic.com


On Tue, Mar 25, 2014 at 5:52 AM, Andrew Coates (DPE AUSTRALIA) 
andrew.coa...@microsoft.com wrote:

Bose++
 
I’ve had the over ear type for years (QC2, followed by QC15) and have just 
bought a pair of the in-ear QC20. I can’t recommend either of these options 
highly enough. While they’re not cheap, they are awesome. This week I’m 
cutting code in a room with up to 10 people having interesting conversations 
about things which would usually distract me. I can’t hear them at all when 
I’m wearing these, especially if I have music playing as well.
 
Do it now, you won’t regret it.
 
Cheers,
 
Coatsy
 
Andrew Coates, ME, MCPD, MCSD MCTS, Developer Evangelist, Microsoft, 1 Epping 
Road, NORTH RYDE NSW 2113
Ph: +61 (2) 9870 2719 ∙ Mob +61 (416) 134 993 ∙ Fax: +61 (2) 9870 2400 ∙ 
http://blogs.msdn.com/acoat
Sent from the new Office
 
From:ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On 
Behalf Of GregAtGregLowDotCom
Sent: Sunday, 23 March 2014 4:27 PM
To: ozDotNet
Subject: RE: [OT] Noise cancelling earphones for a quiet programming 
environment?
 
+1 for the Bose gear. I wear them all the time on long flights and love them 
but have also used them in other environments and they are great.
 
The noise reduction quality is amazing. 
 
+1 also to the idea of drowning out part of the other noise. While they work 
well without anything even plugged in, clearly you’ll lose the other 
distractions better if you have sounds of your own.
 
For the same reason, I often will have the TV, or music, etc. on when I’m home 
alone working just to provide background noise. Otherwise, every little sound 
seems to be distracting.
 
Regards,
 
Greg
 
Dr Greg Low
 
1300SQLSQL (1300 775 775) office | +61 419201410 mobile│ +61 3 8676 4913 fax 
SQL Down Under| Web: www.sqldownunder.com
 
From:ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On 
Behalf Of Jorke Odolphi
Sent: Monday, 24 March 2014 9:28 AM
To: ozDotNet
Subject: Re: [OT] Noise cancelling earphones for a quiet programming 
environment?
 
 
http://worldwide.bose.com/axa/en_au/web/quietcomfort_20i/page.html
 
I have a set of these – there is an ‘active’ mode that basically reduces 
people talking to sounding like a faint version of the “peanuts teacher (I 
hope that’s not too old a reference for people…)
 
I can vouch it works amazingly well in an open office, when I have them on ppl 
have to wave at me to get attention – I have a mechanical keyboard and I can’t 
hear that either – YMMV of course – if you go to the bose store they’re pretty 
good at helping you test for your situation, especially at that price tag. I 
had the guy do loud sniffles for me so I could see if it worked for that…
 
 
 
 
From: Kirsten Greed kirst...@jobtalk.com.au
Reply-To: ozDotNet ozdotnet@ozdotnet.com
Date: Sunday, 23 March 2014 1:20 pm
To: ozDotNet ozdotnet@ozdotnet.com
Subject: [OT] Noise cancelling earphones for a quiet programming environment?
 
Hi All
So that I can concentrate better, I am trying to filter out the mouse clicking 
sound from person at the desk next to me.
Has anyone any tech recommendations on how to do this?
Thanks
Kirsten

Re: Web API response formatting

2014-01-19 Thread Jamie Surman
In WCF you use automaticFormatSelectionEnabled=true/false  to tell it to parse 
the header to work out what type of response to send back. I'm not sure whether 
it is the same in WebAPI. It seems a bit ugly to do via a querystring parameter.





 From: Greg Keogh g...@mira.net
To: ozDotNet ozdotnet@ozdotnet.com 
Sent: Monday, 20 January 2014 3:03 PM
Subject: Web API response formatting
 


Folks, what is the recommended way of letting the caller choose the format of 
the response? I have a method that can return plain text or XML, so how does 
the caller choose the one they want?

I could have a format= parameter on the method call (Rackspace do that), or is 
it better to inspect the Accept header and obey it? Or something else?

Greg K

Re: Recommendations for ASP.Net MVC book

2014-01-04 Thread Jamie Surman
I don't think you are going to need to worry about the page life cycle in MVC - 
it's one of the nice things about MVC over webforms, they get rid of a lot of 
that level of complexity.

I've recently read Professional ASP.net mvc 4 by some of the legends at 
Microsoft (Jon Galloway, Phil Haack), which I think is an excellent book. I 
couldn't imagine having to write a webforms app again now.





 From: Greg Keogh g...@mira.net
To: ozDotNet ozdotnet@ozdotnet.com 
Sent: Sunday, 5 January 2014 2:22 PM
Subject: Re: Recommendations for ASP.Net MVC book
 


Hi Iain, your message is well timed, as I'm also jumping head first into 
ASP.NET MVC because it seems popular and I'm hoping to find a neater 
alternative to the bloated mountain of gotchas that is WebForms.

I had this book delivered two weeks ago: Programming ASP.NET MVC 4: Developing 
Real-World Web Applications with ASP.NET MVC. I also found a free PDF of the 
whole book.

I don't recommend this book. Hundreds of pages are devoted to databases, 
testing, security, caching and building, which have little to do with the core 
of learning ASP.NET MVC. I'm angered by the lack of attention to the vitally 
important MVC coding techniques and how to manage the page lifecycle. The book 
does not contain enough information, discussion or samples to empower you to 
dive in and correctly structure and code a significant app.

I'm going to buy another book. Maybe someone can recommend one for both of us.

Greg K



On 5 January 2014 09:58, Iain Carlin cut...@gmail.com wrote:

Happy New Year all,


I've resisted MVC for too long and have decided to update my knowledge from 
ASP.Net forms.


I think the question may have been asked before but I can't find it in the 
archives, can anyone recommend a good book on the subject for someone who 
already knows ASP.Net pretty well but wants to start dabbling in MVC?


Cheers,


Iain 

Re: ASP.Net 1.0 in 3.5 container

2012-06-13 Thread Jamie Surman
I've worked at places that have done this. Use virtual directories for the 
separate dot net versions, and you will need each one to be running a separate 
application pool set to the appropriate version.
 
We actually had classic/1.1/2.0/3.5 all running on the same web site (note I 
wouldn't advise this setup personally).
 


 From: Preet Sangha preetsan...@gmail.com
To: ozDotNet ozdotnet@ozdotnet.com 
Sent: Wednesday, 13 June 2012 6:51 PM
Subject: Re: ASP.Net 1.0 in 3.5 container
  

I've not done this, but I'm wondering if you can just use two virtual 
directories each with a different WebApplication framework/type? And Hyperlink 
between them? You can upgrade the old pages as time allows, and  as time allows 
add new functionality the 3.5 application?


On 13 June 2012 17:04, Grant Molloy graken...@gmail.com wrote:

Hi all.. 
So my boss came to me yesterday and asks me to look into and build a prototype 
for an ASP.Net 3.5 web app which would need to act as a container for an 
ancient ASP.Net 1.0 app..
1.0 app is well and truely past due for life cycling, but org doesn't want to 
do big bang tech refresh, as have recently had fingers burnt on another!
 
The request...
The prefered approach would be to come up with a solution that allows 
existing functionality to remain 'as-is' and new functionality to be developed 
in .Net 3.5.
Over time existing functionality can be upgraded (from 1.0 to 3.5) as the need 
arises. 
Can you look at building a simple prototype in 3.5 that acts as a container to 
'Project ABC' web presentation functionality? The focus would be to identify 
possible options for integration between 3.5 and 1.0 at a presentation 
level..  Some key challenges include
* how to host 1.0 components within a 3.5 container
* how to integrate navigation from UIP (3.5) to 1.0 model
* how to sync data between 3.5 and 1.0 (eg. Session state)
* how to best isolate 1.0 functionality to allow clean separation from a 
maintenance perspective, as well as ease to be able to upgrade any piece of 
1.0 functionality independently of other functionality.  
As I'm waiting for my environment to be commissioned, I've been fruitlessly 
scouring the web. It seems like the web has cleansed itself of most. Net 1.0 
info!! 
Has anyone out there faced and defeated (or turned and run away screaming for 
their mummy) this type of beast? 
Can you use. Net 1.0 user controls in 3.5?Grant
 


-- 
regards,
Preet, Overlooking the Ocean, Auckland

Re: add code to all button on my asp.net website?

2011-04-20 Thread Jamie Surman
My 2c, easily done via the AJAX client library. I use the following code for 
cancelling button clicks during an async postback (ie inside an Update Panel)
(Note the client library is only available if you have a scriptmanager control 
on your form)

-Add the following javascript to your page
 function pageLoad() {

Sys.WebForms.PageRequestManager.getInstance().add_initializeRequest(cancelPostBack);

}

function cancelPostBack(sender, args) {
if 
(Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack()) 
{

args.set_cancel(true); //cancels any clicks if we are already 
processing one
}
}   


IMHO the value in doing this on the client rather than server side is the 
reduction in traffic between client and server.

Jamie





From: Richard Carde rich...@carde.id.au
To: ozDotNet ozdotnet@ozdotnet.com
Sent: Wed, 20 April, 2011 13:42:59
Subject: Re: add code to all button on my asp.net website?


Anthony

I presume you're trying to disable the button so a user cannot click twice.

This methodology has been discussed previously and, assuming that's the case, 
you're looking at the problem the wrong way around.  This is similar to the 
'how 
do I disable the back button' question.

What do you do if there's a s script error or network glitch during the POST. 
 The user is stuck.

Let the user click as many times as they want or go back and forth - just make 
sure you process the request once.  Do this by inserting a nonce into the form 
as a hidden item and store it in the DB or session state. When you've processed 
it, mark it as such and move the user on - a GUID is often used for this 
purpose.

Job done!  No jiggery-pokery on the client side where you have less control.

Good luck, and do let us know the site you're working on if it goes public.

--
Richard Carde

On 19 Apr 2011, at 03:28, Anthony asale...@tpg.com.au wrote:


I want add the following to all button on my website  i.e. 
button.Attributes.Add(onclick, ClientScript.GetPostBackEventReference(button, 
) + ;this.value='Processing Credit Card Payment...';this.disabled = true;)

 
Is there an easy to automatically apply this to all buttons?
 
regards
Anthony (*12QWERNB*)
 
 

Re: [OT] Usefulness of Microsoft Certifications

2010-11-11 Thread Jamie Surman
I must say, out of the people I have worked with who have passed the exams and 
the people I have worked with who haven't bothered, the passed exams camp 
have 
tended to be better developers on average. That is not to say that just because 
you have passed an exam you know more than someone who hasn't, of course.





- Original Message 
From: Scott Barnes scott.bar...@gmail.com
To: ozDotNet ozdotnet@ozdotnet.com
Sent: Thu, 11 November, 2010 6:28:05
Subject: Re: [OT] Usefulness of Microsoft Certifications

My take is this.

Microsoft has a very turbulent / chaotic nature in the past 5 years?
to be fair the product road maps on a variety of teams has shifted and
changed quite a lot. Its part of a natural rebirth and as a result
there is a ripple effect that goes beyond monkey see, monkey do
examination. You not only need to digest what just happened, but then
you have to figure out how to make what just happen work in a fast
pace production ready environment(s).

Looking at the examinations at the moment, the only real value I can
see in putting people through the gauntlet(s) themselves is to qualify
for the various Microsoft Partner certification etc. Even then its a
shallow return on investment once you have these for the said partner
value propositions (often customers would complain about the lack of
return for having to jump through so many hoops other than to have the
certification logo etc placed on a website).

Then you have the cognitive load associated with the various
examinations, to be blunt the chances of you recalling information
like the ones you've seen in exams post an exam is probably quite low,
so in a sense all the exams and certifications really say out loud is
this person is capable of reading and digesting information into
short term / working memory when required. How you can then adapt and
rationalize the information into todays projects is something i'd be
skeptical of seeing return on invested time as well.

My thinking is this, they are bogus and a redundant process undertaken
by folks who generally have no clue as to what they are searching for
in a person and use this as the last desperate refuge to shift
accountability back to the person in question in stating but you
should know this, didn't the exams cover this? mentality.

My 2c.


On Thu, Nov 11, 2010 at 3:49 PM, Michael Minutillo
michael.minuti...@gmail.com wrote:
 Well it all really depends on the programmer, the course, the teacher, etc.
 Whilst at university (CS) I learned about Trees and Hashtables and Lists and
 when to use one or the other. I learned boolean algebra and how to simplify
 such an expression where appropriate. I learned about reference types
 (pointers anyway) and value types and when to use one or the other. And a
 whole host more. All of that is stuff you can teach yourself but for some
 people actually sitting down and doing it at university helps to get the
 knowledge in and ensure you don't have any gaps**.
 Just yesterday I used Isolated Storage in a Winforms app I am working on. I
 did not know that such a thing existed before studying for an MS Cert (that
 I did not sit for but that's devestating to my case) and would have been
 messing around trying to write text into a file in a temp folder or
 something. Before that I worked on an MVC2 app which is a framework I taught
 myself with no coursework whatsoever.
 When two programmers come to an interview and one has sit an exam (or has a
 uni degree) and the other doesn't then I expect the one that has to have a
 broader knowledge base of the topic area (but not necessarily a deeper one).
 I still wouldn't exclude someone from an interview process because they
 didn't have an MS Cert or Uni degree. It all depends on what you need when
 you're hiring I guess.

 ** Imagine knowing about the collections stuff in .NET 1.1 but never having
 learned the generic collections in .NET 2.0. *shudder*

 On Thu, Nov 11, 2010 at 1:33 PM, David Walker david.wal...@planbonline.com
 wrote:

 I agree - several of our best programmers have never been to University at
 all. You have to wonder if three years worth fluff is really any good for a
 career - especially as the lecturers are generally poor teachers who are
 forced to give lectures as part of their tenure...

 -Original Message-
 From: ozdotnet-boun...@ozdotnet.com on behalf of Nathan Schultz
 Sent: Thu 11/11/2010 13:03
 To: ozDotNet
 Subject: Re: [OT] Usefulness of Microsoft Certifications

 I know one IT manager who actually likes employing programmers with
 degrees
 outside of CS. People with vastly different backgrounds tend to think
 about
 problems differently. I remember reading Boeing does the same when they
 develop their flight-systems, which are not only are quadruple-backed up,
 but are written by totally different teams with different backgrounds, as
 to
 help minimize a bug being in the same place.

 There is also one programmer at work without a tertiary degree but is