Time to beef up that laptop! There's a posting on TechNet describing the minimum hardware footprint for SharePoint 2013:
Of particular note is the RAM requirement - even for a developer box SP2013 wants 8GB of RAM. A lot of the newer laptops go up to 32GB but my HP 8540w is maxed at 8GB. I'm installing now using my usual two VM model, one for the AD & SQL Server box, the other for SharePoint. Once done I'll post on performance, compared to the server running in our model office lab.
Tuesday, July 17, 2012
Monday, July 16, 2012
SharePoint 2013 preview released!
Got TechNet or MSDN? Get downloading!!
I'm looking forward to all of the new capabilities of SharePoint! Will be blogging details shortly.
Great info available on MSDN - the link to download the preview version, as well as some great training & docs on SP2013:
I'm looking forward to all of the new capabilities of SharePoint! Will be blogging details shortly.
Great info available on MSDN - the link to download the preview version, as well as some great training & docs on SP2013:
Friday, June 15, 2012
Hyper-V and Windows 8 and SharePoint, part 2
Still running Windows 8 and I'm growing to like it...but let's take a look at:
The Good
The Bad
The Ugly
A few Windows 8 tips:
Now, as for the rest of Windows 8, I don't really use the Metro stuff yet since my laptop doesn't have a touchscreen. I've figured out how to make the 'start' work, and I don't mind it...and I'm a keyboard guy so Alt-F4 from the desktop brings up the Shutdown menu, again I can live with that.
The Good
- It's a 64 bit virtualization story from Microsoft, at long last!!
- Uses the same file format as the Windows Server Hyper-V (VHD) and has an extended format that ran better for me - I converted my VHDs to VHDX's and performance did seem better
- Works with both my wired and wireless network connections
- Dynamic RAM allocation!
The Bad
- No audio support in the virtual machine. In theory if I use Remote Desktop Connection to log on instead of Hyper-V connect this would work, but so far I haven't been able to get it working. Not that big a deal, I really don't need the audio on my servers.
- No more Shared Folders...I miss this from VirtualPC/VirtualBox. I can use regular ol network shares, but it's easier to just set it up with \\vboxsvr\c_drive!
- Video resolutions are fixed - I can't resize the video window to whatever size I need, gotta pick from 1024x768, 1152x864, 1280x1024, or 1600x1200. While these are acceptable, I'd like to be able to use more of the width & less of the height on my 1600x1200 monitor.
The Ugly
- Can't have more than one hypervisor installed. That is, I can't also install VirtualBox if I have the Hyper-V role installed - networking doesn't work but worse, the VM won't boot up.
- Performance is not as good as VirtualBox. It's acceptable, but I'll call this ugly because I want performance to be at least as good as VirtualBox.
- Clipboard support. This gets an ugly vote because there isn't an integrated clipboard between the guests and host. There's a one way 'insert clipboard text' option available, but I can't copy text in the guest and paste in the host. Maybe I do need to get Remote Desktop Connection working!
A few Windows 8 tips:
- There was an update last Tuesday that really seemed to improve system stability - be sure you get those patches installed!
- My AOC USB monitor does not work - don't use the DisplayLink driver! Causes the display to not appear, and with Bitlocker installed I couldn't get to a system restore point :-(
Now, as for the rest of Windows 8, I don't really use the Metro stuff yet since my laptop doesn't have a touchscreen. I've figured out how to make the 'start' work, and I don't mind it...and I'm a keyboard guy so Alt-F4 from the desktop brings up the Shutdown menu, again I can live with that.
Monday, May 14, 2012
Hyper-V and VirtualBox with Windows 8
Well, here I am posting this on my Windows 7 laptop...I ended up reverting back to Windows 7 after a not too successful run with Hyper-V on Windows 8. I have a pretty decent laptop, 8GB of RAM & an older generation i7 CPU (2 core, 2 threads) and with Windows 7 it runs VirtualBox pretty well.
I have my domain controller/SQL Server box on one VM, and my SharePoint dev environment on the other. I also have a Windows 7 workstation as part of the internal network so I can do some single signon testing. With VirtualBox I can have all three of these machines running at the same time with decent performance - two are on an eSata SSD & the other is on an internal fairly fast hard drive.
With Windows 8, the good news is if you've used the VHD file format for your virtual machines, you're in luck - with a bit of work on changing additions & a few reboots you can definitely use your VirtualBox VMs. If you went with the VDI file format, you're not out of luck, you just need some patience - VirtualBox offers a method to clone your VDI files to the VHD format. Good instructions for doing this here: http://srackham.wordpress.com/cloning-and-copying-virtualbox-virtual-machines/. It takes a while but in the end I did have a workable copy of my VDI file in VHD format, which Hyper-V on Windows 8 could handle. Didn't try any VMWare image conversions, good luck with that!
But that's about as far as the happiness went...when I fired up the VMs performance was slow. I moved the VHDs around so that I was running on an internal SATA II SSD, not a rocketship drive but still plenty fast. Got the additions sorted out, but still no luck. The kicker was on the Windows 7 workstation machine, the video driver seemed very slow - colors didn't look great & performance was poky. Should have taken a screen capture, sorry about that!
So for now the answer is, I liked what I saw - our corporate hypervisor solution is Hyper-V with System Center 2012's Virtual Machine Manager. I took one of our prebuilt VHD files & it worked great, and I was able to use my VirtualBox VMs with Hyper-V. Performance was just too slow for now - high hopes for the next release of Windows 8 & higher hopes for the RTM release, hope it comes soon!
I have my domain controller/SQL Server box on one VM, and my SharePoint dev environment on the other. I also have a Windows 7 workstation as part of the internal network so I can do some single signon testing. With VirtualBox I can have all three of these machines running at the same time with decent performance - two are on an eSata SSD & the other is on an internal fairly fast hard drive.
With Windows 8, the good news is if you've used the VHD file format for your virtual machines, you're in luck - with a bit of work on changing additions & a few reboots you can definitely use your VirtualBox VMs. If you went with the VDI file format, you're not out of luck, you just need some patience - VirtualBox offers a method to clone your VDI files to the VHD format. Good instructions for doing this here: http://srackham.wordpress.com/cloning-and-copying-virtualbox-virtual-machines/. It takes a while but in the end I did have a workable copy of my VDI file in VHD format, which Hyper-V on Windows 8 could handle. Didn't try any VMWare image conversions, good luck with that!
But that's about as far as the happiness went...when I fired up the VMs performance was slow. I moved the VHDs around so that I was running on an internal SATA II SSD, not a rocketship drive but still plenty fast. Got the additions sorted out, but still no luck. The kicker was on the Windows 7 workstation machine, the video driver seemed very slow - colors didn't look great & performance was poky. Should have taken a screen capture, sorry about that!
So for now the answer is, I liked what I saw - our corporate hypervisor solution is Hyper-V with System Center 2012's Virtual Machine Manager. I took one of our prebuilt VHD files & it worked great, and I was able to use my VirtualBox VMs with Hyper-V. Performance was just too slow for now - high hopes for the next release of Windows 8 & higher hopes for the RTM release, hope it comes soon!
Timer job - cannot uninstall, missing default public constructor
So the answer is yes, timer jobs do need a default constructor, even if there isn't a need to have one. When my colleague tried to deploy an update to a timer job after pulling out the constructor, he got the following message:
Uninstall-SPSolution: MyCo.MyTimerJob.JobDefinition cannot be deserialized because it does not have a public default constructor
Tried to uninstall through the SharePoint UI but had the same error.
The fix was to put the constructor back in the code, then take the DLL and GAC it onto the server. Use PowerShell for this or if you have permissions drop it into the c:\windows\assembly folder, then perform an IISReset for good measure. After that you can uninstall the solution and redeploy.
Uninstall-SPSolution: MyCo.MyTimerJob.JobDefinition cannot be deserialized because it does not have a public default constructor
Tried to uninstall through the SharePoint UI but had the same error.
The fix was to put the constructor back in the code, then take the DLL and GAC it onto the server. Use PowerShell for this or if you have permissions drop it into the c:\windows\assembly folder, then perform an IISReset for good measure. After that you can uninstall the solution and redeploy.
Sunday, March 04, 2012
Windows 8, VirtualBox & Hyper-V
How could I resist...don't tell Corporate IT, but I just spent the weekend installing Windows 8 on my HP 8540w workstation. The install went fine, ended up doing a clean install as the upgrade didn't complete for whatever domain policy reason.
I'm mainly interested in Windows 8 because - FINALLY!!!! - Microsoft has a virtualization story for 64 bits. I started out using VirtualPC when I was doing SharePoint 2003 development - to be able to have a server running on my laptop with my own domain, being able to have multiple servers running to simulate my SharePoint production environments, priceless. Then along came SharePoint 2010 and so much for VirtualPC...like many others I had found out about VirtualBox & have become a fan - it's a great piece of software, has been running like a charm for me & my team, but darn it, my production servers are running Hyper-V and it would be nice to try it, but was I willing to install Server 2008 as my host OS? nah....
So here we are with Hyper-V now on Windows 8. I'm kind of hip deep in some development projects so I can't just switch over entirely to it yet, so I thought to install VirtualBox first, to be able to keep on working, then migrate over to Hyper-V.
Problem #1...I couldn't enable video acceleration in VirtualBox. Yeah, not a big deal, but I went in to Control Panel & saw it was using the default Microsoft video driver as my graphics card driver. That wasn't going to work...so I installed the latest NVidia graphics driver from the HP 8540w Windows 7 drivers site and I'm good to go. Display looks MUCH nicer too, thank you very much.
Problem #2...so I couldn't get to the VirtualBox properties System Acceleration tab - it was grayed out. Tried booting up the VPC & it kept rebooting. The machine settings were correct - IO APIC enabled, enough RAM, 2D video acceleration...but still wouldn't start up Windows. I know my laptop supports processor enhancements, but then thought to remove Hyper-V (Start / Run / appwiz.cpl) and removed Hyper-V....then the acceleration tab is enabled, and the VPC started up just fine.
So for now, looks like only one virtualization technology at a time. Soon as my development project dust is done - or next weekend, whichever comes first - I'll get a new Hyper-V dev environment spun up, then it'll be all Hyper-V going forward. Hmm, let's see if I can take my VirtualBox VHD & import them into Hyper-V - be back in a bit!
Thursday, January 26, 2012
SharePoint 2010 - Access is Denied, and I'm Site Collection Owner!
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!
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.
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 SharePointServerCachesPerformance.docx - 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:
Happy 2012!!
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.
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 SharePointServerCachesPerformance.docx - 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:
- Open SharePoint Central Admin
- Click on Application Management
- Click Manage web applications under Web Applications
- Select (single click) the web app having issues (or better yet do them all while you're here!)
- Click on the User Policy icon in the ribbon
- Click Add Users
- Click Next to select the zone, go with the default All Zones
- Enter in the account of your SuperReader user, and grant this account Full Read permissions, then click Finish.
- Repeat this for the SuperUser user, but grant this user Full Control.
- iisreset - and let those users log in!
Happy 2012!!
Wednesday, December 28, 2011
Road trip
Here we are at the end of December & 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!!
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&T before we left, then once the plane landed & 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.
There were a few iPhone apps I found particularly helpful - the Explore Metro subway navigation maps were fantastic - I downloaded the Shanghai & 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.
TripAdvisor's app was also helpful for showing restaurants & 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.
The navigation & GPS capability of the iPhone itself was the most helpful of all. I was able to plug in an address in English (pinyin) & 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.
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!!!
If you're planning on traveling between cities, the train system was really convenient, reasonably priced, comfortable & on time. There's an app to help understand train schedules, really good. Armed with the "G" train number and time of departure, we were able to purchase tickets knowing the time & price before getting to the counter.
How the subway systems in Beijing & Shanghai work:
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 & had a solid 5 bars of signal the whole way.
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.
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 & be gently nudged out of the way without an excuse me. Just the way it is, and it does work.
We bought some baby Mandarin oranges in Beijing & Shanghai, dang they were good! Great strawberries also.
Bargaining...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.
Hotels...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 & some of those "yo tiao" doughnuts, and you'll have enough calories to keep you til the noon dumpling or noodle soup feed.
Money exchange...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.
Lastly, English...yes, there is plenty of English spoken, and be prepared to see people listening in to your chats on the subway & at restaurants, no worries it's just curiosity! At the same time, be armed with some basic Mandarin (or get the LearnChinese app & 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 & asking for that item.
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 & could keep going. Oh, one last thing...kudos to Delta Airlines 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 & the LOTR trilogy), Tron:Legacy, and more!!
OK enough for now - next post will be about SharePoint web templates, promise!
Zai jian!
iPhone in China
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&T before we left, then once the plane landed & 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.
There were a few iPhone apps I found particularly helpful - the Explore Metro subway navigation maps were fantastic - I downloaded the Shanghai & 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.
TripAdvisor's app was also helpful for showing restaurants & 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.
The navigation & GPS capability of the iPhone itself was the most helpful of all. I was able to plug in an address in English (pinyin) & 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.
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!!!
Subway & Train Travel
If you're planning on traveling between cities, the train system was really convenient, reasonably priced, comfortable & on time. There's an app to help understand train schedules, really good. Armed with the "G" train number and time of departure, we were able to purchase tickets knowing the time & price before getting to the counter.
How the subway systems in Beijing & Shanghai work:
- 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.
- 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!
- 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.
- Get to the station platform & decide which train to use - use your handy iPhone app to determine the previous & next stations, then look to see the directions for the trains indicated & hop on. There's a TV that shows when the next train will be arriving.
- Station announcements are made in Mandarin & English & are very clear.
- The trains in Shanghai & a few in Beijing have LED indicators showing where the train is between stations & which station is next.
- Dig the animation displays in the tunnels in Beijing!
- If a seat opens up - don't think, go for it!! This is a serious you snooze, you lose situation!
Other Impressions
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 & had a solid 5 bars of signal the whole way.
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.
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 & be gently nudged out of the way without an excuse me. Just the way it is, and it does work.
We bought some baby Mandarin oranges in Beijing & Shanghai, dang they were good! Great strawberries also.
Bargaining...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.
Hotels...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 & some of those "yo tiao" doughnuts, and you'll have enough calories to keep you til the noon dumpling or noodle soup feed.
Money exchange...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.
Lastly, English...yes, there is plenty of English spoken, and be prepared to see people listening in to your chats on the subway & at restaurants, no worries it's just curiosity! At the same time, be armed with some basic Mandarin (or get the LearnChinese app & 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 & asking for that item.
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 & could keep going. Oh, one last thing...kudos to Delta Airlines 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 & the LOTR trilogy), Tron:Legacy, and more!!
OK enough for now - next post will be about SharePoint web templates, promise!
Zai jian!
Friday, April 08, 2011
Referencing resources in SharePoint libraries
Wow, my first blog posting for 2011 - yes I have been busy, and neglectful!
One thing that's kept me busy is working with jQuery & 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...
because, I wasn't referencing these as:
<script src="./Jquery/jquery.tools.min.js" type="text/javascript">
Note the "." before the library name - that's what was missing.
Back to it! See ya!
One thing that's kept me busy is working with jQuery & 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...
because, I wasn't referencing these as:
<script src="./Jquery/jquery.tools.min.js" type="text/javascript">
Note the "." before the library name - that's what was missing.
Back to it! See ya!
Monday, October 25, 2010
DoDN Source & Presentation
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.
Here's the link to the zip file: DoDN-SharePoint-Silverlight.zip
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 & content the code is looking for. Post a comment or email me if you get stuck.
Thanks again for attending!
Steve & Charles
Here's the link to the zip file: DoDN-SharePoint-Silverlight.zip
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 & content the code is looking for. Post a comment or email me if you get stuck.
Thanks again for attending!
Steve & Charles
Thursday, October 07, 2010
Visual Studio 2010 & Crystal Reports - change server at runtime
What? This isn't a SharePoint topic! You're right...every so often have to stretch a little bit.
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 & 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!
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.
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 & subtables on the report, but that didn't help me - still got that logon error.
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.
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!
Dim dt As DataTable
dt = BindReport()
rpt.SetDataSource(dt)
Dim reportDate As DateTime = Session("CurrentPayPeriod")
' Tell the browser this is a PDF document so it will use an appropriate viewer.
Response.Buffer = True
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
rpt.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, False, "Timesheet Report")
Dim conString As String = System.Configuration.ConfigurationSettings.AppSettings("connectString")
Dim con As SqlConnection = New SqlConnection(conString)
con.Open()
Dim cmd As New SqlCommand("usp_GetReportData", con)
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add("@SelectedDate", SqlDbType.Date).Value = CDate(Session("ReportPeriod"))
cmd.Prepare()
Dim sqlAdapter As SqlDataAdapter = New SqlDataAdapter(cmd)
Dim dtReport As DataTable = New DataTable()
sqlAdapter.Fill(dtReport)
con.Close()
Return dtReport
End Function
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 & 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!
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.
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 & subtables on the report, but that didn't help me - still got that logon error.
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.
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!
Dim dt As DataTable
dt = BindReport()
rpt.SetDataSource(dt)
Dim reportDate As DateTime = Session("CurrentPayPeriod")
' Tell the browser this is a PDF document so it will use an appropriate viewer.
Response.Buffer = True
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
rpt.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, False, "Timesheet Report")
Dim conString As String = System.Configuration.ConfigurationSettings.AppSettings("connectString")
Dim con As SqlConnection = New SqlConnection(conString)
con.Open()
Dim cmd As New SqlCommand("usp_GetReportData", con)
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add("@SelectedDate", SqlDbType.Date).Value = CDate(Session("ReportPeriod"))
cmd.Prepare()
Dim sqlAdapter As SqlDataAdapter = New SqlDataAdapter(cmd)
Dim dtReport As DataTable = New DataTable()
sqlAdapter.Fill(dtReport)
con.Close()
Return dtReport
End Function
Wednesday, September 01, 2010
Summer 2010
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!
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 & the Client Object Model for 2010 - blog post coming - it is sweet.
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.
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.
Look for more blog entries about all of the above...really...I promise...
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 & the Client Object Model for 2010 - blog post coming - it is sweet.
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.
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.
Look for more blog entries about all of the above...really...I promise...
Monday, April 12, 2010
Visual Studio 2010 web parts and the type could not be found or it is not registered as safe
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 & you'll be able to add it to your web part page.
Friday, March 12, 2010
SharePoint Saturday, speaking on workflow
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 & see if it's a contender for building workflows, compared to Visual Studio 2010.
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.
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.
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.
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.
With that - here's the link to the presentation: SharePoint Saturday Workflow Smackdown
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 & wait for the approval to kick in, you'll get a nice REJECTED instead. No email address. I also use SMPT4DEV to test the email messages - much easier than standing up Exchange! It's really handy.
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.
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.
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.
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.
With that - here's the link to the presentation: SharePoint Saturday Workflow Smackdown
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 & wait for the approval to kick in, you'll get a nice REJECTED instead. No email address. I also use SMPT4DEV to test the email messages - much easier than standing up Exchange! It's really handy.
Wednesday, January 06, 2010
Access Denied with SP custom web service
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).
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.
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.
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 http:// to http://localhost, the service ended up working fine. Repeated on a second server hosting the same instance.
Time to update the deployment documentation!!
And, happy 2010! Learned PowerShell yet?
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.
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.
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 http://
Time to update the deployment documentation!!
And, happy 2010! Learned PowerShell yet?
Wednesday, November 18, 2009
More on SP 2010 & Windows 7 install
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.
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.
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!
Well not quite, blogged too soon. The install failed on Step 8 of 10 with:
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)
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.
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.
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!
Well not quite, blogged too soon. The install failed on Step 8 of 10 with:
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)
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.
Tuesday, November 17, 2009
Installing SharePoint 2010 Beta on Windows 7 or Windows Vista
It is indeed possible! Microsoft has a good set of instructions here:
http://msdn.microsoft.com/en-us/library/ee554869(office.14).aspx
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 & it worked fine.
Enjoy!
http://msdn.microsoft.com/en-us/library/ee554869(office.14).aspx
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 & it worked fine.
Enjoy!
Wednesday, November 11, 2009
SharePoint 2010 and VirtualBox
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.
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!
Link to Virtual Box
Now just hang in there a few more weeks until the public beta is released!!
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!
Link to Virtual Box
Now just hang in there a few more weeks until the public beta is released!!
Monday, September 14, 2009
Custom web service - 401 Unauthorized
So I remember what I did for next time...
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.
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.
But then in my web service ASMX class, I added in SPSecurity.RunWithElevatedPrivileges - and poof the web service now works.
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.
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.
But then in my web service ASMX class, I added in SPSecurity.RunWithElevatedPrivileges - and poof the web service now works.
Thursday, July 16, 2009
TreeViewDataSource ShowDoclibChildren
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.
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.
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!
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.
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
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.
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!
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.
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
Subscribe to:
Posts (Atom)