When i tried the following way to create, i received the error bellow
CMS.SiteProvider.UserInfo userInfo = new CMS.SiteProvider.UserInfo();
userInfo.UserName = "SOMEONE1";
userInfo.FullName = "SOMEONE 1";
CMS.SiteProvider.UserInfoProvider.SetUserInfo(userInfo);
System.TypeInitializationException was caught
Message=The type initializer for 'CMS.GlobalHelper.ResHelper' threw an exception.
Source=CMS.GlobalHelper
TypeName=CMS.GlobalHelper.ResHelper
StackTrace:
at CMS.GlobalHelper.ResHelper.GetAPIString(String stringName, String defaultValue)
at CMS.Staging.SynchronizedInfo.Insert()
at CMS.SiteProvider.UserInfoProvider.SetUserInfoInternal(UserInfo user, GeneralConnection conn)
at CMS.SiteProvider.UserInfoProvider.SetUserInfo(UserInfo user)
at WebCMS.FileListener.frmMain.frmMain_Load(Object sender, EventArgs e) in D:\Projects\Channel Management\Code\WebCMS.FileListener\frmMain.cs:line 32
InnerException: System.IO.FileNotFoundException
Message=Could not load file or assembly 'CMS.ResourceManager, Version=5.5.3996.30245, Culture=neutral, PublicKeyToken=834b12a258f213f9' or one of its dependencies. The system cannot find the file specified.
Source=CMS.GlobalHelper
FileName=CMS.ResourceManager, Version=5.5.3996.30245, Culture=neutral, PublicKeyToken=834b12a258f213f9
FusionLog==== Pre-bind state information ===
LOG: User = DEVELOPER01\saikhuan
LOG: DisplayName = CMS.ResourceManager, Version=5.5.3996.30245, Culture=neutral, PublicKeyToken=834b12a258f213f9
(Fully-specified)
LOG: Appbase = file:///D:/Projects/Channel Management/Code/WebCMS.FileListener/bin/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : CMS.GlobalHelper, Version=5.5.3996.30246, Culture=neutral, PublicKeyToken=834b12a258f213f9.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: D:\Projects\Channel Management\Code\WebCMS.FileListener\bin\Debug\WebCMS.FileListener.vshost.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: CMS.ResourceManager, Version=5.5.3996.30245, Culture=neutral, PublicKeyToken=834b12a258f213f9
LOG: Attempting download of new URL file:///D:/Projects/Channel Management/Code/WebCMS.FileListener/bin/Debug/CMS.ResourceManager.DLL.
LOG: Attempting download of new URL file:///D:/Projects/Channel Management/Code/WebCMS.FileListener/bin/Debug/CMS.ResourceManager/CMS.ResourceManager.DLL.
LOG: Attempting download of new URL file:///D:/Projects/Channel Management/Code/WebCMS.FileListener/bin/Debug/CMS.ResourceManager.EXE.
LOG: Attempting download of new URL file:///D:/Projects/Channel Management/Code/WebCMS.FileListener/bin/Debug/CMS.ResourceManager/CMS.ResourceManager.EXE.
StackTrace:
at CMS.GlobalHelper.ResHelper..cctor()
InnerException: