Without going into too much detail I am working on an application where a small portion of the functionality allows companies to assign and track online training for their employees. We aren’t in the business of creating or hosting the online classes but we need to be able to track their progress through each course so we can give them credit when they complete it. The online class provider uses the HACP interface (I would love to add a link to resources if you are looking for them but they are hard to come across) which means that it POST’s data to a page you provide, you work your magic and send a response back. I did this and it worked perfectly… when we hosted the content.
When we made out way out to production and a client went to use it they noticed that the course launched just fine but when they completed the course nothing happened. I looked in the database and sure enough nothing had been updated. Since we use ASP.NET my initial response was to make sure the page was allowed to be acccessed without being authenticated and that was correct. I knew the provider was able to hit the page since when the course is launched the it hits the page and gets a response with the users information so it had to be something else.
The main problem I ran into was that I couldn’t attach to the process in production to debug and I couldn’t replicate the real world scenario so I had no clue how I was going to attack this problem.
Tonight I got an email from CodeProject that had a link to an article called 15 Firefox add-ons for Web developers. I like tools so I checked it out. Low and behold there is an addin that allows you create your own web request (GET, POST, HEAD, etc…) and change it to be what you want. This addin is called Poster (boring name but effective). I installed it and within a few minutes I was able to mimic the exact scenario that I needed to. The problem that I ran into was that ASP.NET validates requests and it was blocking the content saying that it was unsafe. I added ValidateRequest=”false” to my header and it works now.
If you are looking for information about HACP and C#, VB.NET, ASP.NET or any combo in between there aren’t many resources and I’m not sure what I am allowed to share so RTFM over and over again. Good luck!