
|
email this FAQ to a colleague
Q:
We get this error off and on when trying to create the Commerce.AdServer
object:
Microsoft VBScript runtime error '800a01ad'
ActiveX component can't create object
//global.asa, line 41
And here's line 41:
Set Ad = Server.CreateObject("Commerce.AdServer")
As mentioned, it's only once and a while. Has anyone experienced this? I
have 4 others servers running ad server and I haven't seen this before.
A:
The DSN connection string for adserver is hardcoded in the site.csc file.
There is no GUI to change it. Therefore, if this file was brought over from
another machine or if you have changed your DSN since installation, you have
accidentally broken Ad Server.
The only way to fix this problem is to modify the global.asa. Look for the
section in the global.asa that reads "The above connection string can be set
directly by removing the lines above, and uncommenting the line below.
Change the DSN and account information to match your configuration."
Uncomment the following line and change the DSN, UID and PWD appropriately:
connectionString = "DSN=admanager;UID=SA;PWD=PASSWORD;"
Comment out the following lines:
'pathConfig = Server.MapPath("config/site.csc")
'streamConfig = "ASConfig"
'set dictConfig = Server.CreateObject("Commerce.Dictionary")
'set fileDoc = Server.CreateObject("Commerce.FileDocument")
'call fileDoc.ReadDictionaryFromFile(pathConfig, streamConfig, dictConfig)
'set fileDoc = Nothing
'connectionString = dictConfig.MASConnectionString
Here is an example modified global.asa:
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnStart
REM -- read config info:
'pathConfig = Server.MapPath("config/site.csc")
'streamConfig = "ASConfig"
'set dictConfig = Server.CreateObject("Commerce.Dictionary")
'set fileDoc = Server.CreateObject("Commerce.FileDocument")
'call fileDoc.ReadDictionaryFromFile(pathConfig, streamConfig, dictConfig)
'set fileDoc = Nothing
'connectionString = dictConfig.MASConnectionString
REM - The connection string can be set directly by removing the lines
REM - above, and uncommenting the line below.
REM - Change the DSN and account information to match your configuration.
connectionString = "DSN=admanager;UID=SA;PWD=PASSWORD;"
REM -- The URL of the redirect script to use when previewing ads.
REM -- Some ad types require this to be specified as a fully qualified
URL.
Application("MASPreviewRedirectScript") = "adredir.asp"
REM -- create a data functions object for validation:
set MASDataFunctions = Server.CreateObject("Commerce.DataFunctions")
REM -- set up Application instrinsic object:
Application.Lock
set Application("MASDataFunctions") = MASDataFunctions
Application("AppName") = "AdManager"
Application("MASConnectionString") = connectionString
Application("MASConnectionTimeout") = 15
Application("MASCommandTimeout") = 30
Application.Unlock
End Sub
There's a nice little tool called editdictionary.asp that's buried on the commerce cd. Use it to edit your site.csc file. There's another tool on the cd that will actually package your site to distribute to another server. Located at bottom of page:
http://www.microsoft.com/siteserver/commerce/update/tools.asp
- Alan Stuart
|