<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-11781538</id><updated>2012-01-26T07:22:34.616-05:00</updated><category term='SharePoint'/><category term='NonTechnical'/><category term='ISA Server'/><category term='DR'/><title type='text'>Steve's SharePoint Stuff</title><subtitle type='html'>My virtual memory pages...who can remember all this stuff??</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>41</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-11781538.post-5187349624888278691</id><published>2012-01-26T07:21:00.000-05:00</published><updated>2012-01-26T07:21:13.705-05:00</updated><title type='text'>SharePoint 2010 - Access is Denied, and I'm Site Collection Owner!</title><content type='html'>Had an interesting one yesterday.  I finally got around to clearing up those annoying warning messages about the Cache Super Reader account in my Windows Event Viewer logs on one of my servers.  I used the stsadm command to set the property for both the Cache SuperReader and SuperUser accounts, good to go - or so I thought!&lt;br/&gt;&lt;br/&gt;Came in the next morning to find the server still up, but no one able to access any site collections on the web application where I set those accounts!  SharePoint came back with Access is Denied, even though it was all fine yesterday, and the users were set up as Site Collection Owner through Central Admin.  The logs didn't show a whole lot, other than an issue with Kerberos and the Services account I'm using - odd.&lt;br/&gt;&lt;br/&gt;Knowing the last thing I changed was that cache account, I double checked the values, ran the PowerShell script referenced in the very good article &lt;a href="http://www.microsoft.com/download/en/details.aspx?displayLang=en&amp;id=12768"&gt;SharePointServerCachesPerformance.docx&lt;/a&gt; - highly recommended read!  The issue for me turns out that those accounts weren't added correctly in the User Policy for the web application.  I repeated this on a dev box this morning, and verified indeeed you have to make sure your User Policy settings are correct:&lt;ol&gt;&lt;li&gt; Open &lt;i&gt;SharePoint Central Admin&lt;/i&gt;&lt;/li&gt;&lt;li&gt; Click on &lt;i&gt;Application Management&lt;/i&gt;&lt;/li&gt;&lt;li&gt; Click &lt;i&gt;Manage web applications&lt;/i&gt; under Web Applications&lt;/li&gt;&lt;li&gt; Select (single click) the web app having issues (or better yet do them all while you're here!)&lt;/li&gt;&lt;li&gt; Click on the &lt;i&gt;User Policy &lt;/i&gt;icon in the ribbon&lt;/li&gt;&lt;li&gt; Click &lt;i&gt;Add Users&lt;/i&gt;&lt;/li&gt;&lt;li&gt; Click &lt;i&gt;Next &lt;/i&gt;to select the zone, go with the default All Zones&lt;/li&gt;&lt;li&gt; Enter in the account of your SuperReader user, and grant this account Full Read permissions, then click &lt;i&gt;Finish&lt;/i&gt;.&lt;/li&gt;&lt;li&gt; Repeat this for the SuperUser user, but grant this user Full Control.&lt;/li&gt;&lt;li&gt; iisreset - and let those users log in!&lt;/li&gt;&lt;/ol&gt;&lt;br/&gt;Happy 2012!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-5187349624888278691?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/5187349624888278691/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=5187349624888278691' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/5187349624888278691'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/5187349624888278691'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2012/01/sharepoint-2010-access-is-denied-and-im.html' title='SharePoint 2010 - Access is Denied, and I&apos;m Site Collection Owner!'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-7639683552482061999</id><published>2011-12-28T16:16:00.004-05:00</published><updated>2011-12-28T17:26:20.181-05:00</updated><title type='text'>Road trip</title><content type='html'>Here we are at the end of December &amp; I realize I have been a neglectful blogger in 2011!  I promise I'll get a post on SharePoint Web Templates before the end of the year, but I still have vacation on the mind for now...just back from two weeks in China with the family.  The most indespensible tool of the trip: the iPhone 4g!!&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;iPhone in China&lt;/h3&gt;&lt;br /&gt;For those of you planning a trip to China, the news is yes, your iPhone will work just fine.  I signed up for a 125MB data plan with AT&amp;T before we left, then once the plane landed &amp; we were through immigration, I powered up the phone, and it connected straight away to China Unicom.  Note, in two weeks I used 180MB of data, even with many of the hotels having wireless access - so sign up for more than you think you'll need.  125MB cost me $49.95, we'll see what the extra 55MB is going to set me back!  Apparently it would be prorated for the amount not used, so think big.&lt;br /&gt;&lt;br /&gt;There were a few iPhone apps I found particularly helpful - the &lt;a href="http://www.exploremetro.com/iphone/apps/shanghai/"&gt;Explore Metro&lt;/a&gt; subway navigation maps were fantastic - I downloaded the Shanghai &amp; Beijing versions, very helpful for route planning, finding the closest metro station, and knowing the fares, especially in Shanghai where fares vary by distance.  These apps are $2.99 each but are well worth it.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.tripadvisor.com/MobileApps"&gt;TripAdvisor's app&lt;/a&gt; was also helpful for showing restaurants &amp; attractions based on my current location, and being able to search by type.  I used the hotel's wireless connection with the laptop to write reviews on the TripAdvisor web site.&lt;br /&gt;&lt;br /&gt;The navigation &amp; GPS capability of the iPhone itself was the most helpful of all.  I was able to plug in an address in English (pinyin) &amp; it would find the location just fine, then I'd be able to use the live navigation to make sure we told the taxi driver the right place!  On one trip the taxi driver used it to help us find the hotel - the street names were shown in Chinese characters as well as pinyin.  Maps worked just fine, had a lot of the points of interest already on the map, so easy to find them.&lt;br /&gt;&lt;br /&gt;On the map, tap the location indicator twice and the phone display orientates itself to a relative, compass based setting.  So now you know which way to head to get to the nearest Starbucks, is that useful or what!!!&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Subway &amp; Train Travel&lt;/h3&gt;&lt;br /&gt;If you're planning on traveling between cities, the train system was really convenient, reasonably priced, comfortable &amp; on time.  There's an app to help understand &lt;a href="http://itunes.apple.com/us/app/itravchina-for-train/id387830653?mt=8"&gt;train schedules&lt;/a&gt;, really good.  Armed with the "G" train number and time of departure, we were able to purchase tickets knowing the time &amp; price before getting to the counter.  &lt;br /&gt;&lt;br /&gt;How the subway systems in Beijing &amp; Shanghai work:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;The Beijing subway system has single trip tickets available.  Buy then at your departing station for 2 RMB per person.  The fine print: you can only use the ticket to depart from the station where you purchased the ticket...so don't be clever like we tried to be by buying the return ticket at the same time, figuring you'd save hassle later.  No go. &lt;br /&gt;&lt;li&gt;Shanghai's train system is a bit more complicated because fares vary by distance.  Here you can purchase a 20RMB stored fare ticket, then just make sure you have enough stored up.  The station booth can deposit funds onto the ticket, no problem, and the entrance gates show how much fare remains.  When you're ready to leave, you can cash in the ticket, again at the station where you purchased them.  We were able to cash in the ticket at the Shanghai Railway Station at a convenience store, it was a bit complicated though!&lt;br /&gt;&lt;li&gt;Use the ticket with the entry gate (slide it in for the day tickets or touch with the stored fare tickets), then use the same ticket to exit.  The day tickets will be stored in the reader.&lt;br /&gt;&lt;li&gt;Get to the station platform &amp; decide which train to use - use your handy iPhone app to determine the previous &amp; next stations, then look to see the directions for the trains indicated &amp; hop on.  There's a TV that shows when the next train will be arriving.  &lt;br /&gt;&lt;li&gt;Station announcements are made in Mandarin &amp; English &amp; are very clear.&lt;br /&gt;&lt;li&gt;The trains in Shanghai &amp; a few in Beijing have LED indicators showing where the train is between stations &amp; which station is next.&lt;br /&gt;&lt;li&gt;Dig the animation displays in the tunnels in Beijing!&lt;br /&gt;&lt;li&gt;If a seat opens up - don't think, go for it!!  This is a serious you snooze, you lose situation!&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Other Impressions&lt;/h3&gt;&lt;br /&gt;It's been 9 years since we were in China last, and the pace of change in that time was remarkable.  In Shanghai, we saw a Bentley dealership, apparently they are completely sold out through next year's production.  Saw a lot of Maseratis, Porche Panamera's, 7 Series, you name it.  Now the country side from the train still looked about the same, but I kept an eye on the phone the whole 5 hour trip from Beijing to Shanghai &amp; had a solid 5 bars of signal the whole way.&lt;br /&gt;&lt;br /&gt;Food prices were higher than we remembered.  Going to dinner at a not-so-fancy place, in a somewhat touristy area, dishes ran from $3.50 for my favorite Yang Zhou Fried Rice, $10 for a delish dish of beef and Chinese broccoli, up to $25 for a "gui yu" sweet and sour fish.  Mind you it was mighty tasty, but those prices are about what we'd pay here in the States...but our incomes are much higher in proportion.  In a not so touristy area, I paid $15 for three bowls of noodles and a plate of veg, so I guess it does depend on where one goes.&lt;br /&gt;&lt;br /&gt;Be prepared to reign in your personal space needs!  There's a lot of people there, and the American bubble of space is much much larger than that of a typical Chinese!  Expect to rub elbows &amp; be gently nudged out of the way without an excuse me.  Just the way it is, and it does work.&lt;br /&gt;&lt;br /&gt;We bought some baby Mandarin oranges in Beijing &amp; Shanghai, dang they were good!  Great strawberries also.  &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Bargaining&lt;/strong&gt;...it's all part of the program.  Except in department stores, prices are negotiable.  If you overhear someone buying the scarf of your dreams for 100RMB, when it's your turn the shop keeper will swear over their entire ancestores they never sold such a scarf for a measly 100RMB.  Just be prepared to walk away...they'll come after you, but if the price still isn't what you want, really, walk away.  The next vendor will have the exact same scarf at the price you want.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Hotels&lt;/strong&gt;...the thing now seems to be glassed in bathrooms!  Since how to put this delicately, when I'm enthroned I do like my privacy, there are shades to block the view.  Goofy!  Five star hotels are very nice indeed, but try some of the four star Chinese brands for a slight change of pace.  If you can see if you can get breakfast included - at one five star, breakfast was RMB138 per person, so if that's included it'll save you some cash.  If not included, go find a "Yong He Da Wang", get a bowl of fresh soy milk &amp; some of those "yo tiao" doughnuts, and you'll have enough calories to keep you til the noon dumpling or noodle soup feed.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Money exchange&lt;/strong&gt;...ATMs are now everywhere.  The five star hotels we stayed in had money conversion machines - feed in your USD bills and get RMB back.  This was convenient but expensive...the better bet is to take your greenbacks to a Bank of China office.  Took us about 40 minutes at the BoC branch off People's Square in Shanghai, took about 15 minutes at the branch south of Tiananmen on Qianan Street.  Same exchange rate for cash or traveler's checks now too, it seems.&lt;br /&gt;&lt;br /&gt;Lastly, &lt;strong&gt;English&lt;/strong&gt;...yes, there is plenty of English spoken, and be prepared to see people listening in to your chats on the subway &amp; at restaurants, no worries it's just curiosity!  At the same time, be armed with some basic Mandarin (or get the &lt;a href="http://itunes.apple.com/us/app/learn-chinese-mandarin-phrasebook/id435064887?mt=8"&gt;LearnChinese app&lt;/a&gt; &amp; let it talk for you) to make things easier.  For instance, "yi ge zhe ge" is your friend for pointing to a picture on a menu &amp; asking for that item. &lt;br /&gt;&lt;br /&gt;Needless to say yes we did enjoy our trip quite a bit.  Our daughter really enjoyed it, she's a big fan of nui rou tang mian, had that for six straight meals &amp; could keep going.  Oh, one last thing...&lt;strong&gt;kudos to Delta Airlines&lt;/strong&gt; for the seatback TV entertainment system - 13 hours of TV kept the daughter's attention with no fussing at all.  Even some younger kids were parked still staring at Handy Manny for 13 hours.  Even some, ah, older kids totally dug watching 2001: A Space Odyssey, Midnight in Paris, Harry Potter IV - 7 (could have seem them all &amp; the LOTR trilogy), Tron:Legacy, and more!!&lt;br /&gt;&lt;br /&gt;OK enough for now - next post will be about SharePoint web templates, promise!&lt;br /&gt;&lt;br /&gt;Zai jian!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-7639683552482061999?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/7639683552482061999/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=7639683552482061999' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/7639683552482061999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/7639683552482061999'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2011/12/road-trip.html' title='Road trip'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-3683448200820929058</id><published>2011-04-08T11:23:00.003-05:00</published><updated>2011-04-08T11:26:57.213-05:00</updated><title type='text'>Referencing resources in SharePoint libraries</title><content type='html'>Wow, my first blog posting for 2011 - yes I have been busy, and neglectful!  &lt;br /&gt;&lt;br /&gt;One thing that's kept me busy is working with jQuery &amp; SharePoint - very good stuff.  But I have my jQuery js's and style sheets in a SharePoint document library.  When I tried referencing them, I kept getting errors on the page...&lt;br /&gt;&lt;br /&gt;because, I wasn't referencing these as:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&amp;lt;script src="./Jquery/jquery.tools.min.js" type="text/javascript"&amp;gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Note the "." before the library name - that's what was missing.&lt;br /&gt;&lt;br /&gt;Back to it!  See ya!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-3683448200820929058?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/3683448200820929058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=3683448200820929058' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/3683448200820929058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/3683448200820929058'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2011/04/referencing-resources-in-sharepoint.html' title='Referencing resources in SharePoint libraries'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-5310634050389021024</id><published>2010-10-25T12:20:00.002-05:00</published><updated>2010-10-25T12:32:08.725-05:00</updated><title type='text'>DoDN Source &amp; Presentation</title><content type='html'>Thanks for coming to Western Michigan's Day of Dot Net this past Saturday!  The session went well, had some good questions about the configuration of a SharePoint developer's rig that I'll address in some detail in a subsequent post, but wanted to get this posted first.  It's the presentation deck and the source code for the demos.  The source code is all built for Visual Studio 2010.  If you have access to the Expression Blend tools, all the better, but for the demos Visual Studio will definitely do the trick.&lt;br /&gt;&lt;br&gt;&lt;br /&gt;Here's the link to the zip file:  &lt;a href="http://cid-7116eeb3c8a9acf8.office.live.com/self.aspx/Public/DoDN/DoDN-SharePoint-Silverlight.zip"&gt;DoDN-SharePoint-Silverlight.zip&lt;/a&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;Note that for the third demo, you'll need to host the compiled .XAP file in a SharePoint site that has a list named DayofDotNet.  There's a .STP file (a SharePoint List Template file) you'll need to use to create this list, so that it has the fields &amp; content the code is looking for.  Post a comment or email me if you get stuck.&lt;br /&gt;&lt;br&gt;&lt;br /&gt;Thanks again for attending!&lt;br /&gt;&lt;br&gt;&lt;br /&gt;Steve &amp; Charles&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-5310634050389021024?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/5310634050389021024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=5310634050389021024' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/5310634050389021024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/5310634050389021024'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2010/10/dodn-source-presentation.html' title='DoDN Source &amp; Presentation'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-7291749261584831530</id><published>2010-10-07T09:47:00.002-05:00</published><updated>2010-10-07T10:09:54.617-05:00</updated><title type='text'>Visual Studio 2010 &amp; Crystal Reports - change server at runtime</title><content type='html'>What?  This isn't a SharePoint topic!  You're right...every so often have to stretch a little bit.&lt;br /&gt;&lt;br /&gt;So I have an ASP.Net web app and needed to add in a report.  I didn't want to hand code it, and I had looked at using Crystal Reports for a different project &amp; liked how nicely it integrates with Visual Studio.  EZ-PZ to deploy it to the server, just install the runtime, deploy the project and we have reports!&lt;br /&gt;&lt;br /&gt;Then came time to get the project up to production.  I installed the runtime for Crystal Reports, clicked the Report link,and got the dreaded Database Login failed.  Hmmm - I had updated the web.config appsettings to point to the Production SQL Server instead of my dev box.&lt;br /&gt;&lt;br /&gt;That wasn't enough.  Found a few entries suggesting to use the CrystalDecisions ConnectionInfo class, then another page saying to apply this change to all of the tables &amp; subtables on the report, but that didn't help me - still got that logon error.&lt;br /&gt;&lt;br /&gt;I ended up going the route of populating a data table with my report data, then using this table in the report - made things easier.&lt;br /&gt;&lt;br /&gt;One other twist, I then needed to export this as a PDF, but I have SSL enabled; had to add in a few more lines of code.  Take a look!  And yes, this is VB.Net - it's an inherited project, too many lines to convert over!&lt;br /&gt;&lt;br /&gt;            Dim dt As DataTable&lt;br /&gt;&lt;br /&gt;            dt = BindReport()&lt;br /&gt;&lt;br /&gt;            rpt.SetDataSource(dt)&lt;br /&gt;&lt;br /&gt;            Dim reportDate As DateTime = Session("CurrentPayPeriod")&lt;br /&gt;&lt;br /&gt;            ' Tell the browser this is a PDF document so it will use an appropriate viewer.&lt;br /&gt;            Response.Buffer = True&lt;br /&gt;            Response.ClearContent()&lt;br /&gt;            Response.ClearHeaders()&lt;br /&gt;            Response.ContentType = "application/pdf"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            rpt.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, False, "Timesheet Report")&lt;br /&gt;&lt;br /&gt;        Dim conString As String = System.Configuration.ConfigurationSettings.AppSettings("connectString")&lt;br /&gt;        Dim con As SqlConnection = New SqlConnection(conString)&lt;br /&gt;        con.Open()&lt;br /&gt;        Dim cmd As New SqlCommand("usp_GetReportData", con)&lt;br /&gt;        cmd.CommandType = CommandType.StoredProcedure&lt;br /&gt;        cmd.Parameters.Add("@SelectedDate", SqlDbType.Date).Value = CDate(Session("ReportPeriod"))&lt;br /&gt;        cmd.Prepare()&lt;br /&gt;&lt;br /&gt;        Dim sqlAdapter As SqlDataAdapter = New SqlDataAdapter(cmd)&lt;br /&gt;&lt;br /&gt;        Dim dtReport As DataTable = New DataTable()&lt;br /&gt;        sqlAdapter.Fill(dtReport)&lt;br /&gt;        con.Close()&lt;br /&gt;&lt;br /&gt;        Return dtReport&lt;br /&gt;    End Function&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-7291749261584831530?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/7291749261584831530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=7291749261584831530' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/7291749261584831530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/7291749261584831530'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2010/10/visual-studio-2010-crystal-reports.html' title='Visual Studio 2010 &amp; Crystal Reports - change server at runtime'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-6509642268337276837</id><published>2010-09-01T12:34:00.003-05:00</published><updated>2010-09-01T12:38:52.569-05:00</updated><title type='text'>Summer 2010</title><content type='html'>Hard to believe it's the last official week of summer - school starts next Tuesday, back to the old schedule!  And hard to believe my daughter's already a third grader, time goes by!&lt;br /&gt;&lt;br /&gt;So what have I been up to lately?  SharePoint 2010 architecture.  Haven't done a ton of coding lately, but I have inherited an ASP.Net application and have another one in the works.  Did some coding with Silverlight &amp; the Client Object Model for 2010 - blog post coming - it is sweet.  &lt;br /&gt;&lt;br /&gt;COM (the new COM, that is) is an EXCELLENT way to continue to deploy code to SharePoint, but do so without having to bug your administrators or your Change Management team.  The code runs on the client, so no consumption of server resources, and the code can do only what the user can do, so the risk of deleting all sites on the farm is minimized.&lt;br /&gt;&lt;br /&gt;Have also been looking at multitenancy.  This is going to be big with 2010 - being able to partition off multiple companies on the same set of hardware, w/o needing completely separate farms.&lt;br /&gt;&lt;br /&gt;Look for more blog entries about all of the above...really...I promise...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-6509642268337276837?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/6509642268337276837/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=6509642268337276837' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/6509642268337276837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/6509642268337276837'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2010/09/summer-2010.html' title='Summer 2010'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-2967003833773630371</id><published>2010-04-12T16:26:00.002-05:00</published><updated>2010-04-12T16:28:35.926-05:00</updated><title type='text'>Visual Studio 2010 web parts and the type could not be found or it is not registered as safe</title><content type='html'>Not the story I'll ready to my daughter tonight, but the tale of a rename gone bad.  When you're creating a web part in SharePoint 2010, and you rename your items from VisualWebPart1 to MyCoolWebPart, perform a Search in the Entire Solution scope for any remaining remnants of VisualWebPart1.  There were a few...fix them up and your web part will register safely just fine &amp; you'll be able to add it to your web part page.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-2967003833773630371?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/2967003833773630371/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=2967003833773630371' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/2967003833773630371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/2967003833773630371'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2010/04/visual-studio-2010-web-parts-and-type.html' title='Visual Studio 2010 web parts and the type could not be found or it is not registered as safe'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-1732231455893659021</id><published>2010-03-12T13:02:00.002-05:00</published><updated>2010-03-12T13:24:21.882-05:00</updated><title type='text'>SharePoint Saturday, speaking on workflow</title><content type='html'>It has been so busy it's about time I've reported this!  I'm giving a talk at SharePoint Saturday in Ann Arbor on 3/13.  The talk will be the SharePoint 2010 Workflow Smackdown.  We'll be taking a look at SharePoint Designer 2010 &amp; see if it's a contender for building workflows, compared to Visual Studio 2010.  &lt;br /&gt;&lt;br /&gt;As a developer, my first inclination is to go to the 'real thing', crack open Visual Studio and build out a new workflow project.  But if my administrator won't let me deploy custom code, then what?  In the 2007 days it would be worth the battle; we could create workflows in SPD 2007 but seemed it was always one action short of what I needed.&lt;br /&gt;&lt;br /&gt;So can SPD 2010 help out?  In short, yes!  It has a lot more capability for workflow development, but I think more importantly it is a tool a (knowledgable) end user could use.  Especially with Visio 2010 as the workflow designer tool, never did like trying to lay out the workflow in SPD 2007, wasn't visual enough.  &lt;br /&gt;&lt;br /&gt;Of course, that does mean that user needs Visio 2010, and SPD 2010.  SPD 2010 will still be free, but Visio of course is licensed.  &lt;br /&gt;&lt;br /&gt;Now, if your environment lets you deploy custom code, and you know your way around .Net development, should you even bother with SPD?  Good question.  I'd have to vote it is worth considering, from a maintenance standpoint.  One of the things us developers always do (me too!) is to create some great crazy code, deploy it, it works, great, and we move on.  But then down the road darn that thing, it's having a problem.  With SPD, because it is declarative, debugging and/or modifying is easier...in fact you could even get that power user to take over!  So it is something to consider.&lt;br /&gt;&lt;br /&gt;With that - here's the link to the presentation:  &lt;a href="http://cid-7116eeb3c8a9acf8.skydrive.live.com/self.aspx/Public/SPS%20Workflow%20Smackdown.pptx"&gt;SharePoint Saturday Workflow Smackdown&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Note that if you want to play around with workflows, I recommend making sure you've first enabled the User Profile Import Service - without it, if you assign a workflow item &amp; wait for the approval to kick in, you'll get a nice REJECTED instead.  No email address.  I also use &lt;a href="http://smtp4dev.codeplex.com/"&gt;SMPT4DEV&lt;/a&gt; to test the email messages - much easier than standing up Exchange!  It's really handy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-1732231455893659021?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/1732231455893659021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=1732231455893659021' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/1732231455893659021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/1732231455893659021'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2010/03/sharepoint-saturday-speaking-on.html' title='SharePoint Saturday, speaking on workflow'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-6117370250025365420</id><published>2010-01-06T10:30:00.002-05:00</published><updated>2010-01-06T10:36:27.292-05:00</updated><title type='text'>Access Denied with SP custom web service</title><content type='html'>This one was bugging me for a while!  I have an application that has a SharePoint workflow, that then calls a custom web service that interacts with the SP object model (long story...has to do with credentials).&lt;br /&gt;&lt;br /&gt;Things were working fine until of late I started getting Access Denied messages when invoking a web service.  In particular, the web service would fail when I tried to intantiate a web object, either through .RootSite or .OpenWeb().  I tried all sorts of combinations of Information Policy settings in Central Admin, switching to a different app pool account in IIS, impersonation in the code, you name it.&lt;br /&gt;&lt;br /&gt;Now, the curious thing was it appeared the 401 Access Denied message was coming from IIS, not from SharePoint.  I could attach to the debugger, and my code definitely was being executed, just failing at that .RootSite/.OpenWeb call.  More curious, switching from Integrated Autheticatio to Anonymous allowed the web service call to work fine.&lt;br /&gt;&lt;br /&gt;Well, I found a reference to an issue introduced by the .Net 3.5 SP1 Framework with the loopback adapter.  Since the web service and the workflow were executing on the same server, I think it was the Framework that was causing the problem, too many repeat calls to the same server.  When I changed the URL for my web service from &lt;em&gt;&lt;strong&gt;http://&lt;myserver&gt;&lt;/strong&gt;&lt;/em&gt; to &lt;em&gt;&lt;strong&gt;http://localhost&lt;/strong&gt;&lt;/em&gt;, the service ended up working fine.  Repeated on a second server hosting the same instance.&lt;br /&gt;&lt;br /&gt;Time to update the deployment documentation!!&lt;br /&gt;&lt;br /&gt;And, happy 2010!  Learned PowerShell yet?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-6117370250025365420?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/6117370250025365420/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=6117370250025365420' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/6117370250025365420'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/6117370250025365420'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2010/01/access-denied-with-sp-custom-web.html' title='Access Denied with SP custom web service'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-7672326524643702499</id><published>2009-11-18T05:59:00.003-05:00</published><updated>2009-11-18T06:21:00.978-05:00</updated><title type='text'>More on SP 2010 &amp; Windows 7 install</title><content type='html'>I was getting a User Not Found error when I tried installing SharePoint 2010 on my Windows 7 host.  The install log didn't let me know which user, and since it's a Standalone install I didn't specify any user accounts anywhere.&lt;br /&gt;&lt;br /&gt;I was installing using my usual corporate domain login on my laptop, but I wasn't connected to the domain at the time (yes, I was installing away during my daughter's dance class I gotta confess!).  The ID was given Administrator permission, and I had UAC turned off.&lt;br /&gt;&lt;br /&gt;The fix was to log on with the local admin account created during the Windows install.  Not sure if it's because this ID really is admin, or if there wasn't a need to contact the domain.  In any case, finally got past configuration task 2 of 10!&lt;br /&gt;&lt;br /&gt;Well not quite, blogged too soon.  The install failed on Step 8 of 10 with: &lt;br /&gt;&lt;br /&gt;Exception: Microsoft.Office.Server.UserProfiles.UserProfileException: Unrecognized attribute 'allowInsecureTransport'. Note that attribute names are case-sensitive. (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebClients\Profile\client.config line 56)&lt;br /&gt;&lt;br /&gt;It looks like there's a hotfix for this, it's a new setting apparently for WCF coming with .Net Framework 4.  To get the hotfix one needs to go through the usual channels vs requesting the fix right off the page, so instead I just deleted the attribute entirely from the .config file, restarted the Configuration wizard, and it completed successfully.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-7672326524643702499?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/7672326524643702499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=7672326524643702499' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/7672326524643702499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/7672326524643702499'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2009/11/more-on-sp-2010-windows-7-install.html' title='More on SP 2010 &amp; Windows 7 install'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-9173095551629935154</id><published>2009-11-17T17:47:00.003-05:00</published><updated>2009-11-17T17:58:04.944-05:00</updated><title type='text'>Installing SharePoint 2010 Beta on Windows 7 or Windows Vista</title><content type='html'>It is indeed possible!  Microsoft has a good set of instructions here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ee554869(office.14).aspx"&gt;http://msdn.microsoft.com/en-us/library/ee554869(office.14).aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Note that the step where you copy the long Windows command needs to be concatenated to one single line.  I copied the text to Notepad, then pulled things back to a single line &amp; it worked fine.&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-9173095551629935154?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/9173095551629935154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=9173095551629935154' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/9173095551629935154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/9173095551629935154'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2009/11/installing-sharepoint-2010-beta-on.html' title='Installing SharePoint 2010 Beta on Windows 7 or Windows Vista'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-6703581060900721506</id><published>2009-11-11T12:12:00.003-05:00</published><updated>2009-11-11T12:22:41.899-05:00</updated><title type='text'>SharePoint 2010 and VirtualBox</title><content type='html'>Others have mentioned this already but I just wanted to give my vote of support also...need to run SharePoint 2010 but only have a 32 bit OS host?  If your equipment can run 64 bit OS (check out your computer's Windows Experience page details report in the "View and Print Details" link - under system there's a setting for "64 bit capable", hope it's a yes!!) - then check out Sun's Virtual Box tool.&lt;br /&gt;&lt;br /&gt;Virtual Box is similar to VMWare, both of which allow you to run a 64 bit guest on a 32 bit OS, provided your computer is 64 bit capable.  Nice! &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.virtualbox.org/wiki/Downloads"&gt;Link to Virtual Box&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now just hang in there a few more weeks until the public beta is released!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-6703581060900721506?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/6703581060900721506/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=6703581060900721506' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/6703581060900721506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/6703581060900721506'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2009/11/sharepoint-2010-and-virtualbox.html' title='SharePoint 2010 and VirtualBox'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-8384481611516489408</id><published>2009-09-14T14:45:00.002-05:00</published><updated>2009-09-14T14:55:46.920-05:00</updated><title type='text'>Custom web service - 401 Unauthorized</title><content type='html'>So I remember what I did for next time...&lt;br /&gt;&lt;br /&gt;I have a custom web service that interacts with SharePoint.  I created a new method so I could test the service from a Windows Form application - invokes a method without any parameters, then returns an item from a SharePoint list.  Simple enough.&lt;br /&gt;&lt;br /&gt;Of course, never say "simple enough"!  In my code I could get a handle to the SPSite object, and the SPWeb object, but when I tried to get an SPList object or do an rootweb.Lists.Count property check I'd get a "thread was being aborted" message, and a 401 Unauthorized back.  I increased the timeout in my proxy class, increased the HttpRuntime timeout, all no luck.&lt;br /&gt;&lt;br /&gt;But then in my web service ASMX class, I added in SPSecurity.RunWithElevatedPrivileges - and poof the web service now works.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-8384481611516489408?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/8384481611516489408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=8384481611516489408' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/8384481611516489408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/8384481611516489408'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2009/09/custom-web-service-401-unauthorized.html' title='Custom web service - 401 Unauthorized'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-3817471290395306853</id><published>2009-07-16T20:35:00.003-05:00</published><updated>2009-07-16T20:41:49.285-05:00</updated><title type='text'>TreeViewDataSource ShowDoclibChildren</title><content type='html'>Been spending my time getting my web site to be Section 508 compliant.  I'm using the CSS Friendly Control Adapters off of CodePlex.  I got the top level menu working nicely, then on to the Site Hierarchy tree view.  Headache!  My customer wants to see the first two levels expanded in the tree, so not just the libraries but the first two folders in the library also.&lt;br /&gt;&lt;br /&gt;When I enabled the control adapter in the compat.browser file, I lost those subtree items - worked fine when I have the out of the box tree view set up, but when I switched to the control adapter, I lost the subitems - only the doc lib appeared, not the folders.&lt;br /&gt;&lt;br /&gt;Digging around, I saw that there's a property for the tree view data source object called "ShowDocLibChilden" and "ShowFolderChilden" - set these to 'true' and hey hey there are my items!&lt;br /&gt;&lt;br /&gt;Tomorrow's fun will be to get the CSS to work correctly, the indenting and expand/collapse aren't working right, but that'll be for tomorrow's post-coffee labor.&lt;br /&gt;&lt;br /&gt;BTW, seems my blog comments are mostly spam, Japanese spam at that (is that tastier?  I did like the teriyaki burgers at MOS Burger in Japan, burger patty, sweet soy sauce, rice 'bun' instead of bread!) - so send comments directly to my email, smushkat@hotmail.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-3817471290395306853?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/3817471290395306853/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=3817471290395306853' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/3817471290395306853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/3817471290395306853'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2009/07/treeviewdatasource-showdoclibchildren.html' title='TreeViewDataSource ShowDoclibChildren'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-3737365548428531395</id><published>2009-05-20T09:48:00.002-05:00</published><updated>2009-05-20T09:59:25.056-05:00</updated><title type='text'>Project Server 7882: Unable to start services process.</title><content type='html'>Early morning panic attack!  We did a database move of our Project Server database over the weekend.  Rather than use the renameserver command, we figured to take the cautious route and set up an alias from the old SQL Server to the new SQL Server - that worked very nicely.&lt;br /&gt;&lt;br /&gt;One of the other changes made was to start up the Search Service - previously we had the Office and SharePoint search services disabled, as they were causing errors with the old SQL Server - long story about that!  In doing so, I had to update the SSP config page to start up the services.&lt;br /&gt;&lt;br /&gt;Looking in the event log, there were a ton of errors complaining "unable to start service process.  SSP: &lt;guid&gt; Service: ProjectQueueService", then the same error with the pjevtsvc instead.  There was also a .Net Runtime 2.0 Error, EventType clr20R3, microsoft.office.project.server. system.nullreferenceexception.&lt;br /&gt;&lt;br /&gt;I stopped &amp; started both the Timer and Queue services, but that didn't help.  Tried restarting both a few times.  Tried an IISReset.  Still didn't help.&lt;br /&gt;&lt;br /&gt;My service account was set up to Log On As Service in the Local Security Settings User Rights Assignments, Log On as a service, so that wasn't it either.&lt;br /&gt;&lt;br /&gt;What did the trick was to change the account used for both services in the Services control panel.  The services were set to use the Farm account - I switched this back to using the SSP account instead, restarted the services, and we're up &amp; running with nice quiet logs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-3737365548428531395?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/3737365548428531395/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=3737365548428531395' title='46 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/3737365548428531395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/3737365548428531395'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2009/05/project-server-7882-unable-to-start.html' title='Project Server 7882: Unable to start services process.'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>46</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-5373121199277007647</id><published>2009-04-19T11:31:00.002-05:00</published><updated>2009-04-19T11:36:08.525-05:00</updated><title type='text'>The workflow failed to start due to an internal error</title><content type='html'>Another fun bout with SharePoint!  This one was a good challenge.  I have a big WSP solution built with the VSEWSS extensions, and I wanted to add in my workflow to the solution.  The workflow had been working just fine, so I merged in the project file, created a new feature in the WSP View of the project, added in the reference to the project output, and we're good to go!&lt;br /&gt;&lt;br /&gt;Except after I associated the workflow and tried to use it, I got the very helpful error "the workflow failed to start due to an internal error".  Nothing in the Application viewer, in the 12 Hive logs, just the friendly ol error message and nothing more.&lt;br /&gt;&lt;br /&gt;We'll leave off all the things I tried (removing old copies of the workflow, new GUIDs, new namespace, new...well, you get the idea) and here's what did work: when I associated the workflow, I created a new Task and Workflow History list rather than use the ones that were in the site definition.  Did that and the workflow is flowing along now.  Nice!&lt;br /&gt;&lt;br /&gt;I do indeed have a copy of the Tasks list in the site definition.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-5373121199277007647?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/5373121199277007647/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=5373121199277007647' title='43 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/5373121199277007647'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/5373121199277007647'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2009/04/workflow-failed-to-start-due-to.html' title='The workflow failed to start due to an internal error'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>43</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-6055159590365356244</id><published>2009-03-13T12:19:00.002-05:00</published><updated>2009-03-13T12:21:27.434-05:00</updated><title type='text'>Convergence 2009</title><content type='html'>Just came back from working at the HP Booth at Convergence 2009, the Microsoft Dynamics show at New Orleans this year.  I learned a lot about Dynamics, and in particular about CRM.  (note, I work for EDS, an HP Company).  We were the Platinum sponsor of the event &amp; had a nice big booth in the Partner Expo area.  I was there discussing SharePoint &amp; how it can work together with CRM.  I'll be blogging a bit about that over the next few weeks.  Seems to be good stuff!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-6055159590365356244?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/6055159590365356244/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=6055159590365356244' title='43 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/6055159590365356244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/6055159590365356244'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2009/03/convergence-2009.html' title='Convergence 2009'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>43</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-4076232337911478207</id><published>2009-02-27T13:39:00.002-05:00</published><updated>2009-02-27T13:47:22.251-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NonTechnical'/><title type='text'>Magic Jack</title><content type='html'>One last post for today.  Now I normally want this blog to stay focused on SharePoint &amp; related products - like I said this is my virtual memory site, helps me remember stuff I worked on way back when - but I wanted to post about the Magic Jack.  &lt;br /&gt;&lt;br /&gt;I've gone wireless at home for some time now, but working from home I didn't want to chew up my cell minutes on those long conference calls.  I had been using Skype, and was generally pleased with the quality and price, but I did have a few bad/dropped connections and on one conf call folks said I sounded like I was talking in a fish bowl 800 miles away.  Not good, especially since the call was with some MS Professional Services folks!&lt;br /&gt;&lt;br /&gt;Over the weekend the wife and I saw an ad on TV for The Magic Jack, only $19.95!!  Ever skeptical, I decided to try it out anyway.  I bought the kit at the local Radio Shack for $40, which includes the first year's service, and I gotta say, I'm impressed.  The call quality is quite clear, it's easier to use than Skype - none of that 001 - 866 - 1235466 * thing to dial out, just pick up the phone and dial the number.  I used it quite a bit yesterday and my audio was fine, and no one mentioned that fish bowl.  Looks like a nice product.  &lt;br /&gt;&lt;br /&gt;If it turns out to be otherwise I'll let you know!  There's a deal with it too, $60 for 5 years of service, instead of $20 per year (OK, $59.95 and $19.95 respectively but a spade is....)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-4076232337911478207?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/4076232337911478207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=4076232337911478207' title='43 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/4076232337911478207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/4076232337911478207'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2009/02/magic-jack.html' title='Magic Jack'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>43</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-7128392098745901752</id><published>2009-02-27T13:29:00.002-05:00</published><updated>2009-02-27T13:35:47.588-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DR'/><title type='text'>DR with SQL backups and PSCONFIG</title><content type='html'>As promised...for my client we are only taking SQL Server backups of the databases used by SharePoint, although we may soon be taking disk image backups as well, but that's another story!&lt;br /&gt;&lt;br /&gt;Anyway, I had to put together a DR plan documenting the steps to recover SharePoint.  There's a great step by step on how to do this for Project Server, posted &lt;a href="http://technet.microsoft.com/en-us/library/dd277859.aspx"&gt;here&lt;/a&gt;.  Great article, but there was one thing I didn't understand after reading this...what about my IIS sites?  I wasn't sure if I had to create the IIS sites needed for my web apps before I ran that PSCONFIG CONFIGDB command.&lt;br /&gt;&lt;br /&gt;Turns out is is NOT necessary.  The first thing that command does is to unprovision the provisioned Central Admin site.  We follow a standard deployment guide &amp; use the same ports for Central Admin &amp; the Shared Services Provider on all our installs, so even though I did use that same port in the steps prior to the PSCONFIG CONFIGDB step, not necessary.  After unprovisioning the site, the process then creates the web apps, the IIS sites, links in the content databases, even for the SSP.  Worked just fine.&lt;br /&gt;&lt;br /&gt;Now, one last question...what about SSL?  Does that also get configured after the IIS site is created?  I doubt it, and I need to ensure the existing server's private key is saved off somewhere so we can reinstall it.  I need to do one more test on the DR process, I'll let you know what happens.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-7128392098745901752?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/7128392098745901752/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=7128392098745901752' title='43 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/7128392098745901752'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/7128392098745901752'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2009/02/dr-with-sql-backups-and-psconfig.html' title='DR with SQL backups and PSCONFIG'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>43</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-6164722339595828605</id><published>2009-02-27T13:21:00.002-05:00</published><updated>2009-02-27T13:29:45.208-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint'/><category scheme='http://www.blogger.com/atom/ns#' term='ISA Server'/><title type='text'>SSL Exporting to a .PFX....not!</title><content type='html'>Yesterday I had a bit of a panic.  I had a change request scheduled to publish my Project Server site over to our ISA Server.  Normally to do this, one goes into the Certificates MMC snap in, locates the Personal certificate assigned to the server, and export it as a .PFX file.&lt;br /&gt;&lt;br /&gt;Well, the option to export to .PFX was grayed out, with a warning about "the associated private key cannot be found" - but on the screen where I view the SSL certificate, I was told that there is a private key associated with this certificate.  Since ISA Server requires the private key, this was going to be a show stopper!&lt;br /&gt;&lt;br /&gt;Digging around I did find one helpful post on the Verisign site:  &lt;a href="http://forums.iis.net/p/1154109/1888980.aspx"&gt;http://forums.iis.net/p/1154109/1888980.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This post lead to me look in the directory C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys, and then further, I was able to locate the file (named with a GUID) in the MachineKeys folder with the time stamp of when we installed the SSL certificate.  Turns out even though I'm domain admin, that folder was not owned by the local Administrators group, and that further that GUID named key was owned only by the guy who installed the cert and SYSTEM - Domain Admins &amp; the box admins didn't have permissions to the file or to that folder.&lt;br /&gt;&lt;br /&gt;So once I took care of that, changing the ownership on that GUID file &amp; then granting Full Control rights to that key, I was then able to export the certificate as a .PFX file...big relief!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-6164722339595828605?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/6164722339595828605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=6164722339595828605' title='44 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/6164722339595828605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/6164722339595828605'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2009/02/ssl-exporting-to-pfxnot.html' title='SSL Exporting to a .PFX....not!'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>44</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-2261847931770235335</id><published>2009-02-09T11:06:00.002-05:00</published><updated>2009-02-09T11:12:05.440-05:00</updated><title type='text'>The Startup Disk Could Not Be Written To</title><content type='html'>Well that says it all, ey?  I've been working on some DR testing (stay tuned, post coming!!) to recover a Project Server deployment.  I created my original VPC, up to the point where the DR stuff kicks in - installation of SharePoint, mainly; so the VPC has the host OS, joined the AD domain, has SQL Server installed.&lt;br /&gt;&lt;br /&gt;I copied the VPC at this point then finished up installing the rest of the components - SharePoint, Project Server, service packs, December update, etc.&lt;br /&gt;&lt;br /&gt;When I then went to boot up the DR VPC, I was told very nicely that "the startup disk could not be written to"!  The VHD file had only the Archive bit set, was not set to be read-only.&lt;br /&gt;&lt;br /&gt;I am using Vista w/o SP1 as my host OS.  I went into the security settings for the file &amp; saw that the file has entries for System, Administrators &amp; Users.  I thought my ID is a member of Administrators, but Users was marked for read-only rights, no Modify or Write rights.  So I added in Modify and Write, must have got it right (heh) because then the VHD worked just fine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-2261847931770235335?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/2261847931770235335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=2261847931770235335' title='44 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/2261847931770235335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/2261847931770235335'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2009/02/startup-disk-could-not-be-written-to.html' title='The Startup Disk Could Not Be Written To'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>44</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-2802232658713495194</id><published>2009-01-12T09:04:00.002-05:00</published><updated>2009-01-12T09:14:34.524-05:00</updated><title type='text'>Search related errors...</title><content type='html'>Happy 2009!  The new year kicked off with an interesting challenge.  I went to the SharePoint environment I've been supporting to do a search, and oddly, there was no Search box on the home page.  No biggie, went to Search Center, and when I put in my search terms I got the beloved "Unknown Error" back.  Yikes!&lt;br /&gt;&lt;br /&gt;Same thing if I tried opening up any of the Search config pages in SSP Config.  The logs had all sorts of stuff - missing "S2LeftNav_Administration", missing features, and the SSP Search DB had some broken stored procedures, Proc_MSS_Recompile was missing, proc_MSS_FlushTemp0 was missing some arguements, the Microsoft.SharePoint.Portal.WebControls.SearchBoxEx control was missing, all kinds of stuff.&lt;br /&gt;&lt;br /&gt;Found a post where someone had applied the July Infrastructure Update and had seen some of these errors, and had a fix of updating certain specific files.  But, I didn't apply that fix as one of my colleagues said there was an issue with the Alternate Access Mapping (subsequently fixed in the October update).  &lt;br /&gt;&lt;br /&gt;Well, looking back into the Event Viewer, I saw that 'someone did something' - Dec 19th a security patch for SharePoint was applied to close up a hole with Search.  With the odd state of things, I guessed that whomever applied the update probably freaked out when the SharePoint Configuration Wizard started &amp; bailed out - bad idea!!  Sure enough, re-running the Wizard (with screen caps which are going into an admin guide thank you very much indeed) cleared up the problems.&lt;br /&gt;&lt;br /&gt;Next weirdness was a 10 hour incremental crawl, and the indexer showing "Computing ranking" for a long spell.  Well, stopped the crawl, reset the index, then did a full crawl, then about 10 minutes later (not a heap of content) started getting search results again.&lt;br /&gt;&lt;br /&gt;But of course, Search not working for three weeks ought to have raised at least one trouble ticket!!  Looks like it's time for some end user education...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-2802232658713495194?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/2802232658713495194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=2802232658713495194' title='45 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/2802232658713495194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/2802232658713495194'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2009/01/search-related-errors.html' title='Search related errors...'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>45</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-7682978511901472432</id><published>2008-10-22T14:59:00.002-05:00</published><updated>2008-10-22T15:08:38.953-05:00</updated><title type='text'>FIPS and SharePoint</title><content type='html'>Hello SharePointers,&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Well, one monkey off the back at long last.  Way back in February 2008 we ran into a problem where SharePoint would not work when the "System Crptography: Use FIPS compliant algorithms for encryption, hashing and signing" AD security policy was set to Enabled.  SharePoint would come up with "An unexpected error occurred", with some 6482 messages in the Event Logs.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Well, along came the August Cumulative Updates, which apparently resolved the issue.  So I installed the CU's per the instructions &lt;a href="http://blogs.msdn.com/sharepoint/archive/2008/09/29/announcing-august-cumulative-update-for-office-sharepoint-server-2007-and-windows-sharepoint-services-3-0.aspx"&gt;here&lt;/a&gt;, enabled FIPS, and what do you know, it still didn't work, still got "An unexpected error occurred"!!!&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Well, turns out that the fix for SharePoint indeed just disables logging of those 6482 error codes.  In addition to those CU's, you still need to update the web.config for the SharePoint site, so that it tells .Net to use the encryption that FIPS requires.  Which oddly enough doesn't seem to be as strong as the non-FIPS encryption, but then I'm no expert!  Please see this &lt;a href="http://blogs.msdn.com/sharepoint/archive/2008/09/29/announcing-august-cumulative-update-for-office-sharepoint-server-2007-and-windows-sharepoint-services-3-0.aspx"&gt;article&lt;/a&gt; for the details on how to modify the machinekey setting to use the 3DES algorith.  Good luck!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-7682978511901472432?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/7682978511901472432/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=7682978511901472432' title='74 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/7682978511901472432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/7682978511901472432'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2008/10/fips-and-sharepoint.html' title='FIPS and SharePoint'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>74</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-742763195992751495</id><published>2008-08-19T16:17:00.002-05:00</published><updated>2008-08-19T16:20:17.086-05:00</updated><title type='text'>Custom ServerURL field in a SharePoint list</title><content type='html'>Well here's an odd one.  I'm using a SharePoint list to store configuration info for a web service I'm using.  I wanted the URL of the server to be a parameter, so I could switch between dev, model office &amp; production easily.  So logically enough I created a custom field called ServerURL to point to the server hosting the web service.  Got some weird results:&lt;br /&gt; &lt;br /&gt;Trying to use an SPWeb object that has been closed or disposed and is no longer valid.  &lt;br /&gt; &lt;br /&gt;Turns out ServerURL is an internal field - when I reference ServerURL0 then I get my own field.  Reckon it's time to re-create that field with a different name!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-742763195992751495?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/742763195992751495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=742763195992751495' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/742763195992751495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/742763195992751495'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2008/08/custom-serverurl-field-in-sharepoint.html' title='Custom ServerURL field in a SharePoint list'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-3805954049328179430</id><published>2008-04-29T16:30:00.001-05:00</published><updated>2008-04-29T16:31:54.109-05:00</updated><title type='text'>Day of Dot Net - West Michigan</title><content type='html'>Woo hoo, accepted as a speaker at the 2008 Day of Dot Net - West Michigan!  Good sessions...I want to see the one about using the Wii remote, that'll be very cool.  I'll be talking about the fun I've been having with SharePoint, VS 2008, and Workflows.  Good stuff!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.wmdotnet.org/dodn08/"&gt;&lt;img src="http://www.wmdotnet.org/DODN08/images/Site-Badge-I.gif" alt="WM Day of .Net May 10, 2008 - I'll be there!" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-3805954049328179430?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/3805954049328179430/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=3805954049328179430' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/3805954049328179430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/3805954049328179430'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2008/04/day-of-dot-net-west-michigan.html' title='Day of Dot Net - West Michigan'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-9076307479381901960</id><published>2008-04-29T16:18:00.003-05:00</published><updated>2008-04-29T16:28:42.681-05:00</updated><title type='text'>Showing icons in a list view</title><content type='html'>My customer threw me a challenge: instead of your typical Red/Amber/Green SLA indicator, they also want to show Blue if they've exceeded the SLA target.  And no yellow - either you're red, missed; green, on; or blue, exceeded.  So much for using the KPI interface!  &lt;br /&gt;&lt;br /&gt;I started looking in to the KPI Dashboard sample to see if I could somehow customize this, but after an hour and a cup of Starbuck's it was still none too clear.  Then the coffee cleared away the neurons &amp; I recalled seeing discussion on using the spankin' new XSLT Data Viewer.  I had done used this with SPS 2003 and it was pretty good then...and it's better now with MOSS.&lt;br /&gt;&lt;br /&gt;The XSLT Data Viewer is a MOSS goodie, sorry WSS'ers.  To use it, I fired up SharePoint Designer, opened up my list, changed to the 'Split' view, then with a right click I chose the Convert to XSLT Data View option.&lt;br /&gt;&lt;br /&gt;In my list I have a SLA column, a Target column, and a Status column.  I wanted the indicator in the Status column.&lt;br /&gt;&lt;br /&gt;After a few seconds (slow on the VPC for some reason) I was able to view the list.  Looking at the XSLT, for the Status column, I changed what was there to:&lt;br /&gt;&lt;br /&gt;&amp;lt;!--Status--&amp;gt;&lt;br /&gt;&amp;lt;TD Class="{$IDAVVHVE}"&amp;gt;&amp;lt;xsl:choose&amp;gt;&lt;br /&gt;  &amp;lt;xsl:when test="@SLA &lt;b&gt;amp-gt;&lt;/b&gt; @Target"&amp;gt;&lt;br /&gt;  &amp;lt;img src="/_layouts/images/KPIDefault-Blue.gif" alt="Exceeded SLA Target"/&amp;gt;&lt;br /&gt;  &amp;lt;/xsl:when&amp;gt;&lt;br /&gt;  &amp;lt;xsl:when test="@SLA= @Target"&amp;gt;&lt;br /&gt;  &amp;lt;img src="/_layouts/images/KPIDefault-2.gif" alt="Met SLA"/&amp;gt;&lt;br /&gt;  &amp;lt;/xsl:when&amp;gt;&lt;br /&gt;  &amp;lt;xsl:when test="@SLA &lt;b&gt;amp-lt;&lt;/b&gt; @Target"&amp;gt;&lt;br /&gt;  &amp;lt;img src="/_layouts/images/KPIDefault-0.gif" alt="Missed SLA"/&amp;gt;&lt;br /&gt;  &amp;lt;/xsl:when&amp;gt;&lt;br /&gt; &amp;lt;/xsl:choose&amp;gt;&lt;br /&gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;&lt;br /&gt;Change the 'amp-gt;' to an ampersandgt; (I should find a better blog page) and 'amp-lt;' to the ampersandlt; and you're good to go!&lt;br /&gt;&lt;br /&gt;Now I need to come up with a nice shape for the Blue icon.  Blue Moon?  mmmm, tasty, good idea!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-9076307479381901960?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/9076307479381901960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=9076307479381901960' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/9076307479381901960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/9076307479381901960'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2008/04/showing-icons-in-list-view.html' title='Showing icons in a list view'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-6834997610427075020</id><published>2008-04-08T12:44:00.002-05:00</published><updated>2008-04-08T13:00:28.043-05:00</updated><title type='text'>EditControlBlock registrationtypes</title><content type='html'>Been working on adding a new item to the SharePoint drop down menus...easy to do by creating a feature, then defining the custom action one wants to add in.  But...I only want my new menu item available for documents.  One of my testers saw that the new menu item was on the folder drop down list also, and what do you know, test case failed!&lt;br /&gt;&lt;br /&gt;So...I could either add code that points out to the dear user that one ought not use this with folders, or see if there was a way to hide the new menu item from folders - that is, the new menu item appears only for documents.&lt;br /&gt;&lt;br /&gt;RegistrationType and RegistrationID to the rescue.  These items are part of the custom action XML defined by the Feature.XML.  Here's what I've been able to determine.  RegistrationType allows for "ContentType" and "FileType" values, as well as List and ProgID.  &lt;br /&gt;&lt;br /&gt;Specifying "ContentType" is what I'm after.  This will allow me to associate the new action with a specific content type.  The RegistrationID element is used to specify the ID of the content type.  To get this ID, open your document library settings, in the ContentType section click on the content type of interest, then grab the hex string in the URL after the "ctype=" parameter.  Paste this value in to the RegistrationID value.&lt;br /&gt;&lt;br /&gt;Alternatively, if I only want this feature to appear for ".xls" files, then I'd use the FileType RegistationType, and the value "xls" for the registationID.  Repeat the CustomAction block for other file types.&lt;br /&gt;&lt;br /&gt;The completed Feature.XML looks like:&lt;br /&gt;&lt;br /&gt;Feature.xml:&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt;&lt;br /&gt;&amp;lt;Feature Id="1a8e5fae-577f-4cbd-addb-a31d875300a6" &lt;br /&gt;    Title="Copy Document"&lt;br /&gt;    Description="My custom document copy feature"&lt;br /&gt;    Version="1.0.0.0"&lt;br /&gt;    Scope="Web"&lt;br /&gt;    xmlns="http://schemas.microsoft.com/sharepoint/"&amp;gt;&lt;br /&gt;  &amp;lt;ElementManifests&amp;gt;&lt;br /&gt;    &amp;lt;ElementManifest Location="CopyDocument.xml" /&amp;gt;&lt;br /&gt;  &amp;lt;/ElementManifests&amp;gt;&lt;br /&gt;&amp;lt;/Feature&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CopyDocument.xml:&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt;&lt;br /&gt;&amp;lt;Elements xmlns="http://schemas.microsoft.com/sharepoint/"&amp;gt;&lt;br /&gt;&amp;lt;!-- Per Item Dropdown (ECB)--&amp;gt;&lt;br /&gt;  &amp;lt;CustomAction &lt;br /&gt;    Id="Custom.PromoteDocument"&lt;br /&gt;    RegistrationType="ContentType"&lt;br /&gt;    RegistrationId="ctype=0x01010038C4691B76BEB34CB53E65CADDF82AD3"&lt;br /&gt;    Location="EditControlBlock"&lt;br /&gt;    Rights="EditListItems"&lt;br /&gt;    Title="Promote Document"&amp;gt;&lt;br /&gt;    &amp;lt;UrlAction Url="~site/_layouts/MyCustomCopyDocument.aspx?List={ListId}&amp;amp;ID={ItemId}"/&amp;gt;&lt;br /&gt;  &amp;lt;/CustomAction&amp;gt;&lt;br /&gt;&amp;lt;/Elements&amp;gt;&lt;br /&gt;&lt;br /&gt;Note also the use of {ListId} and {ItemID} - I use this with my code behind file to get the SPList and SPListItem from the content SPWeb.  With these I can then get to the attachment object of the SPListItem, so I can copy that document around.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-6834997610427075020?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/6834997610427075020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=6834997610427075020' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/6834997610427075020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/6834997610427075020'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2008/04/editcontrolblock-registrationtypes.html' title='EditControlBlock registrationtypes'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-789006360564359601</id><published>2008-01-28T16:30:00.000-05:00</published><updated>2008-01-28T16:54:54.766-05:00</updated><title type='text'>Change AD password with code</title><content type='html'>New cool stuff with the .Net 3.5 Framework!  The System.DirectoryServices.AccountManagement namespace adds all kinds of clean methods for working with user objects.  I wanted to put together a simple web part to change AD passwords - found a few good examples out there, but since I have the 3.5 Framework installed on my server I of course had to give the latest a whirl.&lt;br /&gt;&lt;br /&gt;First, for background, take a look at this excellent article:  &lt;a href="http://msdn.microsoft.com/msdnmag/issues/08/01/DSAccountManagement/"&gt;AccountManagement Namespace&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Joe &amp; Ethan give a great overview of using the new features in 3.5.&lt;br /&gt;&lt;br /&gt;In my web part, then, I have a three text boxes and a "Change" button - the bulk of the web part is based on the work done by Robin Meuré did &lt;a href="http://glorix.blogspot.com/2007/10/ad-change-password-webpart.html"&gt;here&lt;/a&gt;, with a few cosmetic changes but the main change done to the code in the btn_Click, posted here:&lt;br /&gt;&lt;br /&gt;                SPWeb webContext = SPControl.GetContextWeb(Context);&lt;br /&gt;                string strLoginName = webContext.CurrentUser.LoginName;&lt;br /&gt;                PrincipalContext domainContext = new PrincipalContext(ContextType.Domain);&lt;br /&gt;&lt;br /&gt;                UserPrincipal user = UserPrincipal.FindByIdentity(domainContext, strLoginName);&lt;br /&gt;&lt;br /&gt;                try&lt;br /&gt;                {&lt;br /&gt;                    string oldPasswordValue = oldpassword.Text;&lt;br /&gt;                    string newPasswordValue = newpassword.Text;&lt;br /&gt;                    user.ChangePassword(oldPasswordValue, newPasswordValue);&lt;br /&gt;                    output.Text = "Password changed.  Please close this browser window and log back on with your new password.";&lt;br /&gt;                }&lt;br /&gt;                catch (Exception ex)&lt;br /&gt;                {&lt;br /&gt;                    output.Text += String.Format("Password couldn't be changed due to restrictions: {0}", ex.Message);&lt;br /&gt;&lt;br /&gt;                }&lt;br /&gt;                finally&lt;br /&gt;                {&lt;br /&gt;                    user.Dispose();&lt;br /&gt;                    domainContext.Dispose();&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;That's it!  Easy-peasy.&lt;br /&gt;&lt;br /&gt;Note that when I was getting the user object, I first tried just getting a UserPrincipal object by context:&lt;br /&gt;&lt;br /&gt;               UserPrincipal user = new UserPrincipal(domainContext);&lt;br /&gt;&lt;br /&gt;Problem here was, when i invoked the ChangePassword method, I got the very friendly message back that: ChangePassword method can not be called on an unpersisted Principal object.  So instead I get the user account info from the SPContext object, pass that in to the Directory services methods, and we're good to go.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-789006360564359601?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/789006360564359601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=789006360564359601' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/789006360564359601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/789006360564359601'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2008/01/change-ad-password-with-code.html' title='Change AD password with code'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-1046981428179901088</id><published>2008-01-17T16:16:00.001-05:00</published><updated>2008-01-17T16:42:51.676-05:00</updated><title type='text'>To copy a file from one lib to another...</title><content type='html'>Finally back to SharePoint coding after a long hiatus of process documentation - feels great! &lt;br /&gt;&lt;br /&gt;So the challenge has been adding a menu item to the Edit Control Block to copy items from one library to another. There are some good examples out there, Andrew Connell's blog has a great example, so I won't repeat it - but I will show all of the code I have. Might help you out. &lt;br /&gt;&lt;br /&gt;In this scenario, I have three "document center" on my portal: Working, Staging, and Production ("Docs"). I want to let my users choose when to promote a document, but I didn't want this to be workflow dependent: ie, not based on setting a document property, or based on a check in event, etc - let the user decide. &lt;br /&gt;&lt;br /&gt;The drop down for the Edit Control Block was the answer. "Promote Document" will now appear for users with the right access. This feature passes the list ID and item ID to an ASPX page, which then does the work of copying the document over. &lt;br /&gt;&lt;br /&gt;Some helpful hints: &lt;br /&gt;&lt;br /&gt;In your feature's XML file, you can assign the "Rights" value to the minimum rights a user needs in order to see your new ECB item. That way it won't show up for everyone - nice! &lt;br /&gt;&lt;br /&gt;Inside the code, after moving the file, the field items won't copy also. So you'll need to copy them with code. But then when you perform a ListItem.Update the ModifiedBy turns in to the System Account (assuming impersonation) - ick! So intead use the ever cool SPListItem.SystemUpdate() which does *not* change the Modified or ModifiedBy properties. &lt;br /&gt;&lt;br /&gt;Here we are: &lt;br /&gt;&lt;br /&gt;Feature.xml &lt;br /&gt;&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt;&lt;br /&gt;&amp;lt;Feature Id="1a8e5f42-5742-4c42-ad42-a31d87530042"     // enter your own guid&lt;br /&gt;Title="Promote Document"    &lt;br /&gt;Description="Promote a document from work to staging, or from staging to production"    Version="1.0.0.0"    &lt;br /&gt;Scope="Web"    &lt;br /&gt;xmlns="http://schemas.microsoft.com/sharepoint/"&amp;gt;  &lt;br /&gt;&amp;lt;ElementManifests&amp;gt;    &lt;br /&gt;&amp;lt;ElementManifest Location="PromoteDocument.xml" /&amp;gt;  &amp;lt;&lt;br /&gt;/ElementManifests&amp;gt;&lt;br /&gt;&amp;lt;/Feature&amp;gt;&lt;br /&gt;&lt;br /&gt;The CopytoWorking.XML file, the manifest listed in feature.xml: &lt;br /&gt;&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt;&lt;br /&gt;&amp;lt;Elements xmlns="http://schemas.microsoft.com/sharepoint/"&amp;gt;&lt;br /&gt;&amp;lt;!-- Per Item Dropdown (ECB)--&amp;gt;  &lt;br /&gt;&amp;lt;CustomAction     &lt;br /&gt;Id="CopytoWorking"    &lt;br /&gt;RegistrationType="ContentType"    &lt;br /&gt;RegistrationId="0x01"    &lt;br /&gt;Location="EditControlBlock"    &lt;br /&gt;Rights="EditListItems"    &lt;br /&gt;Title="Promote Document"&amp;gt;    &lt;br /&gt;&amp;lt;UrlAction Url="~site/_layouts/PromoteDocument.aspx?List={ListId}&amp;amp;ID={ItemId}"/&amp;gt;  &amp;lt;/CustomAction&amp;gt;&lt;br /&gt;&amp;lt;/Elements&amp;gt;&lt;br /&gt;&lt;br /&gt;and finally the ASPX page. This uses the Application.Master page layout so the new page looks sort of like a SharePoint page. Worked for me! &lt;br /&gt;&amp;lt;%@ Assembly Name="Microsoft.SharePoint.ApplicationPages, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%&amp;gt; &lt;br /&gt;&amp;lt;%@ Page language="C#" MasterPageFile="~/_layouts/application.master" %&amp;gt; &lt;br /&gt;&amp;lt;%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %&amp;gt; &lt;br /&gt;&amp;lt;%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %&amp;gt; &lt;br /&gt;&amp;lt;%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %&amp;gt; &lt;br /&gt;&amp;lt;%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %&amp;gt;  &lt;br /&gt;&amp;lt;%@ Register Tagprefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %&amp;gt; &lt;br /&gt;&amp;lt;%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %&amp;gt;&lt;br /&gt;&amp;lt;%@ Register TagPrefix="wssuc" TagName="ButtonSection" src="~/_controltemplates/ButtonSection.ascx" %&amp;gt;&lt;br /&gt;&amp;lt;%@ Import Namespace="Microsoft.SharePoint" %&amp;gt; &lt;br /&gt;&amp;lt;%@ Import Namespace="System.Net" %&amp;gt; &lt;br /&gt;&amp;lt;asp:Content ID="Content1" ContentPlaceHolderId="PlaceHolderPageTitle" runat="server"&amp;gt; &lt;br /&gt;&amp;lt;asp:Literal id="PageTitleLabel1" runat="server" &amp;gt;&amp;lt;/asp:Literal&amp;gt;&lt;br /&gt;&amp;lt;/asp:Content&amp;gt;&lt;br /&gt;&amp;lt;asp:Content ID="Content2" ContentPlaceHolderId="PlaceHolderPageTitleInTitleArea" runat="server"&amp;gt; &lt;br /&gt;&amp;lt;asp:Label id="PageTitleLabel" runat="server" &amp;gt;&amp;lt;/asp:Label&amp;gt;&lt;br /&gt;&amp;lt;/asp:Content&amp;gt;&lt;br /&gt;&amp;lt;asp:Content ID="Content3" ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server"&amp;gt;&lt;br /&gt;&amp;lt;script runat="server"&amp;gt;&lt;br /&gt;    public void CancelClick(Object obj, EventArgs e)    &lt;br /&gt;{        &lt;br /&gt;SPWeb oWeb = SPContext.Current.Web;        &lt;br /&gt;SPList oList = oWeb.Lists[new Guid(Context.Request["List"])];        &lt;br /&gt;Response.Redirect(oList.DefaultViewUrl);    &lt;br /&gt;}            &lt;br /&gt;&lt;br /&gt;public void ConfirmClick(Object obj, EventArgs e)   &lt;br /&gt; {        &lt;br /&gt;       SPWeb oWeb = SPContext.Current.Web;        &lt;br /&gt;       SPUser currentUser = oWeb.CurrentUser; &lt;br /&gt;       SPSecurity.RunWithElevatedPrivileges(delegate()&lt;br /&gt;        {&lt;br /&gt;            oWeb.AllowUnsafeUpdates = true;&lt;br /&gt;            SPList oList = oWeb.Lists[new Guid(Context.Request["List"])];&lt;br /&gt;            SPListItem oItem = oList.GetItemById(int.Parse(Context.Request["ID"])); &lt;br /&gt;           byte[] fileContent = oItem.File.OpenBinary();&lt;br /&gt;            String currentUrl = oItem.File.ServerRelativeUrl;&lt;br /&gt;            string[] currentUrlSplit = currentUrl.Split('/');&lt;br /&gt;            if (currentUrlSplit[1].CompareTo("Staging") == 0)&lt;br /&gt;            {                currentUrlSplit[1] = "Docs";            }&lt;br /&gt;            if (currentUrlSplit[1].CompareTo("Working") == 0)&lt;br /&gt;            {                currentUrlSplit[1] = "Staging";            }&lt;br /&gt;&lt;br /&gt;           StringBuilder sb = new StringBuilder();&lt;br /&gt;           String siteUrl = oWeb.ParentWeb.Url; &lt;br /&gt;           string[] siteUrlSplit = siteUrl.Split('/'); &lt;br /&gt;           sb.Append(siteUrlSplit[0]);  // this is the protocol&lt;br /&gt;           sb.Append("//");            &lt;br /&gt;           sb.Append(siteUrlSplit[2]);  // this is the server&lt;br /&gt;           string server = sb.ToString();&lt;br /&gt;            // now add the rest of the URL - site &amp; folders&lt;br /&gt;            for (int i = 1; i &amp;lt; currentUrlSplit.Length; i++)&lt;br /&gt;            {&lt;br /&gt;                sb.Append("/");&lt;br /&gt;                sb.Append(currentUrlSplit[i]);&lt;br /&gt;            }&lt;br /&gt;            String newUrl = sb.ToString();&lt;br /&gt;            SPWeb newWeb = new SPSite(newUrl).OpenWeb();&lt;br /&gt;            newWeb.AllowUnsafeUpdates = true;&lt;br /&gt;            EnsureParentFolder(newWeb, newUrl);&lt;br /&gt;&lt;br /&gt;            // copy the file over&lt;br /&gt;            SPFile newFile = newWeb.Files.Add(newUrl, fileContent, currentUser, currentUser, oItem.File.TimeCreated, oItem.File.TimeLastModified); &lt;br /&gt;&lt;br /&gt;            // add the properties&lt;br /&gt;            foreach (SPField oField in oItem.Fields)&lt;br /&gt;            {&lt;br /&gt;                if (!oField.ReadOnlyField &amp;&amp;&lt;br /&gt;                    oField.InternalName != "ContentType" &amp;&amp;&lt;br /&gt;                    oField.Type != SPFieldType.Invalid &amp;&amp;&lt;br /&gt;                    oField.Type != SPFieldType.WorkflowStatus &amp;&amp;&lt;br /&gt;                    oField.Type != SPFieldType.File &amp;&amp;&lt;br /&gt;                    oField.Type != SPFieldType.Computed &amp;&amp;&lt;br /&gt;                    oField.Type != SPFieldType.User &amp;&amp;&lt;br /&gt;                    oField.Type != SPFieldType.Lookup)&lt;br /&gt;                {&lt;br /&gt;                    newFile.Item[oField.Title] = oItem[oField.Title];&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            newFile.Item.SystemUpdate(true);&lt;br /&gt;            newWeb.Dispose();&lt;br /&gt;            Response.Redirect(oList.DefaultViewUrl);&lt;br /&gt;           });&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public static string EnsureParentFolder(SPWeb parentSite, string destinUrl)&lt;br /&gt;    {&lt;br /&gt;        destinUrl = parentSite.GetFile(destinUrl).Url;&lt;br /&gt;        int index = destinUrl.LastIndexOf("/");&lt;br /&gt;        string parentFolderUrl = string.Empty;&lt;br /&gt;        if (index &amp;gt; -1)&lt;br /&gt;        {&lt;br /&gt;            parentFolderUrl = destinUrl.Substring(0, index);&lt;br /&gt;            SPFolder parentFolder = parentSite.GetFolder(parentFolderUrl);&lt;br /&gt;            if (!parentFolder.Exists)&lt;br /&gt;            {&lt;br /&gt;                SPFolder currentFolder = parentSite.RootFolder;&lt;br /&gt;                foreach (string folder in parentFolderUrl.Split('/'))&lt;br /&gt;                {&lt;br /&gt;                    currentFolder = currentFolder.SubFolders.Add(folder);&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        return parentFolderUrl;    &lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;/asp:Content&amp;gt;&lt;br /&gt;&amp;lt;asp:Content ID="Content4" ContentPlaceHolderId="PlaceHolderPageImage" runat="server"&amp;gt; &amp;lt;img src="/_layouts/images/blank.gif" width=1 height=1 alt="" /&amp;gt;&amp;lt;/asp:Content&amp;gt;&lt;br /&gt;&amp;lt;asp:Content ID="Content5" ContentPlaceHolderId="PlaceHolderPageDescription" runat="server"&amp;gt; &lt;br /&gt;&amp;lt;asp:Label id="PageDescriptionLabel" runat="server" &amp;gt;&amp;lt;/asp:Label&amp;gt;  &lt;br /&gt;&amp;lt;asp:PlaceHolder id="PublishDescription" Visible="true" runat="server"&amp;gt;    &lt;br /&gt;&amp;lt;tr&amp;gt; &amp;lt;TD height="8px"&amp;gt;&amp;lt;img src="/_layouts/images/blank.gif" width="1" height="8" alt=""&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;    &lt;br /&gt;&amp;lt;tr&amp;gt;&amp;lt;td colspan="2"&amp;gt;        &lt;br /&gt;&amp;lt;table cellpadding="2" cellspacing="1" width="100%" class="ms-informationbar" style="margin-bottom: 5px;" border=0&amp;gt;          &lt;br /&gt;&amp;lt;tr&amp;gt;&amp;lt;td width="10" valign="middle" style="padding: 4px"&amp;gt;&lt;br /&gt;         &amp;lt;img id="Img1" src="/_layouts/images/exclaim.gif" alt="&amp;lt;%$Resources:wss,exclaim_icon%&amp;gt;" runat="server"/&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;         &amp;lt;td class="ms-descriptiontext"&amp;gt;&amp;lt;SharePoint:EncodedLiteral ID="EncodedLiteral1" runat="server" text="Click Confirm to continue or Cancel to return.  Promoting a document will remove it from this library and move it from Work to Staging, or Staging to Production." EncodeMethod='HtmlEncode'/&amp;gt;&lt;br /&gt;       &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;     &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;    &amp;lt;/asp:PlaceHolder&amp;gt;&amp;lt;/asp:Content&amp;gt;&lt;br /&gt;&amp;lt;asp:Content ID="Content6" ContentPlaceholderID="PlaceHolderMain" runat="server"&amp;gt;&lt;br /&gt;&amp;lt;asp:Button  CssClass="ms-ButtonHeightWidth" AccessKey="o" ID="Confirm" runat="server" Text="Confirm" OnClick="ConfirmClick"/&amp;gt;&lt;br /&gt;&amp;lt;asp:Button CssClass="ms-ButtonHeightWidth" AccessKey="a" ID="Cancel" runat="server" Text = "Cancel" OnClick = "CancelClick" /&amp;gt;&lt;br /&gt;&amp;lt;/asp:Content&amp;gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-1046981428179901088?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/1046981428179901088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=1046981428179901088' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/1046981428179901088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/1046981428179901088'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2008/01/to-copy-file-from-one-lib-to-another.html' title='To copy a file from one lib to another...'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-1942985981179505375</id><published>2007-09-20T14:56:00.000-05:00</published><updated>2007-09-20T15:09:53.625-05:00</updated><title type='text'>Secured section inside web.config</title><content type='html'>Finally a chance to work on some code - six months of writing documentation just isn't good for the health!!&lt;br /&gt;&lt;br /&gt;So in my web app I want to store an ID and password, and I want to encrypt these keys to secure them.  But there are other settings I want to leave in clear text to make for easier editing for my admins, and less web page work for me.  The answer - custom sections inside my ASP.Net 2.0 web.config.&lt;br /&gt;&lt;br /&gt;Good stuff!  But as usual, it ain't straight forward.  Here's what I ended up implementing.  The web.config contains the following entry to create the new secured section:&lt;br /&gt;&lt;br /&gt;&lt;configSections&gt;&lt;br /&gt;&lt;section name="secureSettings" type="SecureConfiguration" requirePermission="false" /&gt;&lt;br /&gt;&lt;/configSections&gt;&lt;br /&gt;&lt;br /&gt;&lt;/appSettings&gt;&lt;br /&gt;&lt;add key="SMTPServer" value="outbound.foo.com" /&gt;&lt;br /&gt;&lt;/appSettings&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;secureSettings&gt;&lt;br /&gt;&lt;adInfo&gt;&lt;br /&gt; &lt;add key="ADID" value=""/&gt;&lt;br /&gt; &lt;add key="ADPassword" value=""/&gt;&lt;br /&gt;&lt;/adInfo&gt;&lt;br /&gt;&lt;/secureSettings&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Then inside my project I created the following class.  It sets up the key/value pairs I needed inside my secure settings section of web.config.&lt;br /&gt;&lt;br /&gt;Then, to use the class, easy peasy - just need to iterate through the pairs to find the key I need:&lt;br /&gt;&lt;br /&gt; private string GetSecureConfigKey(string key)&lt;br /&gt;{&lt;br /&gt;    String retval = "";&lt;br /&gt;    SecureConfiguration configInfo = (SecureConfiguration)ConfigurationManager.GetSection("secureSettings");&lt;br /&gt;   if (configInfo != null)&lt;br /&gt;   {&lt;br /&gt;      foreach (SecureConfigurationADKey secureKey in SecureConfiguration.GetConfig().ADKeys)&lt;br /&gt;        {&lt;br /&gt;            if (secureKey.Key.ToLower().Equals(key.ToLower()))&lt;br /&gt;                retval = secureKey.Value;&lt;br /&gt;        }&lt;br /&gt;   }&lt;br /&gt;   return retval;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;To set the value, I needed to do something similar - but kept getting an error message that the configuration was read only.  Huh??  Problem was I tried setting the value inside my foreach loop - tsk tsk.  So instead I use the following:&lt;br /&gt;&lt;br /&gt;Configuration objConfig = WebConfigurationManager.OpenWebConfiguration("~");&lt;br /&gt;SecureConfiguration configInfo = objConfig.GetSection("secureSettings") as SecureConfiguration;&lt;br /&gt;    foreach (SecureConfigurationADKey secureKey in SecureConfiguration.GetConfig().ADKeys)&lt;br /&gt;    {&lt;br /&gt;       if (secureKey.Key.ToLower().Equals(Key.ToLower()))&lt;br /&gt;       {&lt;br /&gt;           index = i;&lt;br /&gt;       }&lt;br /&gt;       i++;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;then&lt;br /&gt;&lt;br /&gt;configInfo.ADKeys[index].Value = Value;&lt;br /&gt;&lt;br /&gt;And all's well that ends well.  Note too that I check the .IsProtected property of my section when I save the value:&lt;br /&gt;&lt;br /&gt;if (!configInfo.SectionInformation.IsProtected)&lt;br /&gt;{&lt;br /&gt;   configInfo.SectionInformation.ProtectSection("RsaProtectedConfigurationProvider");&lt;br /&gt;   configInfo.SectionInformation.ForceSave = true;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;and it works!&lt;br /&gt;&lt;br /&gt;The class I use for the new web.config section follows:&lt;br /&gt;public class SecureConfiguration : ConfigurationSection&lt;br /&gt;{&lt;br /&gt;    public static SecureConfiguration GetConfig()&lt;br /&gt;    {&lt;br /&gt;        return ConfigurationManager.GetSection("secureSettings") as SecureConfiguration;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    [ConfigurationProperty("adInfo")]&lt;br /&gt;    public SecureConfigurationADKeysCollection ADKeys&lt;br /&gt;    {&lt;br /&gt;        get&lt;br /&gt;        {&lt;br /&gt;            return this["adInfo"] as SecureConfigurationADKeysCollection;&lt;br /&gt;        }&lt;br /&gt;        set&lt;br /&gt;        {&lt;br /&gt;            this["adInfo"] = value;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class SecureConfigurationADKey : ConfigurationElement&lt;br /&gt;{&lt;br /&gt;    [ConfigurationProperty("key", IsRequired = true)]&lt;br /&gt;    public string Key&lt;br /&gt;    {&lt;br /&gt;        get&lt;br /&gt;        {&lt;br /&gt;            return this["key"] as string;&lt;br /&gt;        }&lt;br /&gt;        set&lt;br /&gt;        {&lt;br /&gt;            this["key"] = value;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    [ConfigurationProperty("value", IsRequired = true)]&lt;br /&gt;    public string Value&lt;br /&gt;    {&lt;br /&gt;        get&lt;br /&gt;        {&lt;br /&gt;            return this["value"] as string;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        set&lt;br /&gt;        {&lt;br /&gt;            this["value"] = value;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class SecureConfigurationADKeysCollection : ConfigurationElementCollection&lt;br /&gt;{&lt;br /&gt;    public SecureConfigurationADKey this[int index]&lt;br /&gt;    {&lt;br /&gt;        get&lt;br /&gt;        {&lt;br /&gt;            return base.BaseGet(index) as SecureConfigurationADKey;&lt;br /&gt;        }&lt;br /&gt;        set&lt;br /&gt;        {&lt;br /&gt;            if (base.BaseGet(index) != null)&lt;br /&gt;            {&lt;br /&gt;                base.BaseRemoveAt(index);&lt;br /&gt;            }&lt;br /&gt;            this.BaseAdd(index, value);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    protected override ConfigurationElement CreateNewElement()&lt;br /&gt;    {&lt;br /&gt;        return new SecureConfigurationADKey();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    protected override object GetElementKey(ConfigurationElement element)&lt;br /&gt;    {&lt;br /&gt;        return ((SecureConfigurationADKey)element).Key;&lt;br /&gt;    }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-1942985981179505375?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/1942985981179505375/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=1942985981179505375' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/1942985981179505375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/1942985981179505375'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2007/09/secured-section-inside-webconfig.html' title='Secured section inside web.config'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-3759547380240658875</id><published>2007-08-17T11:49:00.001-05:00</published><updated>2007-08-17T11:55:16.550-05:00</updated><title type='text'>ASP.Net 2.0 and web part properties</title><content type='html'>So I take it back - one can store web part properties with web parts.  I was missing the WebBrowsable property - that seems to do the trick.  From Ted Pattison's book, Inside WSS v3 - good reading indeed!&lt;br /&gt;&lt;br /&gt;private string xmlUrl;&lt;br /&gt;[ Personalizable(PersonalizationScope.Shared),&lt;br /&gt;  WebBrowsable(true),&lt;br /&gt;  WebDisplayName("Feed Url"),&lt;br /&gt;  WebDescription("Set your RSS feed's XML URL here!")&lt;br /&gt;]&lt;br /&gt;public string XmlUrl {&lt;br /&gt;    get { return xmlUrl; }&lt;br /&gt;    set { xmlUrl = value; }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-3759547380240658875?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/3759547380240658875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=3759547380240658875' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/3759547380240658875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/3759547380240658875'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2007/08/aspnet-20-and-web-part-properties.html' title='ASP.Net 2.0 and web part properties'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-9213406634037354266</id><published>2007-05-08T09:24:00.000-05:00</published><updated>2007-05-08T09:28:59.917-05:00</updated><title type='text'>Web Parts catalog</title><content type='html'>Had a question come up last week - where's a good place for finding a catalog of SharePoint web parts?  Well, here's a list - some pretty decent stuff.  I like the Charting web part, nice way to add charts to WSS v2.  Note that these are all for V2/2003.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sharepointcustomization.com/resources/wpsamples.htm"&gt;http://www.sharepointcustomization.com/resources/wpsamples.htm&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-9213406634037354266?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/9213406634037354266/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=9213406634037354266' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/9213406634037354266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/9213406634037354266'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2007/05/web-parts-catalog.html' title='Web Parts catalog'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-9143539952423390547</id><published>2007-05-02T12:55:00.000-05:00</published><updated>2007-05-02T13:01:09.969-05:00</updated><title type='text'>Outlook 2007 - Deliver Mail to Offline Folder</title><content type='html'>OK, it's not a post about SharePoint (got one of those coming - workflow - cool stuff) but I was looking &amp; looking for this when it was right in front of me all the time.  I like having my Outlook mail pulled off the server &amp; delivered locally.  Cached Exchange Mode, yes?  In Outlook 2007 to get mail delivered to the Offline folder and downloaded from the server, so that I don't get the dreaded "Mailbox is getting pretty big there dude" message, do the following:&lt;br /&gt;&lt;br /&gt;1) Create an offline mail folder&lt;br /&gt;2) Tools / Options / Mail Setup / Data Files&lt;br /&gt;3) Locate your offline folder, click once, then click "Set as Default"&lt;br /&gt;4) Wait whilst your mail downloads....&lt;br /&gt;5) Send you and all your colleages a 25MB attachment!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-9143539952423390547?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/9143539952423390547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=9143539952423390547' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/9143539952423390547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/9143539952423390547'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2007/05/outlook-2007-deliver-mail-to-offline.html' title='Outlook 2007 - Deliver Mail to Offline Folder'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-6314485956531787394</id><published>2007-04-10T08:34:00.000-05:00</published><updated>2007-04-10T08:35:49.968-05:00</updated><title type='text'>Day of Dot Net 2007 Speaker</title><content type='html'>&lt;p&gt;I'll be speaking at Day of Dot Net 2007 in Ann Arbor 5/5 - see you there!!  I'll be talking about SharePoint 2007 - WSS &amp; MOSS &amp; all that good stuff!&lt;/p&gt;&lt;BR&gt;&lt;br /&gt;&lt;a href="http://www.dayofdotnet.org"&gt;&lt;img src="http://www.dayofdotnet.org/images/DoDNBadge.png" alt="Day of .Net May 5, 2007 - I'll be there!" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-6314485956531787394?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/6314485956531787394/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=6314485956531787394' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/6314485956531787394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/6314485956531787394'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2007/04/day-of-dot-net-2007-speaker.html' title='Day of Dot Net 2007 Speaker'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-1702074403400788061</id><published>2007-04-04T10:12:00.000-05:00</published><updated>2007-04-04T10:15:49.649-05:00</updated><title type='text'>SPListItem.Update isn't updating!</title><content type='html'>Here's a good one.  Why doesn't this work:&lt;br /&gt;&lt;br /&gt;SPList myList = myWeb.Lists["MyList"];&lt;br /&gt;&lt;br /&gt;for (int i == 0; i &lt; myList.Count; i++)&lt;br /&gt;{&lt;br /&gt;    myList.Items[i]["Value"] = "42";&lt;br /&gt;    myList.Items[i].Update();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;This *should* set the Value column to 42 for every item in the list.  But for some reason, no exception, no Event Log entry, running with impersonation, etc etc - this just doesn't work.&lt;br /&gt;&lt;br /&gt;The reason: laziness.  Here's what does work:&lt;br /&gt;&lt;br /&gt;SPList myList = myWeb.Lists["MyList"];&lt;br /&gt;&lt;br /&gt;for (int i == 0; i &lt; myList.Count; i++)&lt;br /&gt;{&lt;br /&gt;    SPListItem myItem = myList.Items[i];&lt;br /&gt;    myItem["Value"] = "42";&lt;br /&gt;    myItem.Update();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;myItem isn't disposable, so that should do the trick.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-1702074403400788061?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/1702074403400788061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=1702074403400788061' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/1702074403400788061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/1702074403400788061'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2007/04/splistitemupdate-isnt-updating.html' title='SPListItem.Update isn&apos;t updating!'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-463816919335477644</id><published>2007-03-26T10:25:00.000-05:00</published><updated>2007-03-26T10:27:01.967-05:00</updated><title type='text'>SharePoint 2003 &amp; SQL Server 2005</title><content type='html'>The answer is Yes...as long as you're using Service Pack 2.  Note that the installation process is a bit different.  Instead of going through the complete installs (ie, creating the config &amp; content databases) you stop midstream, install SP2, then carry on.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://support.microsoft.com/kb/917446"&gt;http://support.microsoft.com/kb/917446&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;and&lt;br /&gt;&lt;br /&gt;&lt;a href="http://office.microsoft.com/en-us/techcenter/HA100806971033.aspx"&gt;http://office.microsoft.com/en-us/techcenter/HA100806971033.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-463816919335477644?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/463816919335477644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=463816919335477644' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/463816919335477644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/463816919335477644'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2007/03/sharepoint-2003-sql-server-2005.html' title='SharePoint 2003 &amp; SQL Server 2005'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-2360766005456608132</id><published>2007-03-15T13:15:00.000-05:00</published><updated>2007-03-15T14:16:58.215-05:00</updated><title type='text'>Where are my Custom Properties?</title><content type='html'>So you've been doing web part development on SPS2003, you've built web parts with custom properties, which are found when you switch to edit page, edit web part properties.  All well and good.  Now along comes WSS v3 which use ASP.Net 2.0 web parts as well as SharePoint web parts.&lt;br /&gt;&lt;br /&gt;You install the VS.Net 2005 extensions for WSS, you build the sample web part project as described in &lt;a href="http://msdn2.microsoft.com/en-us/library/ms452873.aspx"&gt;MSDN&lt;/a&gt;, you see that indeed custom properties are supported, cool.&lt;br /&gt;&lt;br /&gt;So now you go and copy over some code from your SPS 2003 web parts, you've got the code to add in your custom property:&lt;br /&gt;&lt;br /&gt;[Browsable(true), Category("Miscellaneous"),        DefaultValue(defaultText),        WebPartStorage(Storage.Personal),        FriendlyName("Text"), Description("Text Property")]       &lt;br /&gt;public string Text       &lt;br /&gt;{          &lt;br /&gt; get            {                return text;            }&lt;br /&gt; set            {                text = value;            }       &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;But when you go to edit your web part properties - this custom property isn't there!! &lt;br /&gt;&lt;br /&gt;Here's the catch.  From the example in the SDK, the custom property isn't really visible to the ASP.Net web part - instead, the HTMLTextbox control is added to the web part, with an HTMLButton used to call the SaveProperties method.&lt;br /&gt;&lt;br /&gt;All well and good, but to me this means my end users can see all of those ugly properties!  If the properties are only visible on the Web Part Properties page, using the new security trimming the end user wouldn't be able to see the properties.  I'm not so concerned about securing the values of the properties, I just don't want to clutter up my web pages with all these text boxes!&lt;br /&gt;&lt;br /&gt;I suppose I could add in code to check the user's security and use CSS to hide the properties, but then that's a performance hit.&lt;br /&gt;&lt;br /&gt;The answer: go back to good ol Microsoft.SharePoint.WebPartPages.WebPart instead of System.Web.UI.WebControls.WebParts.WebPart.  That is - instead of using the ASP.Net web part base class, you'll need to use the SharePoint web part base class.  You can see this yourself if you switch the base class of that SDK sample - now, a Miscellaneous section will appear on the web part properties because the web part is a SharePoint web part, not an ASP.Net web part.&lt;br /&gt;&lt;br /&gt;You might also get an error if you try to add a web part that was originally an ASP.Net web part that you re-based the class to become a SharePoint web part...looks like the answer, unfortunately, is to create a brand new project using these instructions:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms452873.aspx"&gt;Creating a SharePoint Web Part&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I've only tried this on WSS, but that's sure what seems to be going on...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-2360766005456608132?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/2360766005456608132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=2360766005456608132' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/2360766005456608132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/2360766005456608132'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2007/03/where-are-my-custom-properties.html' title='Where are my Custom Properties?'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-5781060341835353286</id><published>2007-03-14T14:49:00.000-05:00</published><updated>2007-03-15T09:37:30.686-05:00</updated><title type='text'>So you're ready to deploy your webpart....</title><content type='html'>&lt;span style="font-size:85%;"&gt;You've built your web part, deployed it on your VPC, now it's time to deploy it on the production WSS box...here's what I did.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;In Visual Studio, switch to Build configuration&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Rebuild and deploy once again to your local VPC&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Go to the project\bin\release directory, look for Setup.bat, and edit the file, looking in line 22 to change the target URL from your &lt;a href="http://myserver"&gt;http://myserver&lt;/a&gt; VPC server to &lt;a href="http://prodserver"&gt;http://prodserver&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Zip up the entire Release directory, then copy it to your prod server&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;RDC to the prod server - you'll need to use an account that's in the SharePoint admin group. Otherwise when you run the stsadm.exe command you'll get some Object Not Found error messages, or messages about being unable to bind to SQL Server&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Unzip your project, then run Setup.exe&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Once done, the web part will be activated on the root site of your portal/WSS site.  You can open it up, then add in the web part.  You could also go to any other site and activate the web part and do the same.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;When you add in your web part, if you get the error message: "Unable to add selected web part(s). Incompatible Web Part markup detected. Use *.dwp Web Part XML instead of *.webpart Web Part XML", well, the catch is you're using the wrong project base class.  That is - with WSS/MOSS, you can use the ASP.Net 2.0 web part framework, or the good ol SharePoint web part framework.  The &lt;a href="http://msdn2.microsoft.com/en-us/library/ms461685.aspx"&gt;SDK &lt;/a&gt;provides a good explanation of this.  If you built your web part from the VS.Net template, then you'll need to make sure you're using the ASP.Net base class: &lt;span style="color:#6666cc;"&gt;  &lt;/span&gt;&lt;a onclick="javascript:Track('ctl00_LibFrame_ctl07ctl00_LibFrame_ctl10',this);" href="http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.webparts.webpart.aspx"&gt;&lt;span style="color:#6666cc;"&gt;System.Web.UI.WebControls.WebParts.WebPart&lt;/span&gt;&lt;/a&gt; instead of Microsoft.SharePoint.WebPartPages.WebParts.  How to fix this?  That's for another post.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-5781060341835353286?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/5781060341835353286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=5781060341835353286' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/5781060341835353286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/5781060341835353286'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2007/03/so-youre-ready-to-deploy-your-webpart.html' title='So you&apos;re ready to deploy your webpart....'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-1685478746379485221</id><published>2007-03-14T14:15:00.000-05:00</published><updated>2007-03-14T14:26:46.482-05:00</updated><title type='text'>Must have's for VS2005 SharePoint coding</title><content type='html'>&lt;span style="font-size:85%;"&gt;You gotta have the following:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Code snippets - you can add snippets to create the code structure for your entire web part or a web part property:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://weblogs.asp.net/jan/archive/2006/02/01/437037.aspx"&gt;&lt;span style="font-size:85%;"&gt;http://weblogs.asp.net/jan/archive/2006/02/01/437037.aspx&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Windows Workflow Foundation.  Doing workflow development?  You'll need this installed first, otherwise you'll get a goofy error message when you try to instantiate the workflow (forgot to copy it):&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;VS.Net 2005 extensions for WF 3.0&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=5D61409E-1FA3-48CF-8023-E8F38E709BA6&amp;displaylang=en"&gt;&lt;span style="font-size:85%;"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=5D61409E-1FA3-48CF-8023-E8F38E709BA6&amp;amp;displaylang=en&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;VS.Net 2005 extensions for WSS v3:&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=19f21e5e-b715-4f0c-b959-8c6dcbdc1057&amp;displaylang=en"&gt;&lt;span style="font-size:85%;"&gt;http://www.microsoft.com/downloads/details.aspx?familyid=19f21e5e-b715-4f0c-b959-8c6dcbdc1057&amp;amp;displaylang=en&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-1685478746379485221?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/1685478746379485221/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=1685478746379485221' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/1685478746379485221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/1685478746379485221'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2007/03/must-haves-for-vs2005-sharepoint-coding.html' title='Must have&apos;s for VS2005 SharePoint coding'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-3747950026893518047</id><published>2007-03-14T13:15:00.000-05:00</published><updated>2007-03-14T14:13:38.407-05:00</updated><title type='text'>Details about Site Enumeration</title><content type='html'>&lt;span style="font-size:85%;"&gt;There are a few different ways to enumerate sites through the SharePoint Object Model.   One thing to keep in mind: a 'site' in OM lingo refers to a top level site.  Everything else - subsites - are referred to as 'webs'.  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;When you create a new SharePoint site, unless you're creating a new Site Collection through SharePoint Central Administrator, you're creating a subsite on an existing site collection.  This is true from the root WSS site - &lt;a href="http://myserver"&gt;http://myserver&lt;/a&gt; - any sites created through the Site Actions menu are subsites of the root site.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;So - here are some properties I use to crawl through the set of site collections &amp; subsites.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;SPSite.AllWebs - this property of the SPSite object returns the top level site as well as all of the subsites of the top level site.   This is helpful if you need to get a list of all of a WSS web application's sites and subsites, say if you were doing a site specific backup or report.  But since the data listed isn't hierarchical, if you want to build a site tree view not all that helpful.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;SPSite.RootWeb - this returns the SPWeb object for a site.  Most useful when you get a top level site and want to look at the contents of the site, not just site properties.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;SPSite.RootWeb.Webs - this returns just the site collections underneath the SPSite object.  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;SPWeb.Webs - returns the sites immediately underneath the SPWeb site&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Now, let's say you want to open up the URL &lt;a href="server/sites/sc1/subsite1"&gt;http://server/sites/sc1/subsite1&lt;/a&gt; using the following line of code:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;SPSite parentSite = new SPSite("&lt;a href="http://myserver/sites/SC1/SubSite1"&gt;http://myserver/sites/SC1/SubSite1&lt;/a&gt;")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;If you look at parentSite.Url, you'll see the URL to the site collection: &lt;a href="http://myserver/sites/SC1"&gt;http://myserver/sites/SC1&lt;/a&gt;, and not the Subsite you wanted.  There's probably a more elegant way to do this, but what I do is use the AllWebs property then get the site relative URL ('SubSite1') as the AllWebs indexer:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;String targetUrl = "&lt;a href="http://server/sites/sc1/subsite1"&gt;http://server/sites/sc1/subsite1&lt;/a&gt;";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;String relativeUrl = targetUrl.Replace(parentSite.Url, "");  // parentSiteUrl = &lt;a href="http://myserver/sites/sc1"&gt;http://myserver/sites/sc1&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;SPWeb subsiteWeb = parentSite.AllWebs[relativeUrl];   // relativeURL = 'SubSite1'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-3747950026893518047?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/3747950026893518047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=3747950026893518047' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/3747950026893518047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/3747950026893518047'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2007/03/details-about-site-enumeration.html' title='Details about Site Enumeration'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11781538.post-4372064881325473453</id><published>2007-03-14T09:20:00.000-05:00</published><updated>2007-03-14T09:28:18.615-05:00</updated><title type='text'>SharePoint web parts vs ASP.Net 2.0 web parts</title><content type='html'>When I was setting up my second WSS v3 web part (got HelloWorld to work!) I needed to add in a web part property.  I copied in the correct code, but that property just would not appear when I edited the web part settings.  The culprit:  When developing a web part for WSS v3 or MOSS, make sure to extend  Microsoft.SharePoint.WebPartPages.WebPart instead of System.Web.UI.WebControls.WebParts.WebPart.  That is:&lt;br /&gt;&lt;br /&gt;&lt;p&gt;public class MyWebPart: Microsoft.SharePoint.WebPartPages.WebPart&lt;/p&gt;&lt;p&gt;instead of&lt;/p&gt;&lt;p&gt;public class MyWebPart: System.Web.UI.WebControls.WebParts.WebPart&lt;/p&gt;&lt;p&gt;You might also want to remove the reference to System.Web.UI.WebControls.WebParts from your Using/Imports statements.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11781538-4372064881325473453?l=stevesps.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevesps.blogspot.com/feeds/4372064881325473453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11781538&amp;postID=4372064881325473453' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/4372064881325473453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11781538/posts/default/4372064881325473453'/><link rel='alternate' type='text/html' href='http://stevesps.blogspot.com/2007/03/sharepoint-web-parts-vs-aspnet-20-web.html' title='SharePoint web parts vs ASP.Net 2.0 web parts'/><author><name>Steve</name><uri>http://www.blogger.com/profile/04925496141709492938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
