How can I get access to "mySPSiteObj" 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-
---------------
{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)}
------------------
my code is here :-
try
{ using (SPSite site = new SPSite("http://localhost/"))
{
}
}
catch (Exception ex)
{
}
finally
{
site.Dispose();}