RSS
 

SharePoint upload size limit with IIS7

28 Jul

To increase the SharePoint size limit along with the timeout you will need to change the settings in 4 locations.

.
.
Before making changes to any of the web.config files please make sure to create backups before editing them. Also under no circumstances should you copy web.config files from one server to another. Doing so will break your environment.
.
.

1. Central Administration à Application Settings à Web Application general settings à Change your Web application URL then update the Maximum upload size

2. Update the Web Application’s Web.config file that you increased in step 1. In my case I am updating the 80 web application which is located under C:\inetpub\wwwroot\wss\VirtualDirectories\80\web.config

Replace:

with

3. Update SharePoint web services Web.config under C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS

Typically you only need to update the upload.aspx section but in my case I was using a custom code that uploaded documents via the copy.aspx web service so I had to include that section as well since it is not in the web.config out of the box

4. If you are running windows server 2008 and still having issues uploading larger files add the following under the <configuration> section into your web applications web.config file from step 1

 

SharePoint 2010 Document ID Service

19 Jul

I have been doing a lot of research lately on the Document ID service for a presentation and lab that I’ll be giving at the KnowledgdeLake Summit this week and through I would share some of the things I found out.

Some general setup information

  1. Active Document ID Service
    1. Site Actions –> Site Settings –> Manage Site Collection Features (Under Site Collection Administration)
  2. Configure Document ID Service
    1. Site Actions –> Site Settings –> Document ID Settings (Under Site Collection Administration)
    2. Check Assign Document IDs
    3. Enter in Document ID Prefix

     

Activating the Document ID Service adds the following fields to the Document Content Type

  • Document ID
    • This is the only field you can see inside the library
    • Unique ID assigned by the service to the document
  • Static URL
    • URL used to lookup the document
  • Persist ID
    • Used to determine if the existing Document ID should be kept or reassigned

 

Other things you should know about DocID Service

  1. Document IDs within a library are created off of the Library ID and ID of the document within the list

    When you first upload a document the Document ID URL is immediately available example: http://kldemo:81/_layouts/DocIdRedir.aspx?ID=SUMMIT-2-12

    Library ID (2) – ID (12)

  2. Events Added to each library test
  • ItemAdded
  • ItemUpdated

I could not find the ItemUpdated listed event anywhere on MSDN for Document IDs but I can only assume it is firing that event because if you upload documents before the service is enabled then edit a document after the service is turned on it will create a document id.

Testing Moving a document across libraries within a site collection

Now that I had the Document ID service setup and working I went ahead and tried moving the document within the site collection to verify the document id would remain the same.

Instead of writing code to invoke the SPFile.MoveTo method (which is documented as the only way the document will retain the current Document ID) I want to try moving the document via windows explorer like the good old days in 2007. If you need help getting this up and running on Windows 2008 I posted on that Here

Turns out if you browse to the library using UNC \\kldemo@81\Documents the SPFile.MoveTo method is not called because the Document ID get updated to a new value. However if you use the Open with Explorer option within the source and destination libraries you can right click on the file in one location and paste it into the other which does retain the original Document ID

After moving the document

The link to the document via the Document ID static URL is only as good as your last crawl!! If you have uploaded the document and a crawl has not occurred you will still be able to access the document via the link until the document has been moved. The link will become valid again once the document has been crawled.

There are two tables inside the Search Service Application PropertyStoreDB GUID database.

MSSDocResults

Table Columns

  1. DocID
  2. URL
    1. URL to the document in SharePoint
    2. This value gets updated during each crawl

MSSDocProps

Table Columns

  1. DocID – Ties back to the DocID in MSSDocResults
  2. strVal2 – Holds the DocID Static URL http://kldemo:81/_layouts/DocIdRedir.aspx?ID=SUMMIT-2-12

** NOTE:  Do not edit values directly in the SharePoint databases or the database structure.  I provided this information for that purpose only… Information

Conclusion

Document ID service is a feature that was highly requested by many of our SharePoint 2007 customers and I’m sure will be deploying it frequently going forward. However one of the reservations I have is enabling this feature in a Migration scenario or a high load time because of the ItemAdded event that will be fired for every document will significantly decrease the performance. So instead I will not enable the Document ID service until all documents have been uploaded. Then inside Central Admin I will fire off the Document ID Service timer job now instead of waiting the week (Default) for the Document ID properties to be set.

The performance degradation is an item I plan on testing here soon and will report back if I see any issues during migrations / high peak times

 

Access SharePoint 2010 Sites and Libraries via UNC

16 Jul

While I was building one of my labs to demonstrate the Document ID feature — where you can move documents within a site collection and it reatins your Document ID — I tried to UNC into my SharePoint site \\KLDemo\Documents and I get the typical error “Windows cannot access \\KLDemo\Documents”




