Operation Christmas Child 2005

by Erik Lane 28. November 2005 03:12

Operation Christmas Child is a wonderful charity that we've been supporting for several years.  This year my wife wrote a blog post about it and even some pictures of the kids preparing the shoe box gifts.

Tags:

Happy Thanksgiving

by Erik Lane 28. November 2005 03:07

I hope everyone had a wonderful Thanksgiving and good time with friends and family.  My Father-In-Law read piece of President Lincoln's proclomation message when he declared Thanksgiving a national holiday in 1863.  It is so refreshing to read and hear that our country is founded on the belief that there is a Most High God who shows mercy to us everyday..still today.  I see it on our money every day but I take it for granted and somehow our society now feels that we are a country of non-religion instead of a country that provides freedom of religion.

Below is an excerpt of his proclomation while the entire message can be found in the Thanksgiving link earlier in this post.

“No human counsel hath devised nor hath any mortal hand worked out these great things. They are the gracious gifts of the Most High God, who, while dealing with us in anger for our sins, hath nevertheless remembered mercy.
It has seemed to me fit and proper that they should be solemnly, reverently and gratefully acknowledged as with one heart and voice by the whole American people. I do therefore invite my fellow citizens in every part of the United States, and also those who are at sea and those who are sojourning in foreign lands, to set apart and observe the last Thursday of November next, as a day of Thanksgiving and Praise to our beneficent Father who dwelleth in the Heavens. And I recommend to them that while offering up the ascriptions justly due to Him for such singular deliverances and blessings, they do also, with humble penitence for our national perverseness and disobedience, commend to his tender care all those who have become widows, orphans, mourners or sufferers in the lamentable civil strife in which we are unavoidably engaged, and fervently implore the interposition of the Almighty Hand to heal the wounds of the nation and to restore it as soon as may be consistent with the Divine purposes to the full enjoyment of peace, harmony, tranquillity and Union.

In testimony whereof, I have hereunto set my hand, and caused the seal of the United States to be affixed.
Done at the city of Washington, this third day of October, in the year of our Lord one thousand eight hundred and sixty-three, and of the independence of the United States the eighty-eighth.
Proclamation of President Abraham Lincoln, 3 October 1863.”

Tags:

Agile Dilbert

by Erik Lane 17. November 2005 03:15

Not sure whose seen this but its pretty darn funny.

Tags:

Using a Static WSDL file with your .NET Webservice

by Erik Lane 16. November 2005 08:59

Over the last few day I've been learning a lot about web services in a production environment and inter operating with a platform other than .NET.  There is so much to learn its not even funny.  The refreshing thing is even with the headaches and frustration of the process I'm glad I went through it and learned something that will stick with me.

Writing the web service or getting it to work was not a big issue.  The big issue is having third parties access the service and getting it work behind the firewall with SSL.  When the third parties would reference the web service they were using https://www.company.com/webservice.asmx?WSDL to generate the proxy classes on their platform.  That would work for most situations except everything inside of the firewall is regular http traffic.  This causes the auto generation of the WSDL file to return the location as http://www.company.com/webservice.asmx and not https as I was expecting because the actual connection to the service was over http.

My first thought was to somehow override, or at least tap into, the functionality of auto generating the WSDL file so I could write out the correct URL for the web service.  In my research I stumbled upon a discussion where a guy was wanting to do the same thing.  Ahh, could this be the answer I was looking for?  We'll, the discussion linked to an article on MSDN about Customizing the Generation of Service Descriptions and Proxy Classes and the guy was nice enough to post a follow up with his bullet points.  That's great in a normal situation and I really appreciated the effort on his part.  < rant >Too many people don't follow up when they fix their issue or just post "I fixed it" but don't say how they fixed it. < /rant > Anyway, this is some pretty in depth stuff that I was ready and willing to tackle it late last night.  That is until I realized that I needed something faster that what I was going to get by reading to understand how it works, code it, test it, etc..

I remembered reading somewhere about securing web services and turning off the auto generation of the WSDL files and submitting them to your customers/clients individually.  But if they have the WSDL file local how is that going to help them access the web service?  DING! DING! DING!  In the static WSDL file you set the location URL to whatever you need it to be...https://www.company.com/webservice.asmx.  When they reference the static WSDL file it tells them the real location of the web service.  Sounds way to easy I know but it that's it.

Set the address location

<soap:address location="https://www.company.com/webservice.asmx"></soap:address>

By default, Web services publicly expose WSDL, which makes it available to anyone who can connect to the Web server over the Internet.  It my case it worked but didn't deliver the expected result.  To disable the Documentation protocol, comment it out in Machine.config.

<webServices>
  <protocols>
    <add name="HttpSoap"/>
    <!-- <add name="Documentation"/> -->
  </protocols>
</webServices>

 

Tags:

ASP.NET and MS Access - Operation must use an updatable query.

by Erik Lane 14. November 2005 07:21

If you ever work with MS Access and classic ASP apps, the first thing you do is give the IUSR account modify/write access to the folder and the .mdb file.  That fixes the issue.  Not true with ASP.NET.

Over the weekend I spent waaaay too much time trying to fix this issue in ASP.NET on a Windows 2003 box.  I was racking my brain trying to figure out what the heck I was missing.  I found a thread on how to fix the issue over at the asp.net forums.  The thread is locked and 4 pages long but it appears that they've updated the first message a time or two.  To keep someone else from spending the time reading the thread I'm going to give you the low-down on what I did.  This will also serve as a bookmark for me.

