Archive for the 'SharePoint Programming' Category

03
May
10

Tracking Down a “Sasquatch” Memory Leak

Just finished reading Todd Carter’s journey of tracking down a Sasquatch SharePoint object model memory leak.  Wow!  We’ve been working on cleaning up some of our client’s code according to the best practices document concerning using disposable Windows SharePoint Services objects (I’m not sure…looks more like an excuse document to me) and I’m beginning to believe that this may be the root of our problems.  There’s lots of custom code in this SharePoint application and we’re seeing application pool recycles every few minutes.  The biggest problem seems to be when we attempt to download a large (> 400Mb) file from SharePoint via the custom object model code. 

Richard Wixom, of DNSalePrice fame, has been working hard debugging this issue.  We may just be on to something!  We’ll let Todd (and others) know if this turns out to be the root cause.

26
Aug
09

The web application at [URL] could not be found. Verify that you have typed the url correctly. If the url should be serving existing content, the system administrator may need to add a new request url mapping to the intended application.

I was recently working on a custom windows application whose job was to bulk load content into SharePoint document libraries.  I was testing it on the test server and then moved it over to the production server for the client to use.  When they logged in with their admin account (account #1) and fired up the app, it wouldn’t do its job.  Looking at the log file showed the error:

The web application at [URL] could not be found. Verify that you have typed the url correctly. If the url should be serving existing content, the system administrator may need to add a new request url mapping to the intended application.

This error is basically a really verbose SharePoint “file not found” type of error.  It’s saying that it can’t find the URL and suggesting that your SharePoint administrator might need to add an alternate access mapping to your SharePoint web application (extend the web app and add an alternate access mapping).  It was occurring when instantiating and SPWeb object.

The funny thing about this error was that, if I logged on as an administrator, it went away and the app worked fine.  That immediately suggested to me I had a permissions problem.  So I looked all around for where the differences might be.  The account was actually in the domain administrators group and had permissions that worked fine in SharePoint.  It was a farm administrator and a site collection administrator.  There was nothing it couldn’t access…except the SPWeb object. 

We had a couple of other accounts that were similarly configured, so I tried one of the other accounts after spending hours “googling” (or was it “bing-ing?) a potential solution.  While searching on the web, I found I had plenty of company with others who had similar problems.  Many of proposed solutions revolved around swapping out accounts in specific application pools being utilized by SharePoint.  However, most of these solutions do not take into account infrastructures that won’t allow these accounts to be changed to local system accounts.  Whatever…

Okay, so I tried one of our other similarly configured accounts and found that it worked just fine.  “What was the difference”, I pondered?  I searched all over and found that account #2 was NOT a site collection administrator.  In other words, the account that wasn’t working, account #1, WAS a site collection administrator and the account that WAS working was not.  So, I removed it from the site collection administrators.

Guess what?  My application suddenly started working when logged on as account #1.  So, I put it back in to the site collection administrators group and found that it STILL WORKED!  Just taking it out of the site collection administrators did something, somewhere in the vast security netherworld of SharePoint that flipped the appropriate “bit” and fixed whatever the original problem was.  Problem solved.  Only took eight hours.  😦




Asif Rehmani’s SharePoint Videos

SharePoint-Videos

Click to access a wealth of SharePoint videos

SharePoint Rx

SharePoint Rx Home

Categories

Posts by Date

December 2019
M T W T F S S
« Jun    
 1
2345678
9101112131415
16171819202122
23242526272829
3031  
Support Wikipedia