I have a customized page that was created by a feature reciever, here's what I did in pseudo-code:
1.) Create a customized URL based on new list's root folder url, to spawn a page
Dim newFormUrl As String = String.Format("{0}/{1}/Forms/MaterialSearch.aspx", web.Url, listJustCreated.RootFolder.Url)
Dim frm As SPFile = web.GetFile(newFormUrl)
frm.CheckOut()
2.) Get a limited web part manager (PersonalizationScope.Shared) and clear it of any existing webparts.
3.) Added a wikiContentWebPart featureing asp:Text box control and asp:button markup
4.) Added 2 XsltListViewWebParts. Each web part based on some predefined View markup that sees the control ID of the aforementioned aps:textbox, and can see the TextBox.Text as a parameter for a CAML query filter
5.) Added a custom web part that exposes a download as Excel button. This webpart is backed by a class in the GAC which, on post, climbs the ASP.NET form contorl hierarchy to find the aforementioned TextBox, and re-submit the query and use NPOI libraries to construct all the SharePoint list output from 2 lists into a single combined Excel workbook (2 worksheets, one for each list referenced in the XsltListViewWebParts.
All of the above works flawlessly me for me when I use this highly customized page. Other folks, at my site's unveiling, can browse the site just fine, but get an 'Access Denied' message on this page. Even after I put them in the 'Contribute' group (which I didn't want to do). What did I do wrong?
Reviewing my code, I noticed at the end of the feature receiver, I did this line of code:
frm.CheckIn("", SPCheckinType.MinorCheckIn)
frm.Update()
This made me think the file is being seen as a draft that only I have access to. I went into SPD and it did not seem to appear checked out, however. Nevertheless, I performed an quick checkout/checkin to make sure that was not the case. This didn't help either.
Part of me thinks that because I declared this up in the schema as a 'NewForm', that may be part of my issues.. it's not really a 'new form' as it was totally customized away from that:
<Forms>
<Form Type="NewForm" SetupPath="pages\form.aspx" Url="Forms/MaterialSearch.aspx" WebPartZoneID="Main" />
If you're still reading this.. you're my hero. If you have any ideas.. would love to hear them. Thanks!