1.  Add < identity impersonate="true" /> in web.config of your application.
2.  Give the Network account modify/write access to folder and .mdb file.

That's it.  I intially thought that the ASPNET or IUSR account would be the account needing the access.  Reading through the thread though I find this comment from Ken Shaefer:

"If you are using Windows2003 server, then the w3wp.exe process identity runs under whatever you have configured for the Application Pool that the application is in. There are no ASP.Net worker processes (like in Windows 2000 Server, unless you are using IIS v5 Isolation Mode rather then IIS6 Worker Process Isolation Mode)

 Typically this is NT AUTHORITY\Network Service"

Side note:  When I started working on this I was going to give VistaDB a shot.  Then I found out that it doesn't handle stored procedures (version 3.0 will).  I guess I was under the impression that it did and that is a HUGE advantage over MS Access.  Maybe I need to work with it more and then I'll see its advantages over MS Access.

Anywho, I hope this is helpful for others in search of the updateable query issue.

Tags:

Forth Worth .NET User's Group Meeting on TDD

by Erik Lane 9. November 2005 04:53

Last night attended my first Forth Worth .NET User's Group meeting.  One thing living in DFW is that I have three solid .NET user groups here.  I've previously attended both the North Dallas and Dallas .NET user groups.

Tim Rayburn, NUnit contributor,  did a quality presentation on TDD with .NET and NUnit. 

I wanted to attend this meeting as "sanity check" on how I was implementing TDD.  I've only used TDD on two smaller projects thus far and I don't work with developers who use TDD.  I don't really have a good frame of reference other than books; sometimes its just nice to see how it is done.

Tim went into the background of TDD and things that I've read before.  It was still good especially for those not really that familiar with it at all and good refresher for myself.  What I liked most was his open dialogue with the group.  He took lots of questions and demonstrating his answers within the demo.  Again, just good to see how it's done sometimes.  In large groups like that I'm usually a quiet guy who doesn't speak up but last night I actually asked two questions and made one comment.  Woohoo. 

I now have some answers to work with and an answer to my main question:  What is a good strategy to structure your projects/solution to keep the test class with your code so it doesn't get lost but it is compiled as a separate DLL.  Answer:  In your solution, for each code project have one test project.  This way you can reference your code from your test project for the tests and they get complied as different DLLs.  Not to mention you don't have to mess with the access level of your methods in your code.

Good stuff!

Tags:

Will Foldershare now be Free?

by Erik Lane 9. November 2005 04:26

I've read in many places where Microsoft purchased Foldershare.  I've looked at using Foldershare but my USB drive does the trick plus more if I want.  So subscribing to foldershare really wasn't a good option for me.  Today, Joel has heard (not sure where) that Microsoft will now make Foldershare free.  That would be cool and I think I'll give it shot if that is the case.

I went to the site and I see the Microsoft logo in the footer but I don't see that the service is free yet.  I'm not sure if Joel forgot to link to the article/post or he's just got the inside track.

Update:  Joel found the link and provided it in the comments.  Look at the last sentence.

Tags:

Update on using log4net

by Erik Lane 4. November 2005 03:32

A few months ago I made a most about log4net.  Like most I was having some trouble getting things up a running.  From that time I've now got a standard logging class that I include in every project I write.  At first all I wanted was the ability to log something and have the ability to change the logging levels without recompiling.  Log4net definatley does just that plus a whole lot more.

I'm using a modified version of Nauman Leghari's class that he provided for everyone to download; it is an excellent framework to start with.  Since most have trouble with their config files more than the classes themselves I'm going to post my config file that works nicely with log4net version 1.2.0.30714 (1.2 beta 8).

I have two appenders:
LogFileAppender - This is the basic rolling log file.  Its my primary source for all logging and will log any message that is at the level set in the root element.  A new log will be created after it reaches 5MB and 10 of those will be kept.  All of this is customizable but I've found these to be about right. 

SmtpAppender - This is about as advanced as I get (so far) with my logging.  This appender will send an email containing the message just logged along with the last 512KB of messages in the buffer.  This is helpful to provide context to the actual error message.  Even though the root logging level is INFO, the threshold element sets the level that the message must be equal to or greater than to be sent using this appender.

Config file can be downloaded here log4netconfig.zip.

Message formatting:
I like a straight forward message that is clean and precise.  There is a lot that can be logged but I basically want the date/time/level/custom message and exceptions.

Example output: 

11-04-2005 08:58:41 DEBUG  [cam/default] was deleted from the Database.
11-04-2005 08:58:41 ERROR Invalid Argument
Exception: System.ArgumentException
Message: Invalid arugument was provided.  Only accepted argument is 'validate'.
Source: hvmscc
   at Company.HVMSContentConverter.Converter.Main(String[] args)
11-04-2005 08:58:41 INFO  1 error(s) occured during process.

Tags:

Excellent MSDN articles on Generics

by Erik Lane 1. November 2005 01:11

I'm not on 2.0 yet so this is primarily a bookmark for me. 

Dave has the links to MSDN.  I've not went through my MSDN just published feed yet so I'll link to Dave since that's where I saw it.

Tags:

New Sharepoint Intellisense XML Files

by Erik Lane 1. November 2005 01:04

Need or want Intellisense support in VS.NET with Sharepoint namespaces?  Microsoft has released two new XML files.

Download the Intellisense XML File for SharePoint Services and the Intellisense XML File For SharePoint Portal Server.

[via TheServerSide.net]

Tags: