Partager via


CSS API Error Handling

Whenever you call a Commerce Server 2009 Staging (CSS) method or get or set a CSS property, you might receive a COM exception, that is, an exception of type System.Runtime.InteropServices.COMException. You should check the exception object’s e.ErrorCode property for an error code.

Note

CSS makes internal calls to other programming APIs. These include COM, Security/ACL, Registry, Winsock, Service Manager, and Win32. These APIs can return error codes in addition to the given CSS error codes. For CSS error codes, you can use CReplicationServer.TranslateEventCode Method to retrieve the description, severity, and category of the error.

Example

CReplicationServer replicationServer = new CReplicationServer();
replicationServer.Initialize("");
  try
  {
  // Attempt to create a project (Note: Project1 could already exists)
  CReplicationProject project = (CReplicationProject)replicationServer.OpenProject("Project1", CSS_PROJECT_CREATION.CREATE_NEW_PROJECT);
  project.Commit();
  }
  catch (System.Runtime.InteropServices.COMException e)
    {
    if (e.ErrorCode == -1073680502) // error code for "project already exists"
      {
      // Print out the description, severity and category of the error object description, severity, category;
        replicationServer.TranslateEventCode(e.ErrorCode, out description, out severity, out category);
        Console.WriteLine("Error description = {0}, serverity = {1}, category = {2}", description, severity, category);
      }
        else
        {
        throw;
        }
    }
}

CSS Error Codes

The following table lists CSS error codes and their associated event IDs. This list contains only those codes that generate a warning (W) or error (E). For a complete list of event IDs, see Event Codes for Staging.

Error code

Event ID

Description

-1073680723

61101

Source directory is on a network drive. Cannot deploy from network drives.

-1073680722

61102

Access denied. User does not have CSS administrator or operator rights on the server or for the project.

-1073680721

61103

Unable to open the file.

-1073680720

61104

Project was unable to send the file.

-1073680719

61105

Destination directory is on a network drive. Cannot deploy to network drives.

-1073680718

61106

Unable to access the project source.

-1073680717

61107

Unable to connect to the remote server.

-1073680716

61108

SHA Hash did not match during a transmission. This could indicate transmission failure or that the files transmitted at the source have been modified in transit.

-1073680715

61109

Remote server was restarted. The project is being restarted.

-1073680714

61110

Project was aborted.

-1073680713

61111

Internal messaging sequence error occurred.

-1073680710

61114

Could not open given storage/stream. Make sure that the authentication account has access to this storage/stream.

-1073680709

61115

Authorization failure against the destination server. Make sure that the CSS service has access to this server.

-1073680708

61116

Remote authorization failed to the destination server. Make sure that the CSS service has access to this server.

-1073680707

61117

Message was received out of order. Closing connection.

-1073680706

61118

Connection failed and could not be reestablished.

-1073680705

61119

Project canceled at the request of the user.

-1073680704

61120

Could not add the specified destination(s). The maximum number of destinations has been reached.

-1073680703

61121

Cannot resolve IP address for the destination server. No virtual directory was created.

-1073680702

61122

Insufficient space on the disk.

-1073680701

61123

Too many active projects. No more can be started until other projects are completed.

-1073680699

61125

The remote network is down.

-1073680698

61126

The remote network is unreachable.

-1073680697

61127

The network connection was aborted at the network layer.

-1073680696

61128

The network session timed out on a send or receive operation.

-1073680688

61136

No projects defined.

-1073680687

61137

Could not find the project.

-1073680686

61138

Invalid parameter.

-1073680684

61140

Authentication failure. Make sure that the account has appropriate access on local and remote servers.

-1073680682

61142

Server is available, but the CSS service is not running.

-1073680681

61143

Server is unavailable.

-1073680680

61144

Server cannot be found.

-1073680679

61145

Could not find route. Make sure that the route name is correct and that it exists on the target servers.

-1073680678

61146

No routes defined.

-1073680676

61148

The CSS service on the destination server is paused and is not accepting new requests. Retry the project later.

-1073680675

61149

Could not restart the CSS service. The CSS service is not paused.

-1073680673

61151

Connection to the destination server has been reset. This indicates problems with the remote service or network.

-1073680672

61152

No entries.

-1073680671

61153

Could not start CSS service. The CSS service has already been started.

-1073680670

61154

Project did not start because the project is already running.

-1073680669

61155

CSS was unable to move the file.

-1073680668

61156

Thank you for your interest in Commerce Server 2009 Staging. This software has expired. You need to acquire the final retail version of this software.

