Tag Archives: ASP

MAPI : When we try to access Public Folder via ASP application throws MAPI_E_FAILONEPROVIDER


Recently one of my customer updated that they get an different issue with their ASP application. This application running on their Web server that uses MAPI to read the Contacts folder in the Public Folders from Exchange Server 2003 SP2 machine. The user can retrieve his email in outlook and browse the public folders as he is used to, but when this user want to use the ASP page that reads the public folder he fails.

smile_sad Customer receives the following error:

bstrPublicRootID = objInfoStore.Fields.Item(&H66310102).Value
Error Description: [Collaboration Data Objects – [MAPI_E_FAILONEPROVIDER(8004011D)]]
number: –2147221219
Source: Collaboration Data Objects

During the the troubleshooting, we found that the customer tries to read the contacts in public folders. Customer try to gain programmatic access to Public Folders by assigning the folders collection to an object. Customer cannot gain programmatic access to a public folder from an ASP by stepping through the tree. To do this, certainly the customer needs to use GetFolder, which in turn requires him to know what the RootID of the Public Folder.

So we recommend customer to make use of MAPI property tag (example: bstrPublicRootID = objInfoStore.Fields.Item( &H66310102 ).Value) to get the root ID of the Public Folders, which resolved the issue.

lightbulbAlso in couple of earlier such scenario’s we found this error might happen due to one of the following:

You might don’t have permissions: You are trying to access a mailbox that the ASP does not have proper permission for.Check to make sure the ASP is being authenticated into the account you want. Insert this line into your VBScript to find out what account the ASP is running in:

Response.Write("You are logged on as " & Request.ServerVariables("LOGON_USER") & "<br>")

If you are logged in under the anonymous account, you will receive a blank string back.

You might be using Incompatible browser: You are using "NT Challenge Response" as your authentication type, and Netscape Navigator for your browser. Netscape Navigator does not support "NT Challenge Response" as an authentication option. In order to log onto a user’s Exchange account, the IIS authentication needs to be set up as "Basic (Clear Text)".

computer For a safer side, you need to make sure that you don’t have Exchange Server 2003 and Outlook 2003 in the same box.

thumbs_up Happy Programming!!

Error Code : List of ASP Error Codes & its description


When i was searching for Classic ASP (not ASP.Net) related error code, i found the related information. Please find the list of ASP error codes that may be returned while an Active Server Pages (ASP) page is processing. This may vary depending on the version of Internet Information Services (IIS) that you use. This applies to IIS 3.0, 4.0, 5.0 & 6.0.

ASP error code

Description

ASP 0100

Out of memory

ASP 0101

Unexpected error

ASP 0102

Expecting string input

ASP 0103

Expecting numeric input

ASP 0104

Operation not Allowed

ASP 0105

Index out of range

ASP 0106

Type Mismatch

ASP 0107

Stack Overflow

ASP 0108

Create object failed

ASP 0109

Member not found

ASP 0110

Unknown name

ASP 0111

Unknown interface

ASP 0112

Missing parameter

ASP 0113

Script timed out

ASP 0114

Object not free threaded

ASP 0115

Unexpected error

ASP 0116

Missing close of script delimiter

ASP 0117

Missing close of script tag

ASP 0118

Missing close of object tag

ASP 0119

Missing Classid or Progid attribute

ASP 0120

Invalid Runat attribute

ASP 0121

Invalid Scope in object tag

ASP 0122

Invalid Scope in object tag

ASP 0123

Missing Id attribute

ASP 0124

Missing Language attribute

ASP 0125

Missing close of attribute

ASP 0126

Include file not found

ASP 0127

Missing close of HTML comment

ASP 0128

Missing File or Virtual attribute

ASP 0129

Unknown scripting language

ASP 0130

Invalid File attribute

ASP 0131

Disallowed Parent Path

ASP 0132

Compilation Error

ASP 0133

Invalid ClassID attribute

ASP 0134

Invalid ProgID attribute

ASP 0135

Cyclic Include

ASP 0136

Invalid object instance name

ASP 0137

Invalid Global Script

ASP 0138

Nested Script Block

ASP 0139

Nested Object

ASP 0140

Page Command Out Of Order

ASP 0141

Page Command Repeated

ASP 0142

Thread token error

ASP 0143

Invalid Application Name

ASP 0144

Initialization Error

ASP 0145

New Application Failed

ASP 0146

New Session Failed

ASP 0147

500 Server Error

ASP 0148

Server Too Busy

ASP 0149

Application Restarting

ASP 0150

Application Directory Error

ASP 0151

Change Notification Error

ASP 0152

Security Error

ASP 0153

Thread Error

ASP 0154

Write HTTP Header Error

ASP 0155

Write Page Content Error

ASP 0156

Header Error

ASP 0157

Buffering On

ASP 0158

Missing URL

ASP 0159

Buffering Off

ASP 0160

Logging Failure

ASP 0161

Data Type Error

ASP 0162

Cannot Modify Cookie

ASP 0163

Invalid Comma Use

ASP 0164

Invalid TimeOut Value

ASP 0165

SessionID Error

ASP 0166

Uninitialized Object

ASP 0167

Session Initialization Error

ASP 0168

Disallowed object use

ASP 0169

Missing object information

ASP 0170

Delete Session Error

