Avoiding PageParserPath but still having code in your page layout

I have a page layout that has some custom c# in it (yes, I realize that's not a great practice; it's some legacy stuff I don't have time to rework right now).
I have this page layout deployed in our farm today... and it works just charming...  *and* there are no additions to our <PageParserPath>.  So, such a thing is possible, that's good news!
Anybody know how? :)
There is some (rather logical) explanation here http://msdn.microsoft.com/en-us/library/bb964680(v=office.12).aspx that suggests that as long as the item remains ghosted
it's "safe".  But, after deploying from my fancy .wsp with the type set "GhostableInLibrary" ... I got the ugly "Code Blocks Are Not Allowed In This File" madness.
Hmm... starting to wonder if I am crazy for thinking this could work w/ a Sandboxed solution?  Or... or theories?

Yes, it is possible in SHAREPOINT 2013, but with some
hacking.
1. create custom configuration handler class
public class MySafeModeConfigurationHandler : IConfigurationSectionHandler
        public object Create(object parent, object configContext, XmlNode section)
            var type = typeof(Microsoft.SharePoint.ApplicationRuntime.SPRequestModule);
            var field = type.GetField("s_excludedFileList", BindingFlags.Static | BindingFlags.NonPublic);
            object s_excludedFileList = field.GetValue(null);
            if (s_excludedFileList == null)
                field.SetValue(null, Activator.CreateInstance(field.FieldType));
            type = Type.GetType("Microsoft.SharePoint.ApplicationRuntime.SafeModeConfigurationHandler, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c");
            var method = type.GetMethod("Create");
            object o = Activator.CreateInstance(type);
            object result = method.Invoke(o, new object[]{parent, configContext, section});
            return result;
2. change web.config
      <!--section name="SafeMode" type="Microsoft.SharePoint.ApplicationRuntime.SafeModeConfigurationHandler, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /-->
      <section name="SafeMode" type="MyNamespace.MySafeModeConfigurationHandler, MyLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fc475d95eb56414f" />

