Archive

Posts Tagged ‘SharePoint’

Custom SharePoint .ASPX form–“Could Not Load Type”

July 8th, 2010 admin No comments

This is starting to get dangerous…I’m blogging about SharePoint development twice in a row.  Again, this may be something very basic to most SharePoint developers, but as I learn, I enjoy blogging about issues I’ve discovered and things I’ve learned as I continue to develop more.

My next venture into SharePoint development is to create some custom .ASPX forms for use within our SharePoint environment.  For our situation, InfoPath Forms Services would make much more sense, unfortunately, we only have SharePoint 2007 Standard with no plans to go to Enterprise.

So, I created a very basic .ASPX file with an equally as simple .cs (code behind file), packaged it all up as solution and deployed it.  However, when I went to access the site, I encounter a “Could Not Load Type…” error.  After a quick search on Google, I found – http://blogs.catapultsystems.com/matthew/archive/2007/12/07/could-not-load-type-error.aspx between that post and the post by Andrew Connell that was referenced there I was able to solve my problem.

When I had created my .aspx file I had failed to use the “5 part name” to reference the assembly file.  I had put Inherits=”NewForm.NewForm” rather than Inherits=”NewForm.NewForm, NewForm, Version=1.0.0.0, Culture=neutral, PublicKeyToken=*********”

As soon as I changed my .aspx file to use the 5 part name and redeployed my solution everything worked perfectly!

Reset Search Index – SharePoint Timer Job

July 7th, 2010 admin No comments

We have been having an issue with our search indexing and crawling in one of our SharePoint farms.  The problem is that after an undetermined set of time, pretty much all search queries wind up returning several results that show nothing but an IE icon.  The result isn’t attached or any page or give any textual information.  Obviously best case would be to figure out what causes this error, but at this point in time we haven’t been able to find the problem.

However, what we have discovered is that simply resetting the search index and running a full crawl will solve the issue.

So…until we can solve the issues, I wrote a small SharePoint timer job that simply resets our search index right before a scheduled full crawl runs.  I used Andrew Connell’s post (http://www.andrewconnell.com/blog/articles/CreatingCustomSharePointTimerJobs.aspx) to develop the Timer Job, Solution and Feature and modified it and was able to find the following code on http://www.sharepointdev.net/sharepoint–development-programming/programmatically-reset-all-crawled-content-41959.shtml that I inserted into the timer job frame work in order to automatically reset our index on a regular schedule to minimize the risk of our search issue effecting the end users.

try
{
    SearchContext sc = SearchContext.GetContext(ServerContext.Default);
    sc.Reset(true);
}
catch (Exception ex)
{
    throw new InvalidOperationException("Unable to reset content index.", ex);
}

For some of you, this may not seem like much, but coming from the SharePoint Administration/Configuration side of SharePoint and having very little real development experience I was rather proud of myself.

SharePoint 2010, Internet Explorer and FireFox

April 20th, 2010 Ben No comments

Microsoft has been talking about how much better the user experience with SharePoint 2010 is when using browsers other than Internet Explorer, mainly, Mozilla Firefox.  They have been doing a lot of SharePoint demo’s with Firefox to demonstrate this ability and Firefox has been labels as being a level 1 browser for SharePoint 2010.

However, in my use of Firefox, I have found a couple of things so far that still work only when using Internet Explorer.

1. You can’t upload multiple files to a document library from within Firefox.  This is due to the fact that for some of these actions.  SharePoint 2010 does indeed still use ActiveX controls.  In fact, some people don’t even have this option in Internet Explorer according to this post – http://sharepoint4u.wordpress.com/2009/05/07/no-multiple-upload-no-connect-to-outlook/

2. There isn’t the ability to drag and drop to re-arrange web parts on a SharePoint site or to move them between zones.  You must move the web parts around by using the setting in the web part properties.

I am actually somewhat surprised by both of these limitations.  The first one probably more so than the first, especially considering that when using Microsoft SkyDrive you have the ability to upload multiple files using Firefox.  You would think this same type of functionality could exist in SharePoint 2010.

Based on the most recent posts by Microsoft, http://technet.microsoft.com/en-us/library/cc263526%28office.14%29.aspx, it doesn’t look like they have plans on changing any of these limitations.  This site contains additional details on these limitations as well as other limitations that exist for various browsers when accessing SharePoint 2010.

SharePoint 2010 Complete Install on Windows 7

February 20th, 2010 Ben 1 comment

So this weekend I decided to install SharePoint 2010 on my desktop at home.  My desktop is running Windows 7, and due to requirements of other software I need, I’m unable to run Windows Server 2008 on it.

Running a stand alone installation of SharePoint 2010 is great, however, I wanted to see if I could get a complete install on Windows 7 and user SQL Server 2008.  Fortunately, I found this blog post by Neil Hodgkinson that explained how to do it.  Everything appeared to be working great and the configuration wizard finished without any problems.  Unfortunately, that appearance didn’t last too long.

My problem arose when I went into Central Administration and, despite being a farm administrator, the first thing I noticed was I couldn’t create new web applications.  There were some other security issues as well, however, those are beside the point.  The purpose of this post is how to go about fixing this issue if you encounter the same thing.

After mulling over the issues for a few minutes, I remember are beloved User Access Control (UAC) and other issues I’ve seen when it is enabled on Windows Server.  So, I went into my UAC settings, disabled them complete, restarted my computer, logged into Central Administration and what do you know, it worked!  I can now create new web applications and have full control over my SharePoint 2010 installation.

SharePoint Memory Leak

February 15th, 2010 Ben 1 comment

As discovered by Todd Carter there is a memory leak in SharePoint 2007.  He has outlined the details as well as a work around to the fix the memory leak.

I decided to do some testing with it, however, when I compiled the dll, placed it into the GAC, and changed my global.asax file, I started getting this error: “Could not load file or assembly ‘[Assembly Name]’ or one of its dependencies.  The system cannot find the file specified.”

After digging into this error for a while I discovered my problem.  This may be fairly obvious to developers out there :) , but coming at this from more of a SharePoint administrator type roll, I missed this one step that isn’t outlined in the steps provided by Todd.

