rajeshvengir
April 29th, 2002, 03:19 PM
using System;
using System.EnterpriseServices;
using System.Runtime.CompilerServices;
using System.Reflection;
namespace MyCompSamp
{
/// <summary>
/// Summary description for RegSamp.
/// </summary>
[Transaction(TransactionOption.Required)]
public class RegSamp : ServicedComponent
{
public RegSamp()
{
//
// TODO: Add constructor logic here
//
}
[AutoComplete]
public bool Post(int accountNum, double amount)
{
// .. update the database, no need to call SetComplete
return true;
}
}
// - Registration details -
// COM+ Application Name to add the Component
[ assembly: ApplicationName("BankComponent")]
// Strong Name for Assembly
[assembly: AssemblyKeyFileAttribute("BankComponent.snk")]
}
On compiling ,the following error occurs:
E:\VSDOTNET\MyCompSamp\RegSamp.cs(32): Expected class, delegate, enum, interface, or struct
This Error occurs in the line [assembly : ApplicationName("BanKComponent"].
This is compiled inside the VisualC# ClassLibrary Project.
Can anyone help me in solving the error.
Thanks,
rajesh.
using System.EnterpriseServices;
using System.Runtime.CompilerServices;
using System.Reflection;
namespace MyCompSamp
{
/// <summary>
/// Summary description for RegSamp.
/// </summary>
[Transaction(TransactionOption.Required)]
public class RegSamp : ServicedComponent
{
public RegSamp()
{
//
// TODO: Add constructor logic here
//
}
[AutoComplete]
public bool Post(int accountNum, double amount)
{
// .. update the database, no need to call SetComplete
return true;
}
}
// - Registration details -
// COM+ Application Name to add the Component
[ assembly: ApplicationName("BankComponent")]
// Strong Name for Assembly
[assembly: AssemblyKeyFileAttribute("BankComponent.snk")]
}
On compiling ,the following error occurs:
E:\VSDOTNET\MyCompSamp\RegSamp.cs(32): Expected class, delegate, enum, interface, or struct
This Error occurs in the line [assembly : ApplicationName("BanKComponent"].
This is compiled inside the VisualC# ClassLibrary Project.
Can anyone help me in solving the error.
Thanks,
rajesh.