ASP 0171

Missing Path

ASP 0172

Invalid Path

ASP 0173

Invalid Path Character

ASP 0174

Invalid Path Character(s)

ASP 0175

Disallowed Path Characters

ASP 0176

Path Not Found

ASP 0177

Server.CreateObject Failed

ASP 0178

Server.CreateObject Access Error

ASP 0179

Application Initialization Error

ASP 0180

Disallowed object use

ASP 0181

Invalid threading model

ASP 0182

Missing object information

ASP 0183

Empty Cookie Key

ASP 0184

Missing Cookie Name

ASP 0185

Missing Default Property

ASP 0186

Error parsing certificate

ASP 0187

Object addition conflict

ASP 0188

Disallowed object use

ASP 0189

Disallowed object use

ASP 0190

Unexpected error

ASP 0191

Unexpected error

ASP 0192

Unexpected error

ASP 0193

OnStartPage Failed

ASP 0194

OnEndPage Failed

ASP 0195

Invalid Server Method Call

ASP 0196

Cannot launch out of process component

ASP 0197

Disallowed object use

ASP 0198

Server shutting down

ASP 0199

Disallowed object use

ASP 0200

Out of Range ‘Expires’ attribute

ASP 0201

Invalid Default Script Language

ASP 0202

Missing Code Page

ASP 0203

Invalid Code Page

ASP 0204

Invalid CodePage Value

ASP 0205

Change Notification

ASP 0206

Cannot call BinaryRead

ASP 0207

Cannot use Request.Form

ASP 0208

Cannot use generic Request collection

ASP 0209

Illegal value for TRANSACTION property

ASP 0210

Method not implemented

ASP 0211

Object out of scope

ASP 0212

Cannot Clear Buffer

ASP 0214

Invalid Path parameter

ASP 0215

Illegal value for ENABLESESSIONSTATE property

ASP 0216

MSDTC Service not running

ASP 0217

Invalid Scope in object tag

ASP 0218

Missing LCID

ASP 0219

Invalid LCID

ASP 0220

Requests for GLOBAL.ASA Not Allowed

ASP 0221

Invalid @ Command directive

ASP 0222

Invalid TypeLib Specification

ASP 0223

TypeLib Not Found

ASP 0224

Cannot load TypeLib

ASP 0225

Cannot wrap TypeLibs

ASP 0226

Cannot modify StaticObjects

ASP 0227

Server.Execute Failed

ASP 0228

Server.Execute Error

ASP 0229

Server.Transfer Failed

ASP 0230

Server.Transfer Error

ASP 0231

Server.Execute Error

ASP 0232

Invalid Cookie Specification

ASP 0233

Cannot load cookie script source

ASP 0234

Invalid include directive

ASP 0235

Server.Transfer Error

ASP 0236

Invalid Cookie Specification

ASP 0237

Invalid Cookie Specification

ASP 0238

Missing attribute value

ASP 0239

Cannot process file

ASP 0240

Script Engine Exception

ASP 0241

CreateObject Exception

ASP 0242

Query OnStartPage Interface Exception

ASP 0243

Invalid METADATA tag in Global.asa

ASP 0244

Cannot Enable Session State

ASP 0245

Mixed usage of Code Page values

ASP 0246

Too many concurrent users. Please try again later.

ASP 0247

Bad Argument to BinaryRead.

ASP 0248

Script isn’t transacted. This ASP file must be transacted in order to use the ObjectContext object.

ASP 0249

Cannot use IStream on Request. Cannot use IStream on Request object after using Request.Form collection or Request.BinaryRead.

ASP 0250

Invalid Default Code Page. The default code page specified for this application is invalid.

ASP 0251

Response Buffer Limit Exceeded. Execution of the ASP page caused the Response Buffer to exceed its configured limit.

Unicode mails send using CDOSYS & Bodypart show special or funny characters in message body


Recently I was working with a Customer who uses ASP & CDOSYS to send Unicode content e-mails. He had the following partial code-snippet:

...
Set objMail = Server.CreateObject("CDO.Message") 'Create CDO.Message Object
Set objBodyPart = objmail.BodyPart 'Create BodyPart
objBodyPart.Charset = "UTF-8" 'Set relevant Charset
 
Set objConf = Server.CreateObject("CDO.Configuration") 'Create Configuration Object
Set objFields = objConf.Fields 'and set its Configuration fields
 
With objFields 
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send using port or pickup
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost" 'Specify SMTPServer
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 20 'Specify timeout
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 'Specify the port
.Update 'Update the Configuration
End With 
 
With objMail 
Set .Configuration = objConf 'Set the configuration object
.From = email 'Set From users
.To = Trim(recip) 'Set recipients
.Subject = subject 'Set the subject
.TextBody = txString 'txtString contains the unicode chars
End With 
 
objMail.Send 'Send
'Release the objects
Set objFields = Nothing 
Set objConf = Nothing 
Set objMail = Nothing 
...

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

But he updated that he can display the information correctly in a web browser using UTF-8 encoding on the web page; But whenever he send the information

via email the Unicode values in the message body show the "special or funny" characters.He also tried setting the charset for the email but it doesn’t made any difference.

When we started troubleshooting we found that we need to set the HTMLBodyPart and TextBodyPart Charset in the above code, which resolved the issue.