After deploying your dll to the GAC, you need to open up your web.config and place

<add assembly="[Assembly Name], Version=[Version Number], Culture=neutral, PublicKeyToken=[Public Key Token]" />

in the web.config file of the web application you wish to apply your fix to.  This line should be added between <assemblies> and </assemblies> in the web.config file.

All of the information: Assembly Name, Version Number and the Public Key Token can be found by right clicking on your dll in the GAC and viewing the properties of the dll.

Once I added the assembly to my web.config for the web applications I was trying to apply the fix to, everything worked as expected.

Hide Web Part Headers with SharePoint 2010

February 1st, 2010 Ben 4 comments

A while a go a write a short post on how to hide web part headers in SharePoint 2007.  Recently I had some inquire how to do the same thing for SharePoint 2010.  So, here is what to do in order to hide a web part header in SharePoint 2010.

1.  Add a content editor web part to your page.

2. Edit the Web Part

3. Click in the content area of the web part, click HTML and select “Edit HTML Source”

4. Put the following code in the web part:

  1. <style>
  2.   TR.ms-viewheadertr > TH.ms-vh2 {
  3.   DISPLAY: none
  4.   }
  5. </style>

 

5. Click “OK”

6. Expand “Appearance” (on the right side of the page)

7. Set the chrome type to “None”

8. Click “OK” and then save and check in your page.

The headers of your web part should now be hidden.  This can be extremely helpful when your page contains a web part using “boxed” for your style when creating a list view.  The only downside to this approach is if you have multiple web parts on a single page, it will hide the headers for all the web parts on your site.

How to do the same thing in SharePoint 2007

Office Suite 2010 Beta Released on TechNet (with links to the downloads)

November 16th, 2009 Ben No comments

For those of you with a TechNet subscription and an itching desire to download the Office 2010 Suite of products, they are now here!! I’m sure every other blogger is writing this same post so I won’t make it long.  The RSS feed for the released products is here: http://technet.microsoft.com/en-us/subscriptions/subscription-downloads.rss if you want direct links to the downloads, here they are:

Office Search Server Express 2010 Beta (x64)

Office SharePoint Foundation Server 2010 Beta (x64)

Office Visio Premium 2010 Beta (x64)

Office Visio Premium 2010 Beta (x86)

FAST Search Server SharePoint 2010 Beta (x64)