In the past turning on the WebClient service fixed the issue but that service no longer exists on Windows Server 2008… Or does it?? Well after banging my head against the wall I decided to install Desktop experience to see if that fixed my issue (Server Manager –> Features –> Add New Feature –> Desktop Experience)





Turns out the WebClient Service does exist for Server 2008 you just have to install the desktop experience to get it there.


How to access SharePoint using UNC

If your site is under port 80 you can use \\kldemo\Documents

But what happens if your SharePoint site is under a different port? Just replace the : with an @ symbol so you end up with \\kldemo@81\Documents


 

Could not find stored procedure ‘proc_ar_BumpCacheInvalidationCounter’

06 Jul

The SQL error that it cannot find the stored procedure ‘proc_ar_BumpCacheInvalidationCounter’ is a known issue with SharePoint Standard version because BDC is not active in that version.

There are some “fixes” out there that tell you to modify the database… I however would not follow their advice since that breaks the SharePoint golden rule — DO NOT Modify the Databases

Instead I would create an event log filter to remove that error since it can be “safely ignored”.

Link to a MSDN blog on the issue

SQL ERROR

[2575512] SharePointServer.domain.net.msgs red Sat Jul 03 13:11:10 CDT
2010 [SHAREPOINTSERVER.domain.net]

App: E 'Sat Jul 03 13:00:47 2010': Office SharePoint Server 7888 - " A runtime exception was detected.
Details follow.
Message: Could not find stored procedure 'proc_ar_BumpCacheInvalidationCounter'.

Techinal Details:
System.Data.SqlClient.SqlException: Could not find stored procedure 'proc_ar_BumpCacheInvalidationCounter'.
at System.Data.SqlClient.SqlConnection.OnError(SqlException
exception, Boolean breakConnection)

