Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Worksite DLL's "IManage.DLL + IManageExt2.DLL" used in Web Project
msmelb
Hi,
We are building a Web Application Project (Asp.Net),To have the File Browse Dialog to be able to attach Work space documents.
This project works well on our local laptops.The Local laptops have the Filesite installed as well.
We have an issue when try running this project on a Windows 2003 Server (32 bit).
But has an issue when we deploy this on the Web Server [Windows 2003 Standard 32 bit server].
The issue is the page hangs and never proceeds any further.
Help appreciated:
The code snippet is as described below:
protected void Page_Load(object sender, EventArgs e)
{
Response.Write("Begining of Page Load");
IManDMS dms = new ManDMSClass();
IManSession sess = dms.Sessions.Add("XXXXXXX");
sess.Login("XX", "XX");
Response.Write("Logged in");
NRTSession[] saSess = new NRTSession[1];
saSess[0] = (NRTSession)sess;
Response.Write("IManBrowseCmd");
IManBrowseCmd cmd = new IManBrowseCmdClass();
ContextItems context = new ContextItemsClass();
Response.Write("imObjectType");
imObjectType[] saSelectableItems = new imObjectType[5];
saSelectableItems[0] = imObjectType.imTypeDocument;
saSelectableItems[1] = imObjectType.imTypeDocumentFolder;
saSelectableItems[2] = imObjectType.imTypeFavoritesFolder;
saSelectableItems[3] = imObjectType.imTypeSubscriptionFolder;
saSelectableItems[4] = imObjectType.imTypeWorkspace;
Response.Write("ContextAdd");
// Required
context.Add("NRTDMS", dms);
context.Add("SelectedNRTSessions", saSess);
context.Add("IMANEXT2.BrowseCmd.SelectableObjectTypes", saSelectableItems);
// The types of Worksite Objects the end-user is restricted
// to select from the Worksite browse dialog.
// context.Add("ParentWindow", this.Handle.ToInt32());
Response.Write("Initialise");
cmd.Initialize(context);
cmd.Update();
try
{
if (cmd.Status == (int)CommandStatus.nrActiveCommand)
{
// Invoke an instance of the IManBrowseCmd Object
cmd.Execute();
bool bRefresh = false;
bRefresh = (bool)context.Item("iManExt.Refresh");
// Returns true if user has pressed the Selected button on the browse dialog
if (bRefresh == true)
{
Array retSelectedItems = (Array)context.Item("IManExt2.BrowseCmd.SelectedObjects");
// Obtain a count of the items that the user has selected
int iCountOfSelectedItems = retSelectedItems.Length;
if (iCountOfSelectedItems >= 0)
{
Response.Write("User has selected " + (iCountOfSelectedItems) + " item(s).");
for (int i = 0; i < iCountOfSelectedItems; i++)
{
IManObject selectedItem = (IManObject)retSelectedItems.GetValue(i);
imObjectType selectedType = selectedItem.ObjectType.ObjectType;
switch (selectedType) // Check the actual type of object selected.
{
case imObjectType.imTypeDocument:
Response.Write("Item " + (i + 1) + " is a document.");
break;
case imObjectType.imTypeDocumentFolder:
Response.Write("Item " + (i + 1) + " is a document folder.");
break;
case imObjectType.imTypeFavoritesFolder:
Response.Write("Item " + (i + 1) + " is a favorite folder.");
break;
case imObjectType.imTypeSubscriptionFolder:
Response.Write("Item " + (i + 1) + " is a subscription folder.");
break;
case imObjectType.imTypeWorkspace:
Response.Write("Item " + (i + 1) + " is a workspace.");
break;
default:
Response.Write("Check which object type item " + (i + 1) + " is through imObjectType Enum.");
break;
}
}
}
}
}
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
Find more posts tagged with
Comments
dbguy
Hi,
This is the WorkSite MP forum. Please post your question to the WorkSite forum.