EditModeVisibility

Whilst customising our SPS installation various people were complaining of all the admin links down the left hand side.

So we thought about removing them, but how do you then edit.

I stumbled across configurator, really handy to see what can be done when customising area templates, and I remembered that this had removed all the admin links like change settings.

Well it hadnt removed them it just ensured that these links only appeared when in edit mode, a much better solution (why is this notthe default ?)

So the items for your <spswc:toolbar> that need hiding can have the value “EditOnly” instead of Both.  Don’t ask me what the other value is.

Thanks to Stuart Estell for assistance on this one.

Session state cannot be used in ASP.NET with Windows SharePoint Services

S’funny how you find the articles you need after you find another way to solve the problem.

But for those who want to use the combined web method.

http://support.microsoft.com/default.aspx?scid=kb;en-us;837376

Not sure I like the sound of some of their “fixes”.ÿ Whislt for us developers this dual natured development box is required its not advisable to do it in a live scenario, and yes I know Application Pools etc etc but when you get down to it your apps are going through a different http handler or if you make the changes listed looks like sharepoint does.

Developers are going to be the experts in Sharepoint, the amount of under-the-hood messing we have to do to get things working expose us to a large proportion of Sharepoint. So wouldn’t it be a good idea if our boxes were, not identical, but closer to how it would be deployed in live.

For those who are going to deploy apps/sharepoint combo, I hope you have your Advil handy.

ÿ

SPS/WSS on the internet

I may be wrong but this, to me, looks like an SPS installation

http://www.greatwesthealthcare.com

I cant tell if its WSSor SPS, but I didnt think the licening model allowed for SPS installs on the internet.

But the larger question is, for the functions that this site offers, WHY ? Why use sharepoint at all, would not CMS be better ?

If anyone knows please enlighten me.

Its very pretty by the way and does show how you can change an area template.

 

It appears to be working

Well I’ve done that SPS build to another machine now and all seems well.

I had a combined SPS/WSS and Application installation. WSS install was to my default web which had loads of existing applications in it. I had manged paths in sharepoint to to make this work in this scenario. My wwwroot folder was on drive D: also so my changes reflect this.

So Heres exactly what I did.

Had some problems with stsadm not working against my sites whan adding a webpart, this is because I created my portal before the host-header rename. So before you do this to enable it to work you have to DELETE ALL SITES, than after this Create a new SPS site. (The same probably applies to WSS as well)

The best approach is to have all the Virtual Webs in place before installing WSS/SPS, but admittedly I havent tried this installation yet so cant advise on it, I will have to soon when I get some new more powerful kit. My 1.4mhz processor is creaking a little under all this strain.

  1. Create a new folder d:\intepub\wwwscarepoint
  2. Copy the aspnet_client script folder into it (not sure if needed, but safe than sorry)
  3. Copy the Web.config file from other wwwroot into here.
  4. In IIS change default web home directory folder to scarepoint folder (this is the Virtual web that has sharepoint installed in it, if you installed it elsewhere dont do it to default web, infact if you did it elsewhere you probably solved this problem anyway).
  5. Rename the Default Web Sharepoint (aethetics)
  6. Remove any Virtual Directories you have in here that you no longer want in here, take care IIS deletes can delete the source too not just the VD. Cant rememeber what circumstances though.
  7. For the Sharepoint IP address add a host-header for port 80 I used Scarepoint
  8. If you have control over your dns then enter an alias for your scarepoint url, if you dont you can put one in the hosts file for 127.0.0.1. (If you don’t know how to do this, why are you in web development again ? )
  9. Create a new WEB and call it Default Web, point it at your wwwroot folder, ensure you have the correct Application Pool.
  10. Reset the directory security you want
  11. Add any additional default documents you may have
  12. In the wwwroot folder return your web.config to its original state, minus sharepoint settings ! (This made my Session problems go away).

And thats all, everything seems to work now, sharepoint, my apps, and most importantly Visual Studio/IIS integration.

DO NOT DO THIS UNLESS YOU ARE PREPARED TO HAVE IT GO WRONG AND YOU NEED TO REBUILD. DO THIS AT YOUR OWN RISK.

Developing With Sharepoint and Visual Studio and apps all on the same box

There are quite a few blog entries out there about sharepoint and applications hosted on the same machine.

There is a KB article on it too http://support.microsoft.com/?id=823265. You modify the managed paths.

Well true this works and apps can run side by side, in fact you can run applications inside sharepoint with the managed paths option. We did hit some problems in doing this.

  1. All of a sudden Session stopped working, it told us hey turn it on. Well I can tell you it was turned on. Nevr got round to fixing this, if someone knows of the problem and of a fix post a comment.
  2. Visual Studio became a bloody nightmare. Whilst it could create new apps apps opened from Sourcesafe had a blue fit.

