SPSite Object - InfoPath Dev
in

InfoPath Dev

SPSite Object

Last post 03-24-2009 07:11 AM by Alec Pojidaev. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-24-2009 05:53 AM

    SPSite Object

    I have written this code and every time I execute this code I am getting this exception. I am running this code on Win XP machine where there is no MOSS installed. I am getting this exception-

    my code is here :-
    try
    {        using (SPSite site = new SPSite("http://localhost/"))
            {
            }
    }
    catch (Exception ex)
    {
    }
    finally
    {
    site.Dispose();}
     

    --------------
    ---------------
    {System.TypeInitializationException: The type initializer for 'Microsoft.SharePoint.CoreResource' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SharePoint.intl, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.
    File name: 'Microsoft.SharePoint.intl, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'
       at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
       at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
       at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
       at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
       at System.Reflection.Assembly.Load(String assemblyString)
       at Microsoft.SharePoint.CoreResource..cctor()
    --- End of inner exception stack trace ---
       at Microsoft.SharePoint.CoreResource.GetString(ResourceGroup rg, String name, Object[] values)
       at Microsoft.SharePoint.SPResource.GetString(String name, Object[] values)
       at Microsoft.SharePoint.SPSite..ctor(SPFarm farm, Uri requestUri, Boolean contextSite, SPUserToken userToken)
       at Microsoft.SharePoint.SPSite..ctor(String requestUrl)
       at EntityManagement03202009.FormCode.CTRL242_4_Clicked(Object sender, ClickedEventArgs e)}
    ------------------

     

  • 03-24-2009 07:11 AM In reply to

    rishibajaj:

    I am running this code on Win XP machine where there is no MOSS installed. 

    Thats not supported. There are few workarounds but MS recommendation is clear - please develop at Sharepoint server.

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.