Similar Messages

  • HT5622 I have reset my iPhone, but later I could not activate it, it's not accepting my ID / Password. I restored it but still having the same problem. I need your help. Thank you.

    I have reset my iPhone, but later I could not activate it, it's not accepting my ID / Password. I restored it but still having the same problem. I need your help. Thank you.

    Try making a new Apple ID? I don't really understand what you mean.. Make a new apple ID, log in with that one and then when you are on your phone log out of it and THEN log in our old ID? If you still can't log in the old one then it's most probably a bug or something.. Anyway.. Good luck with your problem!!

  • Hello, I added my library according to the documentation but still do not see your changes?

    Hello, I added my library, class according to the documentation, com.sap.mobile.platform.client.openui.extensions, but still do not see your changes, for what? Is this the correct place, what I'm doing wrong? I would like to hide the action bar when the application Agentry, will be launched. Can someone give me examples of your changes in the UI Agentry platform androich, some screenshots, files, source? Documentations? Thank you.

    Lukas,
    Open UI is not designed to give you that level of control over the application.  You cannot hide the action bar on the Agentry client through Open UI.  Nor would you want to as the client assumes it will be there and uses it.
    Open UI will allow you to extend a field control so for example instead of displaying a string field you could instead write code to display a slider control.  There are a set number of fields you can extend through OpenUI.
    I suggest looking at the source code that comes with the Open UI SDK and the associated Agentry project for how this works and is implemented in the definitions.
    --Bill

  • We are having problems sending iMessages we have reset but still having problems. Also Icalls cutting off.

    We are having problems sending IMessages they are not sending have reset but still having problems. Also calls are cutting out or not connecting

    This is a known issue with Apple. I can't sent iMessages either...It' doesn't matter how many times I power down my phone, delete messages or disconnect from wifi...Very frustrating.

  • I just switched to Lion from SL, and am regretting it deeply, is there anyway to switch back to SL but still keep lion on your hard drive until you want it again?

    I just switched to Lion from SL, and am regretting it deeply, is there anyway to switch back to SL but still keep lion on your hard drive until you want it again?
    I hate to have paid for it and have it go away. Help please!

    Start by creating a second partition on your hard drive:
    To resize the drive do the following:
    1. Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    After the main menu appears select Disk Utility and click on the Continue button. Select the hard drive's main entry then click on the Partition tab in the DU main window.
    2. You should see the graphical sizing window showing the existing partitions. A portion may appear as a blue rectangle representing the used space on a partition.
    3. In the lower right corner of the sizing rectangle for each partition is a resizing gadget. Select it with the mouse and move the bottom of the rectangle upwards until you have reduced the existing partition enough to create the desired new volume's size. The space below the resized partition will appear gray. Click on the Apply button and wait until the process has completed.  (Note: You can only make a partition smaller in order to create new free space.)
    4. Click on the [+] button below the sizing window to add a new partition in the gray space you freed up. Give the new volume a name, if you wish, then click on the Apply button. Wait until the process has completed.
    You should now have a new volume on the drive.
    It would be wise to have a backup of your current system as resizing is not necessarily free of risk for data loss.  Your drive must have sufficient contiguous free space for this process to work.
    Install Snow Leopard on the new partition:
    Boot from your Snow Leopard Installer disc. Proceed with reinstalling OS X. Be sure to choose your new partition as the target destination.
    Download and install the Mac OS X 10.6.8 Update Combo v1.1 update. Any additional updates can be installed using Software Update.

  • Ory setting, but still having problems

    My laptop with Windows 7 was infected. I have Norton and Anti spyware. I reset back to factory setting and am still having issues. When I type, dashes and other symbols appear. What else can I do?

    @VOOM,
    If resetting the computer back to the original factory settings didn't resolve the issue, you can try reseating the keyboard connection from the motherboard. Simply just remove the connection and reconnect it and see if the makes any difference. I would only recommend this if you are out of warranty.  
    If your fine with doing this can you provide the model of the computer and I can provide the steps for you.  Here is a document that will help you find that information.
    Please respond back at your earliest convenience.
    Thanks
    Clicking the White Kudos star on the left is a way to say Thanks!
    Clicking the 'Accept as Solution' button is a way to let others know which steps helped solve the problem!

  • HT1365 reset my apple tv worked ok for a bit but still having same problem where it cannot connect to network

    reset my apple tv but still not responding. reset it due to network not connected to internet. works fine for a little while then fails again.

    I tried, but they want to charge me $19.99 to ask this simple question... And there doesn't seem to be any email address where I can ask by email.

  • Entering Correct Code But Still Saying Code Error.

    Hello, I have a Nokia E71, i've entered the lock code several times and it still says code error, i have not changed the lock code, it worked as 12345 when i activated lock code request, I cannot do anything with my phone, Any Help Will Be Appreciated,
    Thanks 

    ThaDon786 wrote:
    Hello, I have a Nokia E71, i've entered the lock code several times and it still says code error, i have not changed the lock code, it worked as 12345 when i activated lock code request, I cannot do anything with my phone, Any Help Will Be Appreciated,
    Thanks 
    If the lock code is messed up there is only one thing you can do. Bring it in for service.
    ‡Thank you for hitting the Blue/Green Star button‡
    N8-00 RM 596 V:111.030.0609; E71-1(05) RM 346 V: 500.21.009

  • How can I disable the camera icon on my locked iPhone 4 screen but still have access on home page?

    I just bought an iPhone 4 yesterday and my 3 year old son promptly found out how to access the camera even tho I have the phone locked. I would like to disable the option to use the camera while the phone is locked but still be able to use the camera without needing to re-enable it from the restrictions section. I've been searching on here and google for over an hour and am quickly coming to the conclusion that it is not possible. I have noticed that you can disable something similar to this on an ipad so why not give that option on the phone ?

    also is it possible to disable the music from on there and still have it on your home screen?

  • I have reset FF but still need mouse to activate pages etc.

    Getting really tired of this. I need to keep moving mouse all the time to keep pages running. Have followed instructions to fullest, even reset FireFox. Using FF v.25 I really don't want to revert to IE !!! Also, having a problem installing any Java upgrade. Tried offline as well but still comes up with error and no installation of it. Not sure if its a Java problem or something else.

    Hi there!
    This is a known issue and we are releasing a patch this fix this tomorrow. Please update to version 25.0.1 as soon as possible once it is released.

  • I have a "windows can't find"issue,but still lets me see the page,how can i correct this?

    i go into anything handled thru my yahoo messenger,i get a "windows can't find" but still let's me in to that site,how can i get rid of the "windows can't find" error thing?

    Try:
    *http://kb.mozillazine.org/Windows_error_opening_Internet_shortcut_or_local_HTML_file_-_Firefox

  • Having trouble sync'ing. Receiving Overcapacity error on my 64GB iPhone 5. Backed up and restored but still having sync issues.

    I have an iPHone 5 64GB with iTunes 11 installed on an 2 yr old HP laptop running Windows 7. I am having sync'ing issues. I am receiving an overcapacity error I have not seen before even though I can manually remove audiobooks I have previously loaded to get the overcapacity down below the available 64GB limit. I have removed most of them now and can get the sync to begin. Not sure if it will actually complete. But now I do not have but a relatively few audio books loaded. I have backed up and restored to see it that helps but am still getting the same overcapacity error. Seems whatever I had included was doubled in an "other" category. Also, in the recent upgrade to iTunes, it takes forever to sync when I change content. Sync'ing takes a lot longer than before. Has anyone else experienced similar performance issues.

    Lawrence Finch has previously provided the following helpful info...
    "Other" data is real data that you put on your phone by using the built in apps. It is not music, not videos, not pictures and not App Store app data. It is "OTHER" meaning everything that does not fall into these categories. Such as:
    email messages and attachments
    Reminders
    Calendar entries
    Contacts
    Text messages   (*** this can take up a lot of space)
    MMS messages and attachments
    Genius data
    Music cover art
    Operating system settings
    Safari cache
    bookmarks
    Game Center status
    Music catalog
    If you have a lot of text messages stored, that can make "Other" very large.  Another problem area is corrupted files.  When app and data files become corrupted, they may end up in "Other".  To fix that, perform a restore from a recent backup.  That prevents corrupt files from showing up.

  • Cancel iCloud plan but still having 3GB used. How to solve this?, Cancel iCloud plan but still having 3GB used. How to solve this?

    Want to cancel iCloud plan but I can't because I still have 3GB used. How to solve this guys ?

    Is the 3GB used a part of the 5BG you get for free? If so, you can delete the 3GB if you want to by going to:
    Settings>iCloud>Storage & Backup>Manage Storage> Under backups, click on the name of your iPhone then delete backup. Do the same thing on anything else that is showing as stored.
    Once you've done all of that you can delete the account if you want or you can skip all those steps and just delete the account.
    Settings>iCloud>Delete Account

  • TS1389 I tried all suggestions but still get code 42408.

    I still get the error code 42408 and I cannot purchase anything from the iTunes store.

    Delete and redownload them if doing so is free in your country.
    (83692)

  • Replaced logic board, but still having problems

    I just got my Mac back from the shop. It had been spontaneously shutting off and, since my serial # was within the range for the replacement program, they replaced the logic board. (I thought it was the power supply that was buggy? Meh. I only half-understand this stuff anyway.)
    Set it up last night and it worked smoothly. Put it to sleep before I went to bed. This morning, it wouldn't wake up--the power was off.
    Gah! I'm beyond frustrated. What now?!
    iMac G5 1.6GHz   Mac OS X (10.3.9)  

    emmywren-
    Call Customer Relations-1-800-767-2775. I think the number is the same for Canada.
    Firmly, yet politely, explain your situation to them and have them open up a case number. That is the official way to essentially alert Apple to the potential misbehaving of their "Apple Certified Repair" centers.
    It does happen that a repair center will replace a board with another one that turns out to be faulty. Happens. But Apple should know about this and follow the process.
    I would take the stand that they should return a functional Mac to you first, and if the fan turns out to still be an issue you can deal with it later. Sounds to me like "the guy" may need to follow some logical troubleshooting procedures first to fix his problem.
    You do not have a piece of crap, nor should you accept such a fate. Generally, if Apple cannot fix this by the third try they will replace your machine. This is not a given fact, but calling Customer Relations will begin the process.
    Hang in there-
    -DaddyPaycheck

Maybe you are looking for

  • How do I place an Excel chart as new sheet instead of on a worksheet

    I want to place a chart in an Excel Workbook "As New Sheet' versus "on a worksheet".  Does anybody have any examples?  Thank You Ernie Graff

  • Flash player not working in IE7

    I'm not sure why this is happening but recently the flash player stopped woring with some instances of flash content but not others. For instance, I can't view the flash content on the Adobe.com home page but if I go to the Adobe Studio home page the

  • IDCS2: Creating new doc from subset of another

    A plugin I'm working on needs to be able to create a new document consisting of pages pulled from another. Essentially, the user enters a range of pages on a source document and a new document is created containing these pages. This seems like it sho

  • Dynamic invocation in Axis

    I've deployed two services, one using framework Axis, one using framework Muse(a web service apache project). I want to make a dynamic invocation from Axis to use an operation of Muse, I add the code in the impl document of Axis. Is it possible to do

  • Is there a OS9.2.2 driver/program for USB Networking?

    I have 1 laptop left to bring wireless... It is my Mac Game machine (I still love the old Mac games ... OK, I'm an addict)... It is an iBook rev A (one USB port) Bondi Blue. One of the first ones that came out... I have a Belkin F5D7050B USB adapter,