Office Project Server 2010 Beta (x64)

Office Project Professional 2010 Beta (x64)

Office Project Professional 2010 Beta (x86)

Office Professional Plus 2010 Beta (x64)

Office Professional Plus 2010 Beta (x86)

Office SharePoint Designer 2010 Beta (x86 and x64)

Office SharePoint Server 2010 Beta (x64)

Office SharePoint Foundation Server 2010 Beta (x64)

Office Business Contact Manager 2010 Beta (x64)

Office Web Applications 2010 Beta (x64)

That is everything I currently see on TechNet.  They are all English versions and please, no one comment and tell me I have the wrong names.  I realize the names above don’t all match up to the new names that Microsoft announced when it comes to SharePoint.  I just copied the names directly from the TechNet site.

SharePoint 2010 Blog Posts

October 19th, 2009 admin 3 comments

Unfortunately, I was unable to attend the SharePoint conference this year. However, I have been trying to follow it all day via twitter and the #SPC2009 hash tag. There have been a ton of tweets and with the tweets and the amount of people a lot of duplicates. As tweets have been going out all day I’ve tried to capture new blog posts about the 2010 stack and am attempting to put together a good list of blog posts that I’ve have noticed today (and continue to notice throughout the week). Feel free to send me any blog posts I have missed or you would like me to add to my site. So, here they are:

SharePoint

SharePoint Overview from the Microsoft SharePoint Team – http://blogs.msdn.com/sharepoint/archive/2009/10/19/sharepoint-2010.aspx

SharePoint 2010 Home Page - http://sharepoint2010.microsoft.com/Pages/default.aspx

SharePoint Conference 2010 Home Page (Keynote video soon) – http://www.mssharepointconference.com/Pages/default.aspx

SharePoint Conference Video Highlights – http://www.mssharepointconference.com/Pages/videohighlights.aspx

SharePoint 2010 MSDN Site – http://msdn.microsoft.com/en-us/library/dd776256.aspx

SharePoint 2010 TechNet Site – http://technet.microsoft.com/en-us/sharepoint/default.aspx

Pre-Register for SharePoint 2010 Beta – http://sharepoint2010.microsoft.com/try-it/Pages/Trial.aspx

Arpan Shah, Welcome to SharePoint 2010 – http://blogs.msdn.com/arpans/archive/2009/10/19/welcome-to-sharepoint-2010.aspx

Andrew Connell’s Blog (Several SharePoint 2010 posts already) – http://www.andrewconnell.com/blog/

SharePoint Sharpener, Rundown of New Features – http://sharepointsharpener.wordpress.com/2009/10/19/spc09-sharepoint-2010-unveiled-rundown-of-new-features/

SharePoint 2010 Installation (not in English, but has screen shots of the install) – http://sharepointsisters.de/2009/10/installation-sharepoint-server-2010/

SharePoint 2010 Preview by Knowledge Management Associates – http://blogs.kma-llc.net/microknowledge/2009/10/sharepooint-2010-preview.html

A listing of SharePoint 2010 Documentation and Posters published by Microsoft – http://bink.nu/news/sharepoint-2010-documentation.aspx

Document Management in SharePoint 2010 – http://dotneteers.net/blogs/aghy/archive/2009/10/19/document-management-in-sharepoint-2010.aspx

ZDNet SharePoint 2010 Announcement – http://blogs.zdnet.com/microsoft/?p=4278

Corey’s SharePoint 2010 Observations – http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2009/10/19/corey-s-big-post-of-sharepoint-2010-observations.aspx

Ballmer, SharePoint and the Economy – http://www.infoworld.com/d/developer-world/microsofts-ballmer-shows-sharepoint-and-cites-its-link-economic-prosperity-587

Another index of some SharePoint 2010 postings online – http://webpartner.com/PNPT#7fc51a6079d86e3841db

Mike Gotta Notes from SPC09 Day 1 – http://mikeg.typepad.com/perceptions/2009/10/sharepoint-2009-conference-morning-keynotes.html

SharePoint 2010 Public Beta to be released next month – http://news.cnet.com/8301-13860_3-10377483-56.html

StoragePoint for SharePoint 2010 – http://www.reuters.com/article/pressRelease/idUS164545+19-Oct-2009+PRN20091019

