# Thursday, March 09, 2006

At my current client, security is taken to a whole new level, which is a good thing. But as a result, sometimes there is more of a challenge to resolve issues you may not normally encounter. For example, I was tasked with writing a web service which would facilitate file transfers of documents and images from a web page (and Windows client), store them on a secured server, and serve them up to an authenticated user on the internet. To do so, we have to deal with proxy server issues and firewall issues.

After writing and testing the web service locally, I deployed it to our production server. Locally, it all worked fine. However, when I deployed the web portion of the application to our test server outside our intranet, the real fun began. The next several posts I will discuss the problems I encountered, and how I ultimately resolved the issue. Hopefully this will help any readers out there who have a similar issue, as well as become documentation for the process I used so I can later reference it.

The first issue I saw was the following error:

The <To> header must match the value of an incoming message's HTTP Request Url if the soap receiver does not have an actor name.

I'd love to give the person I found the solution at credit, but it's been such a long time I can't find the original document I used. I modified the solution to make it a little more "generic" so that the web service can be moved without requiring a recompile of the application.

First, you'll need to locate the Reference.cs file for the web service reference(for C# users. Reference.vb is the similar file for VB.Net, but all code here will be in C#). In this file, add the following reference:

using Microsoft.Web.Services2.Addressing;

Next, locate the consructor for the WSE portion of the Reference.cs. In this case, mine will be FileServiceWse(). Here's the code you'll need to replace the this.Url reference already in there.

public FileServiceWse()

        {

            //these two setting are the <TO> and Response URLs. For example, in our case the response was

            //coming back with the redirected port appended to the url.

            //The Web service <TO> looked like https://mycompany.com/FileService/FileService.asmx

            //but the response was https://mycompany.com:1234/FileService/FileService.asmx

            //The endpointreference call to the Destination tells the application to expect the return url to look differently than the

            //<TO> reference

            string urlSetting = System.Configuration.ConfigurationSettings.AppSettings["FileService"];

            string urlReturnSetting = System.Configuration.ConfigurationSettings.AppSettings["FileService.ReturnURL"];

            if ((urlSetting != null) && (urlReturnSetting != null))

            {

                Uri sourceUri = new Uri(urlSetting);

                Uri returnUri = new Uri(urlReturnSetting);

 

                this.Destination = new EndpointReference(sourceUri, returnUri);

            }

            else

            {

                if ((urlSetting != null))

                {

                    this.Url = string.Concat(urlSetting, "");

                }

                else

                {

                    //this is the default URL of the file service if all else fails.

                    this.Url = "https://mycompany.com/FileService/FileService.asmx";

                }

            }

 

        }

 

What this code does is set the Destination property (if the FileService and FileService.ReturnURL settings are placed in the web.config file) to expect a different response than the requested web service URL. In our case, since our request was going through a firewall which remapped the ports, we had a port attached to the url for our web service which triggered this error.

The code also has failover. If I forget to make the settings, it will try the original URL reference. In my case the call won't work, but I believe in at least attempting to code some failover when human error can take place in moving files, etc.

But this only solved one of the many challenges I encountered in deploying this web service. Stay tuned for the next resolution to tricky WSE issues!

Thursday, March 09, 2006 4:12:20 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 

It's not a record for longest time between posts, but it sure has been a while. I finlly got off my butt and upgraded das Blog to the latest version, and enabled comments again. So now maybe it will be worthwhile to begin blogging again!

The past few months have been interesting to say the least. I have a catalog of things to post about, such as solving some bizarre web service issues with DIME (well, solution is not quite the word... a workaround is more like it) as well as beginning the trek into VS2005.

So if there's anyone still out there readin this, I do have a ton to write about, now lets see if I can find the time to do it!

Thursday, March 09, 2006 4:52:50 AM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
# Friday, December 09, 2005
XBox 360 not working? Then sue!
Friday, December 09, 2005 10:01:47 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
# Friday, October 07, 2005
..or why MS has once again dropped the ball on it's core developer community.
Friday, October 07, 2005 4:57:27 PM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [1]  | 
# Tuesday, September 20, 2005
"Internal Query Processor Error: The query processor could not produce a query plan. Contact your primary support provider for more information" when passing in C# DateTime value...
Tuesday, September 20, 2005 11:50:34 PM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Friday, August 05, 2005
spammers!
Friday, August 05, 2005 2:33:34 PM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Wednesday, July 20, 2005
When you have to eat your hat...
Wednesday, July 20, 2005 9:31:12 PM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Tuesday, July 19, 2005
I hate LLBLGen, ask me why!!
Tuesday, July 19, 2005 5:49:51 AM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [5]  | 
# Friday, May 27, 2005
(and maybe why Extreme Programming (XP) is also bad?)
Friday, May 27, 2005 6:28:46 PM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
Need a good developer?
Friday, May 27, 2005 12:33:35 AM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [2]  | 
Tired of cutting and pasting? Try CodeSmith...
Friday, May 27, 2005 12:19:32 AM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [1]  | 
# Saturday, April 23, 2005
What the $*#(U$(? Where did the wse version go?
Saturday, April 23, 2005 9:36:27 PM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Thursday, April 14, 2005
I am joining the fray....
Thursday, April 14, 2005 5:49:54 PM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [1]  | 
# Monday, April 04, 2005
How to get them to reappear...
Monday, April 04, 2005 7:28:35 PM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [1]  | 
# Monday, March 21, 2005

Let's talk resume's for a minute. You want that interview don't you? Well, sometimes all you have to get you there is your resume (although personal reference is the best way if you can get it, an area where networking and doing quality work can help).

There's a million places on the internet to help you decide how to structure your resume. I have only gotten one criticizm from my resume, and I am not sure if it's the content or the structure which works best. But here's a couple of pointers which I think have helped out my resume.

  1. Place a logo of any certifications you have if available (e.g. MCSD). These are real eye catchers. Make the images small though..
  2. Place your specific skills separate from your experience, preferably near the top. This makes it easy to survive the first pass from the recruiter/manager.
  3. Sell yourself! Research “power“ words and make any experience descriptions short and chock full of those words.

Now, there's a few easy tips of what to do. I have been helping staff for years, and here's some of the gems I have seen.

  • Horrible writing and spelling.
  • Obviously exagerated skills and experiences (4 years experience, 10 years at a certain skill)
  • Never say you are an expert at anything, even if you are. Humility goes a long way, and if the interviewer knows more, you'll be humbled by them, as I witnessed in the past week.
  • Use nice paper if submitting a hardcopy (I received one handwritten on a partial piece of paper -- I kid you not)

It's not tough... just use some common sense!

Monday, March 21, 2005 3:11:00 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [1]  | 
# Saturday, March 19, 2005
OK, so now you know wht might be asked.. how not to blow it.
Saturday, March 19, 2005 12:14:50 AM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [1]  | 
# Friday, March 18, 2005
WTF? Poor documentation...
Friday, March 18, 2005 9:15:58 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [4]  |