Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I created a custom application page which is deployed to the web applications section in central admin, following this guide:

How to: Deploy an Application Page to Central Administration

I am a farm administrator. I have access to everything in central admin, but when I try to access my custom page, I get the "Access Denied" error page. I have no idea why it is doing this. It works on my local machine, but when I deploy to my company's staging environment, I get access denied. SharePoint 2010 by the way.

Any ideas?

share|improve this question
    
have you check the event viewer and the sharepoint log? –  Salvatore Di Fazio Feb 7 '13 at 16:56
    
Is the custom page pretty much blank apart from a label with a Hello World type message on it, like the example? If not I would use some System.Diagnostic.Trace.WriteLine calls to output messages and the capture them using DebugTrace tool just to see if you can find out where the access denied is occuring. –  Simon Doy Feb 7 '13 at 16:59
    
Als you are a Farm Administrator in Central Administration? –  Simon Doy Feb 7 '13 at 17:13
    
thanks this got me thinking. I commented out everything from the page_load event and the page now loads. Now i have to figure out what in there is causing the problem. All I am doing is looping through all webapps, site cols, and sites and printing out their URLs to the screen –  dave823 Feb 7 '13 at 17:26
    
It turns out it was failing when I tried to get the web applications from SPWebService. All I needed was to wrap that piece in a 'RunWithElevatedPrivileges' block. –  dave823 Feb 8 '13 at 20:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.