SharePoint 2010 Central Admin – http://planetmoss.blogspot.com/2009/10/central-administration-in-sharepoint.html

Eli Robillard, Sandbox Solutions and Security in WSS 4.0 (SharePoint Foundation) – http://weblogs.asp.net/erobillard/

SharePoint Conference 2009, Morning Keynote from The Burton Group – http://ccsblog.burtongroup.com/collaboration_and_content/2009/10/sharepoint-2009-conference-morning-keynotes.html

SharePoint 2010 Links from S.S. Ahmed, SharePoint MVP – http://vspug.com/ssa/2009/10/19/sharepoint-2010-links/

Lookup Columns in SharePoint 2010 – http://weblogs.asp.net/bsimser/archive/2009/10/19/sp2010-what-s-new-lookup-columns-spc09.aspx

Overview of SharePoint Conference 2009, Day 1 – http://weblogs.asp.net/bsimser/archive/2009/10/19/the-kimono-is-open-the-veil-is-lifted-the-gags-are-removed-spc09.aspx

BI

BI in SharePoint 2010 – http://sharepoint.microsoft.com/blogs/GetThePoint/Lists/Posts/Post.aspx?List=8d9e2a99-f288-47c2-916b-2f32864f7b82&ID=268

Office 2010

PivotPoint for Excel 2010 – http://www.powerpivot.com/

Office 2010 Public Beta to be released next month – http://news.cnet.com/8301-13860_3-10377483-56.html

Visual Studio 2010

Announcing Visual Studio 2010 – http://blogs.msdn.com/somasegar/archive/2009/10/19/announcing-visual-studio-2010-and-net-fx-4-beta-2.aspx

Again, this is just a list of what I could capture while keeping an eye on twitter all day.  Feel free to email me addition blog posts or add them as a comment as I will try to continue updating this list throughout the week.

Office 2010 and SharePoint 2007

August 28th, 2009 admin 12 comments

After installing Office 2010 on my computer (both laptop and desktop) running Windows 7 RTM, I had a problem opening any Office files stored in our SharePoint 2007 environment.  I would click on a file to open it or edit it, the Office 2010 application would open, however, the file wouldn’t open.

I could download the document to my desktop, open it, edit it, and re-uploaded it, but this fare far from ideal.  I could link the site to Colligo, but I don’t want to have connect to a site every time I want to open a document.

Finally, today I ran across this helpful string of comments on the TechNet forum – http://social.technet.microsoft.com/Forums/en-US/office2010general/thread/230fc30a-8922-4c75-a8fc-540b0282dff8

In short, the solution is to make a fake proxy in IE:

  1. Open up Internet Explorer
  2. Click Tools –> Internet Options
  3. Click the Connections tab
  4. Click LAN settings
  5. Check “Use a proxy server for your LAN (These settings will not apply to dial-up or VPN connections).”
  6. Enter 127.0.0.1 for the address
  7. Click Advanced
  8. In the Exceptions type: *.*
  9. Click OK, OK and OK

You should now be able to browse to a SharePoint site, click an Office document and have it successfully open in your Office 2010 client.  This successfully worked for me with MOSS and reports in the TechNet forum are that it works with WSSv3 as well.

SharePoint ULS Logs No Longer Record Events

August 20th, 2009 Ben 1 comment

Just this morning, I was working with a client who had some errors pop up in their SharePoint farm.  I looked at the Windows Event log and didn’t find a whole lot of helpful info.  So, I moved on to the ULS logs, to my dismay, they were almost all 0 KB with a couple of files that were 2 KB or 3 KB.

I opened up the files that appeared to have some text in them and found the following entry:

“08/20/2009 10:38:58.08     wsstracing.exe (0x07A0)                     0x07CC    ULS Logging                       Unified Logging Service           uls1    Monitorable    Tracing Service lost trace events.  Current value 5.”

Naturally I went to Google with my error as I had never seen this before and found this blog post: http://weblogs.asp.net/jimjackson/archive/2008/05/13/sharepoint-logs-tacing-service-lost-trace-events.aspx by Jim Jackson.  I restarted the Windows SharePoint Services Tracing service just as he suggested and bingo! My ULS logs started recording events again.  Thanks Jim!