Anonymous users and aspx pages inside the _layouts folder

I ran smack into an issue that was looking to be a serious problem yesterday. One of my development projects (SharePoint) is an anonymous access public-facing website. This site using built-in SharePoint web services and the download.aspx page in the _layouts directory to facilitate lookup of related documents and provide download capability. The issue? Anonymous users can’t use any of the application pages in the _layouts folder.

Lots of head scratching and some creative Google searches led me to the “DotNetIdeas” blog, specifically this post. It details how the _layouts, _controltemplates, and _vti_bin directories are affected by allowing access to anonymous users. I recommend you go read their post, but the key excerpt is this:
<blockquote>Anonymous users can never load pages inheriting from Microsoft.SharePoint.WebContorls.LayoutsPageBase</blockquote>The answer to my issue is to create my own download.aspx page (not overwriting the original) without inheriting from this class. I’d still be hunting whatever setting was keeping anonymous users from these pages if not for that helpful post though.

Read More >

Fastest XML Editor/Viewer

I use Visual Studio every day for just about all of my development tasks. However, I attempted to open a large xml file (> 20 megs) and Visual studio spiked up to 1.5 gigs of memory consumption and I couldn’t do anything… My old standby notepad++ (great editor!) also hung on opening the file. A quick search yielded First Object’s XML Editor. Worked great. Super fast.

Read More >

Occasional SPException from GetListItemDataWithCallback

Wrote a new field control today (SharePoint) that queried a specific list in another site collection based on the value of a field from the current list item. This worked great each time I’d test it out and add some additional functionality. When I finished the control, I did a little harder testing by hitting the refresh button in my browser over and over again. Randomly, my control wouldn’t render. Other times it would be fine. What’s up with that?

If you Google it enough, you’ll find that this message generally appears when your CAML is malformed. Well - I used an XmlWriter to build my CAML query (that way my inserted value from the item would be escaped properly for XML), so surely my CAML must be fine if it’s working most times??? Right??? Nope. The XmlWriter by default puts in a processing instruction on the first line:

<xml version=”1.0” encoding=”UTF-8” ?>

Remove this first line and the field controls render each time without error. The specific error I was receiving was:

Microsoft.SharePoint.SPException was caught
Message=”Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))”
Source=”Microsoft.SharePoint”
ErrorCode=-2147352567
StackTrace:
at Microsoft.SharePoint.Library.SPRequest.GetListItemDataWithCallback(String bstrUrl, String bstrListName, String bstrViewName, String bstrViewXml, SAFEARRAYFLAGS fSafeArrayFlags, ISP2DSafeArrayWriter pSACallback, ISPDataCallback pPagingCallback, ISPDataCallback pSchemaCallback)

Read More >

Unable to delete field in SharePoint library

Trying to delete a field in a SharePoint library and get the message “Cannot complete this action. Pleast try again.”? This drove me nuts, as even invoking the delete method via the object model gives this message. What I found to allow a delete was pushing down changes via the content type gallery in the site collection (if the field was ever a part of that content type). This can be found by going to the following:
* Site Settings
* Site Content Type Gallery
* Choose Content Type
* Advanced Settings
* Make sure radio button “Update all content types inheriting from this type” is checked
* Click OK

I had several libraries with several fields that had this issue (all fields used to be a part of the content type but had since been orphaned due to changing the definition of the content type in the elements.xml) and now they are all clean and free of these unneeded fields.

If only the error would have told me something meaningful…because trying again was surely never going to fix it.

Read More >

Terminal Cancer Patient gets restored car

From AutoBlog:
Tyler Shipman was an 18-year-old Fiero nut from Frazee, Minnesota. In the middle of restoring his favorite car last October he was diagnosed with terminal cancer, and posted a note on a Fiero forum to ask for help with the restoration so that he wouldn’t leave his parents with the burden. He got his wish. In the middle of this crazy all and everything, Tyler is more proof that simple humanity still works. We send our best to Tyler’s family and friends. Hat tip to Ryan.”

Thought I’d reshare this - this is a very special thing.

</param></param></param></embed>

Read More >

subscribe via RSS