So we tried to install Sharepoint and Apps on two seperate webs. We also utilised host-headers so both webs could use port 80. This does require the developers box to be Server 2003. If you have one monitor, then dont do it virutalise it and have seperate boxes. If you have two monitors you will lose productivity by not doing it, but be prepared to re-install sharepoint, beter still make a copy of everything to copy over the top of your customisations that have gone wrong, and they will go wrong.

Did it work. Did it “eck as like”. Visual Studio bitched about it again. Why ? becuase of the way Studio enumerates the webs to determine which is the Default Web (ie the one you dont want sharepoint on).

Even though our SPS or WSS install was on a http://scarepoint host-header, and we were opening localhost. Studio got it wrong.

We believe overcame this, (well I think we did, havent repeated this installation yet ).

After Sharepoint has been installed, create a NEW web, this will point at the default web. give it all the same settings as default web then delete default web (you may need to modify default web settings to set the new ones).

Now when you do things in studio, it enumerates the webs and takes the NEWEST web as its default. This is what APPEARS to happen not being the studio developers we dont know for sure.

Now it all works, no mananged paths, no session problems interface into sourcesafe nicely.

Thanks to my colleague Mark Sheppard for finding this one, I think he got fed up with my profanity so had to fix it quick.

Updates:

http://blog.binaryjam.com/simon/archive/2005/02/28/195.aspx

DO NOT DO THIS UNLESS YOU ARE PREPARED TO HAVE IT GO WRONG AND YOU NEED TO REBUILD. DO THIS AT YOUR OWN RISK.

SPS Query Builder

Not knowing much about CAML yet Im not sure how useful this will be but someone developed a library to generate CAML Queries for lists

http://dotnet.org.za/reyn/archive/2004/07/13/2738.aspx

 

It does bug me when…. (AJAX)

See.

http://blogs.msdn.com/rido/archive/2005/02/24/379498.asp
Which references  http://www.adaptivepath.com/publications/essays/archives/000385.php

Hardly new

I have been creating AJAX apps since IE4 with RDS and offscreen IFRAMES then with XMLHTTP.  My problem back in the day was cross-browser compatibilty, I didnt even consider doing it back then most of the AJAX things I did were extranet or intranet.

It bugs me that someone who recently started investigating this gives a bunch of credit to google for this technique, true well done for pushing it beyond what us early pioneers did but your still standing on others shoulders.

So I’d like to send my thanks to the person who inspired me to pioneer this technique all those years ago in my own applications. (And for those who have worked with me you never thought you’d hear this).

Thanks to Dino Espisito, author of probably the only book released at the time with mention to RDS which enabled me to exploit this now redundant technology to do AJAX.  Instant Scriptlets was a much overlooked book, that gave me insight in to all the nasty things I could do with RDS (and the piss-poor implemented “scriptlets”).

Thanks again Dino.

 

PS Thanks to MS for IE4 and the IE4SDK, what got me interested in Web in the firstplace to leave unix behind.

I’ve got the ‘ump

“To have the ‘ump”  (hump).  Is a  UK midlands colloquism that means annoyed, pissed of, in a general bad mood with someone or something.

To say “He’s got the ‘ump” means that the person who has the ump is in  a bad mood with you or is being deliberately vindictive for some reason unbeknown to you (usually unknown but not restricted to).

So I’ve got the ‘ump.  I spent ages learning server controls, and went on a sharepoint course for developing web parts.  Only to discover after lots on intensive research on sharepoint that most of the customisations I will need to do, in order to gain best advantage of sharepoints built-in capabilities, I need to use some god-awful hack of “language” called CAML.

Presently I hate sharepoint, some of it is great, but when you have to convert all your existing “webparts” from another portal technology to SPS and do massive customisations to style and layout to SPS/WSS.  I mean the kind of changes that will cease to work on installation of a service pack and the hours your going to spend regression testing you changes against the service packs.

I hate it because half of this product is ONE BIG USELESS HACK, I mean up to 146 seperate files to edit to modify the banner, are you taking the mick, MS.  Half the product well CSS’d the other hardcoded into the base aspx file.  I would happily love to kick the WSS developers backsides up and down Redmond and down to Tacoma for some of them.

Still by the end of this If all the predictions on how big Sharepoint is gonna be, I will be immensly employable.

In my own opinion of course, based on my small amount of exposure, please dont sue me.

The Woe

Love the name for the problem they describe here, we all suffer the woe now and again

http://spaces.msn.com/members/mwadams/Blog/cns!1pAMOzaH98ZfHK1uhQS5Bd5g!111.entry

Sharepoint webservices