Friday, August 29, 2008

Test a Web Service operation using the HTTP POST protocol

Dot .Net Dilemmas
It's on a million other forums and blogs but it's one that I found very useful and has I have said, the main reason for this blog is to keep all the tips and pieces of code that I use over and over in once place (and at the same time, maybe help one or two others that have the same issues).

If you need to test a Web Service that is not staged locally, you need to enable remote testing. To do this, add <add name="HttpPost"/> under <system.web> in the web.config of the web service.

<configuration>
  <system.web>
    <webServices>
      <protocols>
        <add name="HttpGet"/>
        <add name="HttpPost"/>
      </protocols>
    </webServices>
  </system.web>
</configuration>

Now you can call the web service from a different machine and get the test form.

Monday, August 25, 2008

.NET Rocks.

Dot .Net Dilemmas
It's an awful name for a web site and there is nothing that I hate more than people trying to make coding and IT sound "cool" and trendy (it's simply not) but I have to recommend the excellent Podcasts at .NetRocks.Com

I heard about this website a few years ago when I first started to subscribe to Code magazine but at the time I wasn't really one for downloading and listening to Podcasts. However, now that I am that much older, listening to Podcasts has kinda become what I do on my bus or ferry journey into and out of the CBD in Sydney. I just put them on and to be honest, without even really tuning in to what is being said, I have taken information in by osmosis.
Since I started in my new job, one of the issues that we have had and I have had to deal with is response times and scalability. I just assumed that the site and web services would have taken advantage of page and object caching to ensure that a new call was not needed to an external database on every call to the web server. Having listened to the Podcast 'Udi Dahan Scales Web Applications!' (dated 12/08/2008) where Udi gave some excellent ideas on web scalability, I decided to look into our code a bit more to see what was going on.

To cut a long story short there were a million and one places both at page and at class level where the code was crying out for caching. (this is something that you need to be VERY careful about. Even though you may think that caching every page and every object is a good idea, a lot of thought needs to go into your design to ensure that you get the benefits of caching. Look at every page and object and ask yourself, how up to date does this information need to be and what benefit will my applications get from holding this information in memory on the server) For instance, every time there was some need to populate a currency drop down a new call was made to the database.
So, to start with, I simply found everywhere there was a "...GetAll()") for methods like currency, postcodes, countries etc and implemented caching. Already we can see a positive outcome in response rates. It's simply a no brainer.

I think that there is a new .NET Rock show ever week and I doubt that it's something that you'll want to discuss with your girlfriend or mates but it will make you sound more knowledgeable in meeting or interviews.

Friday, August 22, 2008

Day 1: My Reason for a Blog.

Dot .Net Dilemmas
Not too sure if this is the best place for keeping all this type of stuff but, recently I moved from Dublin to Sydney for a very good reason and stated a job in a new company on George Street in the CBD. It's winter in Sydney at the moment and a lot colder than I ever thought it would be in Australia but, I have to say that the Sydney winter is pretty much like the Dublin summer so I feel right at home and am loving it.

I have taken over the development, upgrade and maintenance of the company website which sells an excellent product and training online.
So far so good. Good company to work for but in the course of getting everything set up on my new laptop for development and testing, I have had to solve some problems that I have had to solve many times before but of course, when I go to fix them this time, I forgot what I did the last time and have to start searching for the answers all over again. So, this blog is more for me in a attempt to keep all my bits of information, website and solutions for fixing those .NET, C#, IIS and ASP.NET issues that come up again and again. Hopefully others will find it a help too? Not sure if it will be a daily blog, but I will try to add to it whenever I find or fix something interesting.

Anyhow, to start it off, here are a list of the .NET/Computer Architecture books that I am currently trying to get through.
I'm always on the look out for books that people recommend and I am especially looking for a good book on Silverlight 2.0 for a complete beginner, so if you know of any I would be more than grateful for any suggestions.