none
Error with Microsoft.SharePoint.Administration.SPConfigurationDatabase.get_Farm RRS feed

  • Question

  • Please help !!! I'm running a web app on Win2008 server that used to have Sharepoint installed but now disabled.  My website has nothing to do with Sharepoint, does not use it, does not call any functions, etc.  However, I'm getting this error.  What's going on and how can I fix this?  making Sharepoint not a part of my web app?  My web app is running under .Net 4.0 integrated mode app pool on IIS7.  This error below is from event log.  Thanks

    Event code: 3005 
    Event message: An unhandled exception has occurred. 
    Event time: 10/15/2010 2:00:48 PM 
    Event time (UTC): 10/15/2010 9:00:48 PM 
    Event sequence: 3 
    Event occurrence: 1 
    Event detail code: 0 
     
    Application information: 
        Trust level: Full 
     
    Process information: 
        Process ID: 7720 
        Process name: w3wp.exe 
        Account name: NT AUTHORITY\NETWORK SERVICE 
     
    Exception information: 
        Exception type: PlatformNotSupportedException 
        Exception message: Exception of type 'System.PlatformNotSupportedException' was thrown.
       at Microsoft.SharePoint.Administration.SPConfigurationDatabase.get_Farm()
       at Microsoft.SharePoint.Administration.SPFarm.FindLocal(SPFarm& farm, Boolean& isJoined)
       at Microsoft.SharePoint.Administration.SPFarm.get_Local()
       at Microsoft.SharePoint.Utilities.SPUtility.AlternateServerUrlFromHttpRequestUrl(Uri url)
       at Microsoft.SharePoint.Administration.SPAlternateUrl.get_ContextUri()
       at Microsoft.SharePoint.WebControls.SPControl.GetContextWebApplication(HttpContext context)
       at Microsoft.Office.Server.ServerContext.GetContext(HttpContext httpContext)
       at Microsoft.Office.Server.ServerContext.get_Current()
       at Microsoft.Office.Server.Administration.SqlSessionStateResolver.System.Web.IPartitionResolver.ResolvePartition(Object key)
       at System.Web.PartitionManager.GetPartition(IPartitionResolver partitionResolver, String id)
       at System.Web.SessionState.SqlSessionStateStore.GetConnection(String id, Boolean& usePooling)
       at System.Web.SessionState.SqlSessionStateStore.DoGet(HttpContext context, String id, Boolean getExclusive, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actionFlags)
       at System.Web.SessionState.SqlSessionStateStore.GetItemExclusive(HttpContext context, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actionFlags)
       at System.Web.SessionState.SessionStateModule.GetSessionStateItem()
       at System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData)
       at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

     
     
    Request information: 
        Is authenticated: True 
        Authentication Type: Forms 
        Thread account name: NT AUTHORITY\NETWORK SERVICE 
     
    Thread information: 
        Thread ID: 5 
        Thread account name: NT AUTHORITY\NETWORK SERVICE 
        Is impersonating: True 
        Stack trace:    at Microsoft.SharePoint.Administration.SPConfigurationDatabase.get_Farm()
       at Microsoft.SharePoint.Administration.SPFarm.FindLocal(SPFarm& farm, Boolean& isJoined)
       at Microsoft.SharePoint.Administration.SPFarm.get_Local()
       at Microsoft.SharePoint.Utilities.SPUtility.AlternateServerUrlFromHttpRequestUrl(Uri url)
       at Microsoft.SharePoint.Administration.SPAlternateUrl.get_ContextUri()
       at Microsoft.SharePoint.WebControls.SPControl.GetContextWebApplication(HttpContext context)
       at Microsoft.Office.Server.ServerContext.GetContext(HttpContext httpContext)
       at Microsoft.Office.Server.ServerContext.get_Current()
       at Microsoft.Office.Server.Administration.SqlSessionStateResolver.System.Web.IPartitionResolver.ResolvePartition(Object key)
       at System.Web.PartitionManager.GetPartition(IPartitionResolver partitionResolver, String id)
       at System.Web.SessionState.SqlSessionStateStore.GetConnection(String id, Boolean& usePooling)
       at System.Web.SessionState.SqlSessionStateStore.DoGet(HttpContext context, String id, Boolean getExclusive, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actionFlags)
       at System.Web.SessionState.SqlSessionStateStore.GetItemExclusive(HttpContext context, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actionFlags)
       at System.Web.SessionState.SessionStateModule.GetSessionStateItem()
       at System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData)
       at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
     
     
    Custom event details: 

    Friday, October 15, 2010 10:14 PM

Answers

  • Create a new application pool with the required Identity.

    Associate that application pool with your newly created web site, later check the web site.

    Otherwise, Open task manager, kill all the W3wp instances, then restart IIS, then check the status.


    Cheers. Happy troubleshooting !!! Sriram E - MSFT Enterprise Project Management
    Monday, December 20, 2010 6:09 PM
    Moderator

All replies

  • Uninstall the Project Server and then SharePoint Server and see if problem goes away.

    Cheers!


    Michael Wharton, MBA, PMP, MCT, MCSD, MCSE+I, MCDBA
    www.WhartonComputer.com
    Monday, December 20, 2010 2:03 PM
    Moderator
  • Create a new application pool with the required Identity.

    Associate that application pool with your newly created web site, later check the web site.

    Otherwise, Open task manager, kill all the W3wp instances, then restart IIS, then check the status.


    Cheers. Happy troubleshooting !!! Sriram E - MSFT Enterprise Project Management
    Monday, December 20, 2010 6:09 PM
    Moderator
  • I started getting that error for a .NET 4.0 application running in a different application pool on my SharePoint Front end server.

    I resolved it by clearing out the httpModules section of my web.config to tell my application to not load any SharePoint httpModules that may have been inherited from the parent web site.

    <httpModules><clear /></httpModules>

    You can specify which httpModules you want to remove using the <remove name="ModuleName" /> tag  if you prefer, but I figured the <clear /> will give you a good start point before you troubleshoot further to determine which module is causing the error.

    If you need to access the WSS3.0 API or MOSS 2007 SP3 resources, you will have to code your app in .NET 2.0 ~ 3.5. If you want to stay in .NET 4.0, you can utilize MOSS 2007 web services rather than accessing the API directly.  

    It seems that after MOSS 2007 SP3, you will get a PlatformNotSupported exception when trying to access the WSS 3.0 API from a .NET 4.0 application.   I didn't get the error until I upgraded my version of MOSS 2007 to SP3.

    If anyone knows any other workaround, please share.





    Thursday, October 25, 2012 7:10 AM