.AddAddressMap() Method Hangs


.AddAddressMap() Method Hangs

Postby Simon » Mon Jan 06, 2003 2:50 pm


I am trying to create a mailbox from asp using the examples I have found on this website. However it all works apart from the fact that when I try and add the address map using the .AddAddressMap() method of the address map object, the asp page hangs.

Any Idea how I can fix this!?

Many Thanks



Further Info

Postby Simon » Mon Jan 06, 2003 3:14 pm


I don't know if this has anything to do with it, but my address-map.tab file does not exist. I have a bak file, but if I rename it as the tab file, it gets deleted in a few seconds automatically ???!!!



Site Admin
Posts: 4441
Joined: Tue Jun 25, 2002 3:03 am
Location: Melbourne, Victoria Australia

Postby MailEnable » Mon Jan 06, 2003 3:48 pm


You need to make sure that the account that the IIS proxy account has full permissions to the mailenable config directory (and its children). In the short term, grant the IUSR_MACHINENAME account access to the CONFIG directory.

I suspect the "hang" is a timeout waiting for a blocking file to disappear. I suggest you check for an ADDRESS-MAP.BLK file and delete it. Here is an overview of what happens whenever you modify any of the configuration items stored in the .TAB files:

1.. Changes made are written to a new .TMP file - eg: Adds, Deletes, etc.

2.. The system then checks for a .BLK file (Blocking file) and waits 60 seconds if 1 exists.

3.. If one exists and more than 60 seconds has passed, the .BLK file is removed.

4.. When the changes has been made the current TAB file is copied to a .BAK file

5.. The current .TAB file is then deleted

6.. The .TMP file is then renamed to a .TAB file

7.. The system then removes the .BLK file (Blocking file).

Here is some code to verify against:

Code: Select all

Set oAddressMap = CreateObject("MEWebAdmin.AddressMap")
oAddressMap.Account = strAccountName
oAddressMap.DestinationAddress = Session("TargetAddress")
oAddressMap.Scope = 0
If strAddressType = "SMTP" Then
   oAddressMap.SourceAddress = "[" & strAddressType & ":" & strMailbox & "@" & strDomainName & "]"
   oAddressMap.SourceAddress = "[" & strAddressType & ":" & strPostoffice & "/" & strMailbox & "]"
End If
Set oList = Nothing

Regards, Andrew



Postby Simon » Mon Jan 06, 2003 4:01 pm


Thanks for that.
I have sorted it out now - by reinstalling mail enable.
I couldn't find a blk file, but there were also other strange things happening, like the email tab taking ages to appear in the mailbox properties tab, and the ME admin hanging when I tried to add a new mailbox.

Clearly I had knackered something somehow, but with the reinstall it's working now.


Who is online

Users browsing this forum: No registered users and 6 guests