-1073680667

61157

Project information is incomplete.

-1073680666

61158

Parameter not found.

-1073680665

61159

Project is running. The operation could not be completed.

-1073680664

61160

Project name is invalid. Project names cannot be empty and can contain only alphanumeric characters up to 49 characters.

-1073680663

61161

Route name is invalid. Route names cannot be empty and can contain only alphanumeric characters up to 49 characters.

-1073680662

61162

Parameter must be a positive integer.

-1073680660

61164

Too many arguments specified.

-1073680658

61166

Error opening file or file not found.

-1073680657

61167

Invalid file format.

-1073680656

61168

Error writing to file.

-1073680655

61169

Gethostname failed.

-1073680648

61176

Current context is invalid. Project being reset.

-1073680647

61177

Operation is not supported on a down-level server.

-1073680645

61179

Start pending completion of the active project.

-1073680644

61180

No event sinks defined.

-1073680643

61181

Could not find event sink.

-1073680642

61182

Host not found.

-1073680641

61183

Host not found, or SERVERFAIL. Try again.

-1073680640

61184

Non-recoverable Winsock error.

-1073680639

61185

Invalid address.

-1073680637

61187

Event sink specified by the data field did not initialize.

-1073680636

61188

Could not roll back project. No rollback information found.

-1073680635

61189

Project could not be started because no destinations are defined.

-1073680634

61190

Reauthenticate using an acceptable protocol.

-1073680633

61191

Function not supported in this version to this server.

-1073680632

61192

Specified user could not be found.

-1073680631

61193

No transactions for the specified project.

-1073680630

61194

No destination servers are defined.

-1073680629

61195

No schedules are defined for this project.

-1073680628

61196

Could not contact SMTP server to send e-mail report.

-1073680627

61197

Waiting to abort after losing connection with source server.

-1073680625

61199

IIS metabase is not responding.

-1073680624

61200

Commerce Server 2009 virtual directory not found.

-1073680622

61202

Dropped e-mail report.

-1073680621

61203

No SMTP server is defined.

-1073680619

61205

Could not create the upload page.

-1073680618

61206

System has detected a circular route. Project is not created.

-1073680617

61207

Transaction application failed. Check permissions on the destination directory and files and make sure that no files are locked open.

-1073680616

61208

Database error occurred.

-1073680615

61209

Unable to connect to remote server to forward events. This operation is not supported.

-1073680614

61210

Unable to send events to the destination server. This operation is not supported.

-1073680613

61211

File is corrupted or unreadable.

-1073680612

61212

File is busy.

-1073680609

61215

Could not find project on the destination server.

-1073680608

61216

Project information is incomplete on the destination server.

-1073680607

61217

Remote server is available, but the CSS service is not running.

-1073680606

61218

Disk is full on the destination server.

-1073680605

61219

Unable to open a file on the destination server. Check permissions on the project directory and files.

-1073680604

61220

Remote server could not be found.

-1073680603

61221

Unable to apply transactions on the destination server.

-1073680602

61222

Invalid flag combination.

-1073680601

61223

There was an error running the script. Make sure that the script exists and can be located in the path.

-1073680600

61224

Cannot forward events to the local server.

-1073680599

61225

Specified project schedule could not be found.

-1073680598

61226

An error occurred accessing the IIS metabase. Make sure that the Web site exists and that the account has access to it.

-1073680597

61227

An error occurred with the task scheduler.

-1073680596

61228

A destination for an IIS metabase replication is invalid.

-1073680595

61229

The event sink specified by the data field has started dropping events.

-1073680504

61320

Business data export failed.

-1073680503

61321

Business data import failed.

-1073680502

61322

Project already exists. Project create failed.

-1073680501

61323

Project is not configured as an IIS metabase project either at the source or one of the destinations.

-2147422507

61141

Could not delete the route from the project on at least one server on the defined routes. The project must be edited manually there.

This status represents a warning, not an error.

-2147422501

61147

Could not create the project on at least one server on the defined routes. The project must be created manually there.

This status represents a warning, not an error.

-2147422485

61163

No more items are in the list.

This status represents a warning, not an error.

-2147422447

61201

Connection failed. Will try to reestablish session.

This status represents a warning, not an error.

-2147422444

61204

Could not create the specified virtual directory.

This status represents a warning, not an error.

-2147422391

61257

File skipped because it could not be opened.

This status represents a warning, not an error.

See Also

Other Resources

Monitoring Commerce Server Staging

Event Codes for Staging

CSS API Supplemental