in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

codeandstuff's blog

  • Configuring my MOSS to work with email enabled lists - testing the instructions!

    There is a great paper by Steve Smith which you can find http://www.combined-knowledge.com/Downloads/Moss07incoming_e-mail.pdf on how to make email enabled lists work with Exchange. Lets try it out! 

    This is my quick write up of making sure I could get my MOSS installation working with email enabled lists with Exchange running in the domain. I have a "Proof of Concept" domain where I can play to my heart's content and not worry about blowing up production services.

    Infrastructure:

    1) MOSS server - this is a web server configuration single box provides all services.

    2) SQL 2005 - has all databases on including MOSS

    3) Exchange 2003 server - single box provides all things Exchange including OWA (which is how I tell email in this POC domain).

    Normal users receive email within the domain as: user@poc.local

    I want the MOSS server to respond to listname@moss.poc.local or something similar.

    First step is to get the exchange server up and running - hasn't been booted for a few months!

    I then add the OU to the top of my domain as in the guide.

    The next step is to configure DNS. Hmm...My normal DC doesn't seem to have the DNS admin tool - wierd. Ok install that, start it up and look at my DNS.

    Add a new MX record (check!), log in to my MOSS server.

    Arh. Need to add SMTP services.

    Ok, start the IIS console (again!) and configure the SMTP service as per the guide. I've set mine SMTP server up for open access (it's not Internet connected).

    Click on incoming email settting in the central console and configure as per guide and substituting my server names and domain names as appropriate.

    I then go to a test list and set it's email address to be mytestlist@moss.poc.local

    We're now ready to test! Wow. Ok, start an OWA session up and try emailing into the list. Well a good sign is that I don't get an undeliverable come back straight away. Has the email arrived?

    No. Ah. Ok what do we do now? Have a quick look at event logs seems a good idea. Nothing in Exchange or MOSS logs.

    Looking in Exchange Queue's I can see two email waiting to be delivered to my moss.poc.local domain.

    My server name and my mail domain names do not match (unlike the example). I shall add an alias in the SMTP settings to match the domain that Exchange is trying to send to (in my case moss.poc.local).

    Now my SMTP will respond to moss.poc.local as well as cvhpocmoss20072.poc.local. I give the service a quick restart just in case and force a connection from Exchange. Not good.

    Lots of head scratching later. Ok, check over check list. I have created an SMTP connector. Hm..lets make it use smart connectors and give it IP address of MOSS server. Ooo. Mail now gets delivered!

    And there is is in my Shared Doc library - yay!

    A fabulous guide, you need to know a bit about SMTP, Exchange and DNS as well as MOSS to get it working but not that bad at all really.

     

     

     

     

     

  • Nice Article on Sharepoint and ASP.NET debugging

    Always nice to see a well written set of tips. These are good ones. I've never come across Fiddler before either!

    http://blog.thekid.me.uk/archive/2007/07/25/debugging-tips-for-sharepoint-and-wss-exceptions.aspx

    I must get my feeds updated with more good quality blogs!

  • Document Library "Send to" copies a bit broken.

    I do like the new document library "send to" feature. That option that I know will be used in our organisation (once we train the users!) is the send to another document library.

    But is it just me or does it have a number of flaws? It's almost there but not quite. A concrete example:

    1) A team is working on a collaborative document and then wishes to publish to a common repository for the rest of the business. This document will undergo periodic revision but have an internal review before it makes it live.

    2) The sharepoint admin sets up the team collaborative site and the common repository site.

    3) The authoriser of the document publishes the document to the common repository once authorised.

    Problem number 1: When the user selects the option in "Prompt the author to send out updates when the document is checked in? " it doesn't work.

    If we do explicit check in/check out nothing happens or if we do saves and hence implicit check-in.

    Problem number 2: If we then edit the copy directly the linkage starts to go very funny. I've then gone back to the source and recopied (by using exiting copies menu item) and now I have two links to the same location! Bravo.

    Problem 3: We delete the source document, the "linked" documents still have the "go to source" link in the menu. Clicking this of course generates an error for the user. These symbolic link files really should be done properly. Deleteing the source should either delete all the copies (if we are going for the master / copies metaphor this is the winner) or they should break the link. Possibly with a warning to the user before they delete.

    Problem 4: A link to a link. This occurs if you "send to" a dc lib and then "send to" a second doc lib. All well and good and valid. The issue comes if you push the original, it doesn't know about the further links. The act of overwriting the "middle" version removes the metadata that says "oh by the way you have some copies out there at these URLs". The link in the 3rd copy still points back at the middle of course.

    Good but not perfect. Its like sym links have never been invented and somebody is coming at this problem from fresh.

  • Default Locale of Sites are wrong

    It seems everybody is suffering with this. There are a number of posting about how to hack the DB to change the default locale from 1033. Nothing is guaranteed to wind up the users more.

    I thought I would check (for my own sanity) what the locale settings are on my servers and just try to bottom out a misconfiguration issue ahead of assuming it is a bug.

    MOSS should have inherited the locale setting correctly shouldn't it? Time to go and check what is going wrong.

    1. Check the Time zone setting on at the web application level (in Manage Web Application Settings). Yes, set correctly.
    2. Check the locale of the computer. This is set correctly in Regional settings control panel applet. Yes, also set correctly.
    3. The Microsoft help (http://office.microsoft.com/en-us/sharepointserver/HA101774731033.aspx) refers to the default language of the site collection. Right. How exactly do I set that then? Well you can't from the UI. What you can set is the regional setting on a per site basis and you change the top level site and then all new sites will inherit this setting. Old sites will retain their locale settings. You can do this for portal sites and team site site collections.
    4. Ok, browse via the Site Settings or http://siteurl/_layouts/regionalsetng.aspx URL. Don't forget to check the "subsites inherit these regional settings" if you see it (portal).
    5. Ok, the Site Collection root site now has the correct locale and new sites do indeed inherit correctly. That stinks. Why was "English (US)" the default locale in MOSS when it wasn't anywhere else?
    6. Are all Site Collections similarly flawed? What locale is the My Site? Broken. Not very surprising but what a pain. My sites are really flawed (each my site is a site collection hence all users have to reset locale manually!)
    7. Is this just as bad if you are French, Swedish, etc or just a pain if you are a "non-US English" English speaker?

    Apparently it is. I just found the following thread. http://suguk.org/forums/2/3774/ShowThread.aspx

    Bah.

  • Writing Custom Webparts Article

    Nice article covering the basics. Covers the same steps that the VS2005 extensions do so good for understanding some of the under the hood aspects.

    http://www.codeguru.com/csharp/.net/net_asp/webforms/article.php/c12293__1/

     

  • Modifying Mysites in MOSS2007

    Great article on how to modify the "out of the box" MySites across the organisation using Master pages, custom server controls and features.

    http://blogs.msdn.com/sharepoint/archive/2007/03/22/customizing-moss-2007-my-sites-within-the-enterprise.aspx

     

  • Sharepoint Designer Training Videos

    Sure I'm not the first to post these!

    http://office.microsoft.com/en-us/help/HA102199841033.aspx

    Basic stuff but if you've used Frontpage / Visual Studio will give you a feel for the new tool.

  • Son of Smartpart article repost

    Articles disappeared in the snafu that occured on sharepointblogs.com recently. So this is just the text of the article I wrote on Son of Smart Part.

    ASP.NET 2.0 User Controls in WSS

    I thought I would try out the excellent Son of Smartpart by Jan Tielens. http://weblogs.asp.net/jan/

    This is a good all over project:
    1) I get to upgrade a WSS server to .NET 2.0
    2) I get to try out Son of Smartpart (I used Smartpart previously)
    3) I get to try out some of the new ASP.NET 2.0 functionality (yay!)

    As a project I thought I would re-develop the "display as HTML table all sites from a server". My current implementation is great from an "easy to do as a non-coder" point of view but isn't great from a "yes but it reads the WSS Db directly".

    Step 1) Download Son of Smartpart. Home page for Smartpart is http://www.smartpart.info/
    Step 2) Take a backup of the VM I plan to do this work on ;)
    Step 3) Upgrade to .NET 2.0 runtime. http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&displaylang=en
    Step 4) Make a cup of tea...
    Step 5) Go and install WSS SP2 (Oops! - too many VMs!)
    Step 6) Follow SonOfSmartpart installation instructions.
    Step 7) Add the supplied test user control (SmartPartTest.ascx) to the userControls directory.
    Step 8) Add a SmartPart UC webpart, then add the user control via the tool pane. You should now see a Calendar control. Yay!
    Step 9) Re-install IIS since it seems to have broken since VS2005 was installed. Didn't figure out the issue, went brute force.
    Step 10) Create a new web project
    Step 11) Add a new user control
    Step 12) Add a reference to Sharepoint and SonOfSmartPart assemblies.
    Step 13) Inherit from and implement SonOfSmartPart.IAdvancedUserControl
    Step 14) Add a DataGrid, I want a URL field, Title, Description and Request Access Email Column
    Step 15) Turn off auto generate columns
    Step 16) Add a hyperlink column, two bound columns and a template column (with a hyperlink control for the mailto).
    Step 17) On the page load create a table, load the data using the SPGlobalAdmin object (we want all sites available from that server), bind to the data grid and we're done!
    Step 18) Copy control ascx and .cs files to UserControls directory, set binding in tool pane to be my control and job done.

     

     

     

  • VMware and Vista

    Error when installing Vista in VMWare: "A Required CD/DVD device driver is missing. If you have a driver floppy disk, CD, DVD or USB flash drive, please insert it now."

     

    Good bit here http://blog.eweek.com/blogs/eweek_labs/archive/2006/11/09/14521.aspx if you get the Invalid CD/DVD device driver issue.

     

  • MOSS2007 in one domain authenticating with another domain problems - lesson to be learnt in DHCP/DNS

    I have a VM MOSS2007 server nicely sat in my POC domain. It works very nicely if I remote into the box.

    Not much good to me though - I want users in our live domain to be able to log in and try things out over a conventional browser.

    Typically in the past when I've had these kind of issues it is often the time sync between the two domains.

    Remoting into the MOSS server and doing a net time /domain:poc shows me that it has bound onto a VM DC rather than one of my physical ones. I try to remote into the DC using my live domain credentials "trust relationship with trusted domain could not be verified". Ooo that's a good one!

    Ok, just because I'm running out of ideas I shut down the VM DC, remove the MOSS from the domain and re-add it. It goes back in straight away no issues.

    Great! Just to check I do a net time/domain:poc "No domain controller can be contacted".

    Ok somehting very strange is now happening. I can't see the POC domain controllers? I can't see the live domain in the modify local groups dialogs. Hmm.

    As a further experiment I do a runas notepad with credentials from the live domain. It runs. Ah. That's the final clue.

    So it can see live DCs but not poc DCs. This is a FQDN issue!

    The POC servers are actually fed their IP addresses via DHCP from the live domain except for a few static servers such as DCs, SQL servers, etc. Generally this isn't an issue but why is it now?

    The reason is that previously I built all my VMs from a pre-rolled server and used NewSID to noble the new server. It caused me some issues with a beta of MOSS earlier on so this VM I decided to build from scratch.

    Solution: Very simply add the poc domain suffix to the list of suffixes used in the DNS tab of the network settings.

    All problems resolved and users now happily creating WIKI sites and the like.

  • Easier way to add a DLL to the GAC

    Add a right click context menu entry:

     

    From Isaac Ferreira's blog:

    http://biztalkia.blogspot.com/2005/12/easier-way-to-add-dll-to-gac.html

    Repeated below for convenience:

    "A registry key can be created which allows you to right click the DLL and “GAC it” in one click.

    The text for the key is below; simply copy/paste it into notepad and save it as a registry file (.reg). Then double click the file to add it to the registry.

    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOT\dllfile\shell\gacutil\command]
    @="c:\\windows\\Microsoft.NET\\Framework\\v1.1.4322\\gacutil.exe /i \"%1\""

    "

  • Happy New Year. Another present released open source

    I've posted a small program to gotdotnet. This program generates signature files for users based on templates and Active Directory. Very simple, designed to be easy to deploy (with SMS for example) and have no adverse impact on Exchange infrastructure.

    http://codegallery.gotdotnet.com/mailsigs

     

  • Happy Christmas from me.

    I've been working with my current client to release a great deal of what I do as open source.

    This is just announcing that I have just finished uploading the complete Interim Electronic Records Management System to http://sourceforge.net/projects/erms-rma.

    This system is designed to be a light weight records management capability. You can keep records safe from the users and certain small amounts of metadata are added during creation of the records.

    I hope to release my WSS security migration tool early next year.

  • Running all team sites underneath one team site rather than using sites collections

    Here's an interesting "thing" that I'm sure is going to become more interesting as the team sites uptake increases.

    In our live configuration we used to have three sites collections (http://server/sites/... http://server/demos/... and http://server/training/...).

    One of the large scale maintainance jobs last year was rename server to server.example.com so users access their team sites via the FQD url. e.g. http://server.example.com/sites/...

    This is where it gets a bit confusing. To migrate the content from one server to another we used smigrate and reapplied all security by hand - but what we didn't do is recreate the site collections. What we actually did instead was to create a team site at that location. i.e. if you browse to: http://server.example.com/sites in our location you see a blank team site. It doesn't belong to a user because its a fill in site collection.

    So in effect ALL of our team sites are no children of the root team site. i.e. if you browse to http://server.example.com in our location you can then hop to all team sites via the manage sites and workspaces links. (or any other navigation web part you may have written :) ).

    So the big question here is what kind of impact on performance might this have? The only reference I have found so far is this from MSDN. Pertinent bit repeated below:

    "

    SharePoint Site Isolation: Separate Sites

    Windows SharePoint Services also supports multiple subsites and workspace sites within a single site collection. Windows SharePoint Services can host up to 250,000 subsites within a given site if the subsites are organized into folders of no more than 1000 subsites each.

    The upside of this configuration is seamless navigation around the site collection. There is no built-in navigation from one site collection to another, but there is navigation from one subsite to another within a site collection.

    The downside is reduced scalability - because all sites must be stored in the same content database, it is difficult to increase either storage capacity or throughput. Also, as with site collections, separate sites are vulnerable to cross-site scripting attacks from other sites within the domain."

    Hence as long as I limit myself to 1000 subsites below the top level site we'll be "ok" and can scale to 250,000 sites (should be plenty!)

     

    Comments very welcome from anybody else who has looked at this

  • Using Son of Smart Part with ASP.NET 2.0 on WSS 2.0 - lets see if it's easy or not

    Small article about my small adventures in upgrading a WSS server to .NET 2.0 and using Son of Smartpart to create a new webpart.

    http://www.sharepointblogs.com/codeandstuff/articles/4337.aspx

    Overall verdict - great job Jans - great work much appreciated.

  • C# generics...hm; not bad but not great

    I was trying out some basic generic stuff and I have some issues, I'm willing to believe they maybe me misunderstanding something...

    IEnumerator.Reset doesn't seem to work at all with a generic enumerator. I've tried with List<T> and LinkedList<T>. I would love to hear form anybody who can tell me what I'm doing wrong. Template iterators are great, generic Enumerators are looking a bit flawed.

    LinkedList<string>.Enumerator itt = list1.GetEnumerator();

    while( itt.MoveNext() )

    Console.WriteLine( itt.Current );

    (itt as IEnumerator).Reset();

    while( itt.MoveNext() )   <--- nothing comes out here and in debugger we see itt doesn't infact reset

    Console.WriteLine( itt.Current );

    If we change the code to take a copy first:

    IEnumerator i = itt;

    i.Reset();

    We also see that i really is a copy and not some kind of shallow copy with a deep shared object.

    Also, one the great things about Templates is that you could typedef away the actual type you initially choose and most of the code is the same. That way if you want to move between a vector<T> and a list<T> you pretty much can. The important operations are exactly the same, push_back(), begin(), end(), etc.

    Here though there are key differences:

    List<T>.Add

    LinkedList<T>.AddLast - argh!

    List<T>.ForEach( Action<T>( foo ) )

    LinkedList<T>.ForEach( Action<T>( foo ) ) <--- nope ForEach only works for Lists and for Arrays.

    I like the functor implementation:

    list1.ForEach( new Action<string>( output ) );

    Console.WriteLine( "member ForEach Action<>( functor )" );

    Functor fun = new Functor();

    list1.ForEach( new Action<string>( fun.foo ) );

  • VS 2005 Auto format options

    I've been playing around with the auto format options. I can see why the dev team have added them - this kind of thing is the subject of many a flame war. Just to get the flames going:

    Am I the only one who thinks the default choices are really very arbitrary? It caught me quite by surprise when it deleted spaces that I had wasted literally milliseconds on inserting...

    Also, and this is a real gripe, some of the things are either "I will insert the spaces if you haven't typed them" or "I will remove the spaces if you have typed them" and there aren't many that are "On this thing just leave whatever I type alone".

    Tools->Options->Text Editor

     

  • Moving a site from one server to another

    I suspect I may be teaching you all how to suck eggs with this one...

    The issue we had here was a set of web parts and, more importantly, web pages developed on a development server needed deployment to the next stage of testing.

    Installing the web parts was no issue - I had previously packaged them up with wppackager, the major issue here was how to recreate the various web part pages with the web parts configured correctly.

    The best I could do was use smigrate/frontpage to create a backup of the team site and then restore that to the new URL. Seems to be a pretty good technique. I had to manually change some configuration options for database connection strings and the such but apart from that it saved a lot of manual work!

  • Can not add the user because a user with that name already exists ...

    Ever come across this one? I suspect most admins have at one time or another. Mike Walsh has documented the fix http://wss.collutions.com/Lists/FAQ/DispForm.aspx?ID=170. However, I do think the Microsoft KB article adds some useful info. http://support.microsoft.com/?kbid=893696&FR=1.

    Why does this occur?

    1. You create a user account in the Active Directory directory service.
    2. You add the user to the portal site or to the Windows SharePoint Services Web site.
    3. You delete the user account from Active Directory. You then create a new user account that uses the same logon name as the user account that you deleted.
    4. You try to add the new user account that you created in Active Directory.

    Does beg the question though - how many different ways do they want us to manage our users!

     

  • Good posting on preconfiguring VMs for sharepoint working.

    http://weblogs.asp.net/bsimser/archive/2005/11/23/431397.aspx

    The only thing I would add to "list of essential tools" is NewSid from sysinternals. http://www.sysinternals.com/utilities/newsid.html

  • Creating a simple table of all sites available on your WSS servers.

    I've added a small article on how to create a simple HTML table with a list of all sites on your WSS server.

    http://www.sharepointblogs.com/codeandstuff/articles/4256.aspx

  • Hi blog land

    This is my first posting ever and I thought I would include a little about myself.

    I'm currently working as an Enterprise Architect for the Learning and Skills Council in England. The LSC funds Further Education (but not Higher Education) in England. In my role, I do a lot of "hands on" investigative work, original development work, analysis of wider systems design and similar. An interesting and varied role...


Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts