The format of the specified domain name is invalid.
Hej,Jeg har en asp.net applikation der har kald til ActiveDirectory, den kører fint og uden problemer på min pc i Microsoft Visual Web Developer 2008 Express Edition. Men når jeg flytter den over at køre på en Server 2003, får jeg følgende fejl, se koden:
Server Error in '/adtool' Application.
--------------------------------------------------------------------------------
The format of the specified domain name is invalid.
(Exception from HRESULT: 0x800704BC)
Description: An unhandled exception occurred during the execution of the current web request.
Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException:
The format of the specified domain name is invalid. (Exception from HRESULT: 0x800704BC)
Source Error:
Line 15: Dim objSysInfo = CreateObject("ADSystemInfo")
Line 16: ' Currently logged in User
Line 17: Dim objUser = GetObject("LDAP://" & objSysInfo.UserName)
Line 18: Dim stringstart = InStr(objUser.EmailAddress, "@") + 1
Line 19: Dim stringlength = stringstart - 1
Source File: E:\adtool\Default.aspx.vb Line: 17
Stack Trace:
[COMException (0x800704bc): The format of the specified domain name is invalid. (Exception from HRESULT: 0x800704BC)]
Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack) +934
Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack) +448986
_Default.Page_Load(Object sender, EventArgs e) in E:\adtool\Default.aspx.vb:17
System.Web.UI.Control.OnLoad(EventArgs e) +91
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2603
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082