Archive

Posts Tagged ‘SharePoint 2007’

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.

Internet Explorer, SharePoint, init.js error

June 1st, 2010 Ben 1 comment

The other day I had an annoying problem accessing SharePoint sites.  I am running Windows 7, IE8 and Office 2007 and Office 2010 Beta.

Any internal SharePoint site continued to throw the error of element not found for init.js

It only happened on my desktop (my laptop worked just fine).  I tried clearing the temporary internet files, browser cache, even uninstalling and reinstalling IE8.

Nothing worked, I finally found the solution here – http://social.technet.microsoft.com/Forums/en-US/sharepointgeneral/thread/41e1874f-7825-4bfe-ba4c-37255d198df2

So, I opened up SharePoint Designer 2007, ran the diagnostic tool in the Help menu, restarted IE and everything was back to working as normal.

SharePoint List – View Paged by First Letter

March 26th, 2010 Ben No comments

Have you ever had a long SharePoint list that you wanted paged by the first letter of a column rather than by simply picking the number of items you wanted on each page?

That’s exactly what I ran into the other day.  I had a list just short of 3000 medications that medical staff at work needs to reference.  They needed the list to be sorted alphabetically and be able to quickly jump to the various medications based on the first letter of the medication name.

After doing some searching I found this post that solved the issues and performed exactly as I was hoping – http://mdasblog.wordpress.com/2009/06/19/alpha-selection-of-list-items/

Additionally, here is a tutorial video that was posted in the comments of the blog posting that was very helpful.

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.

SharePoint Surveys and Excel 2010

December 14th, 2009 Ben 2 comments

I was working with SharePoint surveys the other day and discovered an old issue working with surveys and Microsoft Office that appears to have resurfaced.

We were trying to see what other reports we could generate from a SharePoint survey.  Naturally with the option to export to Excel, we figured why not just export all the survey data into Excel and play with it there.  To test it out I tried to get a variety of questions in the survey, one of these questions being the rating (matrix) survey question.

I created a few responses to the survey and attempted to export the list data to Excel (I’m running 2010 Beta).  Everything came over well with the exception of the matrix type questions.  I did some searching and this was also an issue with Excel 2003.  However, people said it was resolved with Excel 2007.  I installed Excel 2007 and sure enough the matrix questions imported into Excel 2007 just fine.  I tried Excel 2010 once more and the values still failed to come over.

So, it appears that the problem with importing matrix type of questions from SharePoint 2007 to Excel 2003 has returned in Excel 2010.  Granted, this is the beta, so maybe it will be fixed by the release.

I also want to do some testing with SharePoint 2010 surveys, Excel 2010 and possibly PowerPivot.  I’ve been reading some great things about PowerPivot but haven’t had much of a chance to play with it for myself.  Once I get a chance to do some testing with these tools I’ll write a new post.  Hopefully there will be some good news about doing more in depth analysis of SharePoint Survey results using these new tools.

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!

SharePoint 2007 – Updates Version Numbers

July 29th, 2009 Ben No comments

Thanks to a co-worker for this blog post – http://msfarmer.blogspot.com/2009/07/sharepoint-versions.html

It lists all of the updates for MOSS and WSS 2007 along with what version number the update is.  I’ve had several times when I’ve wanted to know exactly what version number went with which update and was never able to find a comprehensive list (I would always ask this co-worker if he knew :)

So, if you aren’t sure if an update fully installed (I’ve had it happen before) or you can’t remember the last update you installed into your farm, head over to the Microsoft Farmer blog and check it out!

I’m Back!! With Plenty of Tech Updates

July 28th, 2009 Ben 2 comments

After a little over a month since my last blog post I’m back.  The lapse in posting had several contributing factors.  The biggest being that within the last month I go married and then went on a week long honeymoon to St. Lucia with my beautiful bride. (I’ll maybe put up a few pics when we get our favorites).  That combined with the increased workload to make up for the time off didn’t give me a lot of time to blog.  I’ve also been eagerly awaiting the Office 2010 suite of products to start working with.

So, rather than posting sever updates, I figured I would post one update that highlights what has been going one.

First, I have the SharePoint 2010 bits that I have started testing.  Due to an NDA with Microsoft, I can’t talk about them other than if you want to get a peak, head over to http://sharepoint.microsoft.com/2010/Sneak_Peek/Pages/default.aspx where MS has posted 3 videos giving you a sneak peak at SharePoint 2010.

Secondly, I have also installed the Office 2010 clients.  I was accepted into the Office 2010 beta program on http://connect.microsoft.com.  There is no NDA in place for the clients, so there may be more posts following on that topic.

Also, Windows 7 and Windows Server 2008 R2 have both RTM’d.  You should expect to see them on MSDN and TechNet the beginning of August.  I’ve seen several dates, so I won’t try to predict, just keep your eyes open. You can see the official Microsoft Post here.

The June Cumulative Update Package for SharePoint 2007 has also been released.  Head over herehttp://blogs.msdn.com/sharepoint/archive/2009/07/20/june-cumulative-update-packages-ready-for-download.aspx to get the download links and more information about the update.

I read an article on The Seattle Times website that in an attempt to compete with Google Docs, Microsoft will be releasing a free web based version of Microsoft office. Read the Full Article here.

I think that’s all I have for now, stay tuned as more and more information becomes available on the Office 2010 suite of products.