at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateO
bject stateObj)
at
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader
ds, RunBehavior runBehavior, String resetOptionsString)
at
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean
async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(Comma"
App: E 'Sat Jul 03 13:00:45 2010': Office SharePoint Server 7888 - " A runtime exception was detected.
Details follow.
Message: Could not find stored procedure 'proc_ar_BumpCacheInvalidationCounter'.

Techinal Details:
System.Data.SqlClient.SqlException: Could not find stored procedure 'proc_ar_BumpCacheInvalidationCounter'.
at System.Data.SqlClient.SqlConnection.OnError(SqlException
exception, Boolean breakConnection)

at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateO
bject stateObj)
at
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader
ds, RunBehavior runBehavior, String resetOptionsString)
at
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean
async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(Comma"
App: E 'Sat Jul 03 12:59:47 2010': Office SharePoint Server 7888 - " A runtime exception was detected.
Details follow.
Message: Could not find stored procedure 'proc_ar_BumpCacheInvalidationCounter'.

Techinal Details:
System.Data.SqlClient.SqlException: Could not find stored procedure 'proc_ar_BumpCacheInvalidationCounter'.
at System.Data.SqlClient.SqlConnection.OnError(SqlException
exception, Boolean breakConnection)

at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateO
bject stateObj)
at
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader
ds, RunBehavior runBehavior, String resetOptionsString)
at
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean
async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(Comma"

 

Delete SharePoint Timer Jobs

06 Jul

I was looking for a way to delete a timer job because from the UI you can only disable the job not delete. So I turned to the webs looking and kept running into deletessptimerjob which doesn’t help me very much since this job is not an SSP timer job.

So digging through the different stsadm commands I found

 stsadm.exe -o deleteconfigurationobject -id 

which did the trick for me.

To find the GUID browse to Central Admin –> Operations then under Global Configuration select Timer Job Definitions then click on the timer job you want to delete.

From there you can get the GUID of the timer job by replacing the %2D with a – and you will have your Object ID / GUID and in this case it is e464bf23-2eec-4a19-b283-5b3fbb1080df

 stsadm.exe -o deleteconfigurationobject -id e464bf23-2eec-4a19-b283-5b3fbb1080df

then if you want to Execute your timer job immediately run the following command

stsadm -o execadmsvcjobs

Remember to test all changes in a development / staging environment first before running any commands especially deletes against production. And always remember to make plenty of backups!

 

EML to HTML

01 Jul

I was recently tasked with converting emails from lotus notes in the form of .EML over to TIFF images. The toolkits I found out there didn’t seem to work quite the way I wanted. So I decided to write my own EML parse class

If open the .EML file in Notepad you can easily start to see patterns inside the file.

Here is the header information where you can grab the typical email info: To, From, dates and subject line


x-sender: serderEmail@company.com
x-receiver: ReceiverEmail@company.com
Received: from email ([10.165.128.41]) by Email with Microsoft SMTPSVC(7.5.7600.16544);
Thu, 17 Jun 2010 14:49:37 +0100
Subject: This is my test eml message
X-Priority: 3 (Normal)
Auto-Submitted: auto-generated
From: serderEmail@company.com
To: ReceiverEmail@company.com
Message-ID:
Date: Thu, 17 Jun 2010 14:50:31 +0100
X-MIMETrack: Serialize by Router on IELSPKI2/Servers/INT/RoyalSun(Release 8.0.2FP1|January
12, 2009) at 17/06/2010 14:50:34
MIME-Version: 1.0
Content-type: multipart/mixed;
Boundary="0__=0FBBFDD6DFDF8F1A8f9e8a93df938690918c0FBBFDD6DFDF8F1A"
Return-Path: test.development@company.com
X-OriginalArrivalTime: 17 Jun 2010 13:49:38.0013 (UTC) FILETIME=[ED6C40D0:01CB0E23]

After the main subject data you will find that each section contains Boundary data before and after which really helps on splitting up each section.

–1__=0FBBFDD7DFCBBE928f9e8a93df938690918c0FBBFDD7DFCBBE92
Content-type: text/html; charset=ISO-8859-1
Content-Disposition: inline
Content-transfer-encoding: quoted-printable

Section data

–1__=0FBBFDD7DFCBBE928f9e8a93df938690918c0FBBFDD7DFCBBE92–

Here is my main code block that reads in line by line then splits it apart into separate sections an depending on the encoding and mime type (text/html, application/msword, ect..) decode and save so the attachments can be extracted if needed.

        public void LoadEMLMessage(string FilePath)
        {
            FileInfo emlMessage = new FileInfo(FilePath);
            string line = string.Empty;
            bool ReadHeaderDeatil = true;

            //Start reading through the file
            using (StreamReader sr = new StreamReader(emlMessage.FullName))
            {
                while ((line = sr.ReadLine()) != null)
                {

                    if (ReadHeaderDeatil && (_emlProperties.BoundaryList == null || !_emlProperties.LineContainsBoundary(line)))
                    {
                        _emlProperties.LoadProperties(line);
                        continue;
                    }
                    else if (ReadHeaderDeatil)
                    {
                        ReadHeaderDeatil = false;
                        continue;
                    }

                    //Read Section Data
                    _sections.Add(ReadSectionData(line, sr));

                }
            }
        }

parsing out the separate sections of an EML file turned out to be easier than first thought just one thing to keep in mind test test test with as many emails as you can. Each email I received to test with was a little different than the last so the irregularities really helped me fine tune my code.

 
No Comments

Posted in .Net, Code

 

SharePoint Forums

25 Jun

In the past I have not spent much time on the Microsoft Forums and instead went straight to the blogs for information and answers to the questions I have. Hence the reason why I started this blog (just like anyone else) in hopes that I could give back just a fraction of what I have received from the SharePoint community over the years.

In not contributing on the SharePoint forums I feel that was an oversight on my part as those forums are a huge part of the SharePoint community as well. So just recently I made it a goal of mine to contribute what I can to the SharePoint forms (both 2007 & 2010). In doing so I have actually learned more about 2010 from many of the MVP’s and other SharePoint folks out like myself reaching out and answering some questions.

Microsoft SharePoint Forum: http://social.msdn.microsoft.com/Forums/en-US/category/sharepoint

 
 

SharePoint Saturday Ozarks – part 2

12 Jun

I just finished my first speaking presentation at SharePoint Saturday Ozarks today and it was a blast presenting on ECM for SharePoint and will just have to wait on the
feed back to see what else I can add/change and keep those slides evolving. I will be adding my slides from today next week.

In the mean time I’m prepping for KnowledgeLake’s Summit next month where I’ll be covering BCS and Document ID’s in depth for a few hours. I know a little about BCS but that is a topic I can’t wait to dive and and learn about.

 

SharePoint Saturday Ozarks

10 Jun

As of this morning my slides are complete so now I can relax a little and enjoy the ride!

I’m looking forward to a great SharePoint Saturday Ozarks as this will be my first speaking event… I’ll be coving ECM for SharePoint which is a very broad topic but I’ll do my best to rein it in a little and cover some of my top ECM featurs that ROCK!

SharePoint Saturday Ozarks

 

SharePoint 2010 Beta Exams

01 Jun

Just completed my first of 2 SharePoint 2010 beta exams. I took the 71-667 exam today and will just have to wait for another 8 weeks or so to see how I did.. Now in the mean time I’ll have to prep for the 71-573 beta exam next week.