Lotus Notes / Domino Sonstiges > Java und .NET mit Notes/Domino
ASP.NET-Webanwendung: Vertreter von Notes-User ermitteln
(1/1)
Björn Karpenstein:
Hallo!
Ich habe die Anforderung von einer ASP.NET Web-Anwendung aus den in Notes hinterlegten Vertreter zu ermitteln. Die Vertreter werden im Mail-Eingang unter Werkzeuge->Abwesenheit->Vorgaben eingtragen.
Auf dem .NET-Webserver (IIS) ist kein Notes installiert.
Gibt es eine einfache Möglichkeit, das ich über den Benutzernamen den Vertreter ermitteln?
Viele Grüße! O0
P.S. :
Ich habe es auf einem Rechner mit Notes Client hinbekommen den folgenden Code zur Ermittlung des Usernamens auszuführen:
--- Code: ---...
using Domino;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
NotesSession ns = new NotesSession();
ns.Initialize("password");
textBox1.Text = ns.UserName;
}
}
}
--- Ende Code ---
Auf dem Server ohne Notes Client erhalte ich leider diese Fehlermeldung:
--- Code: ---See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {29131539-2EED-1069-BF5D-00DD011186B7} failed due to the following error: 80040154.
at WindowsApplication1.Form1.button1_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
WindowsApplication1
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Documents%20and%20Settings/S08031DE/Desktop/transfer/NotesAPITest/NotesApiTest.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Interop.Domino
Assembly Version: 6.5.0.0
Win32 Version: 6.5.0.0
CodeBase: file:///C:/Documents%20and%20Settings/S08031DE/Desktop/transfer/NotesAPITest/Interop.Domino.DLL
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
--- Ende Code ---
flaite:
Die Initialisierung des Session Objekts ist afaik anders für einen Client auf dem kein Notes Server installiert ist.
Gibt ein Redbook. Com Together (try google). Vielleicht steht da was drin.
Eine andere Möglichkeit wäre ab Notes 7 einen producerseitigen Webservice zu erstellen, auf dem du von .NET zugreifst.
m3:
AFAIK musst Du in dem Fall DCOM aktivieren, auf den Firewalls freigeben und den entsprechenden Aufruf wählen. Rate ich jetzt mal so, ausprobiert habe ich das noch nicht. Und ob das ohne lokal installiertem Notes-Client geht, kann ich Dir daher leider auch nicht sagen.
Wenn es ein Domino/notes >= 7 ist, könntest Du Dir ev. noch ein Webservice schreiben, das Du dann remote ansprechen kannst.
Navigation
[0] Themen-Index
Zur normalen Ansicht wechseln