Geoffrey DeFilippi

SPS 2003 Web Services and Authentication - II

March 30, 2007 @ 10:13 am by Geoff | Programming

Okay I’ve created the testing application and it seems to work to a fashion, but not the way I intended. Here is what I’ve done:

1) Created a small Test Application using Visual Studio 2005 (C#)
2) Referenced the Sharepoint Portal Area Usergroup.asmx (Web Service) by adding a Web Reference
3) Using the default.aspx code behind page in the page load function:

protected void Page_Load(object sender, EventArgs e) 
{ 
     UserGroup.UserGroup usrgrp = new UserGroup.UserGroup(); 
     usrgrp.Credentials = System.Net.CredentialCache.DefaultCredentials; 
     try 
     { 
          XmlNode lnode = usrgrp.GetAllUserCollectionFromWeb(); 
     } 
     catch (Exception ex) 
     { 
          Response.Redirect("notallowed.aspx"); 
     } 
 
     Response.Redirect("allowed.aspx"); 
}

The intent here is that if you aren’t authorized to read from the web service with your security credentials then an error gets thrown which is correct and you get redirected to a not authorized page.

We’ve created a GPO that pushes local users accessing the site into the Trusted Security Zone so that they automatically pass their credentials. What seems to be happening is that any logged in user has the ability to access this web service, so this is obviously not the correct method to call to obtain membership information the way I intend to use it.

I’ll post some results later if I find a method that allows only reader level users access to the web service (it thinking the get urls web service might be correct as this portal area is restricted to certain active directory groups and certain other users [a domain trust is in place]). I’m thinking the web service that lists subsites might be the way to go.

Stay posted!!!

Headphones

March 20, 2007 @ 8:45 pm by Geoff | Rants

What is it with headphones in pubic places. It is somewhat amusing to me (in a defeatist way) that you can’t listen to a stereo, because it isn’t personal and you force everyone else to hear it, so you go ahead and pop in those earbuds and turn them up to a defening roar. It’s even better because all your fellow passengers hear is a truly grating mix of the treble and bass sounds without the advantage of any actual words. It kind of reminds me of listening to a woodpecker unleash it’s beak on a tree early saturday morning intermixed with some car alarm and dog barking.

No i won’t ask you to turn it down. Yes you’re certainly entitled to you personal music, but don’t ask me to thank you for the concert either. After all if i can hear it you’ll certainly be paying for it later (hopefully with your own money and not tax payer dollars for the un-insured).

There are other choices by the way. I admit some of them do cost more, but you could replace you low quality ear buds with something of a slightly higher grade (shure anyone)… As an aside; you don’t have to listen as loud if the sound quality is clear…

After all that money you paid for your portable music player why not treat yourself in style; we’ll both be happier!

SPS 2003 Web Services and Authentication

March 20, 2007 @ 1:19 pm by Geoff | Programming

So here is the scenario:

  1. I’ve got a pretty mature installation of MS Sharepoint Portal 2003
  2. I’ve got a pretty useful web application running on the same server using the .NET 2.0 framework (C#)

Now wouldn’t it be great if there was an easy way to use the permissions and roles from a Sharepoint Site to determine if a user should be able to access the application, after all its pretty easy to manage permission using the portal and why re-invent the wheel.

So I’ve got a couple of options I could use.

  1. Put the application into a WSS site in a sub directory - Not how I want to do it because the link is going to be confusing and the potential of having to reinstall something in a sub - sub directory is scary to me. I also need this to branch out of a portal area which won’t support .NET 2.0
  2. Write a Web Part - Opps I’ve upgraded to .NET 2.0 and I really really want to use the rich feature set. I also can’t stand messing with the GAC and strong typing and web part security.
  3. Find a way to use the web services inside the .NET web app - Now were talking

Before you get excited or tell me how to do this: This is part 1 - description of the problem. I believe I’ve got a cheap and easy solution using the web service authentication wrapped in a try catch block, but so far no dice.

Look for an update soon.

.99 Cents

March 20, 2007 @ 1:08 pm by Geoff | Rants

Do you often find your self thinking that 24.99 is much cheaper than 25 dollars. I know I sure do. I find the lure of an item which is 1 cent less to be so appealing I am tempted to buy two.

So apparently according to business researcher this concept termed “Just Below” pricing actually works and works well. I guess I shouldn’t be so surpised, but I can help feeling insulted intellectually.

The concept is as follows:

  • People don’t make rational purchasing decisions. - I guess I can “buy” that. Actually I’ll sell it to you for $1.99 if you would prefer.
  • People go crazy for these deals or steals - After all you are saving a whole cent.
  • What they really mean is that the price most people see when looking at a 1.99 price or 150.99 price is rounded down - I call that wishful thinking on the part of the shopper and lying on the part of the seller.

So it appears that the studies drive the industry pricing and since the studies are done on normal people who am I to argue.

That certainly doesn’t mean I have to like it and it doesn’t mean I personally will rush out and buy it.

I’m not advocating wholesale boycotts or anything either. All I trying to say in a round about way is “Wouldn’t it be more honest to sell me something for what its worth instead of trying to trick me into buying it because I’m getting a good deal?”

Pretty

March 17, 2007 @ 2:21 am by Geoff | Photos

IMG_5051IMG_5083IMG_5125
Allison shot these last summer. Pretty flowers up at Jim & Janie’s house!