Z
Zuel
Hi Folks!
I am developing with VB ASP .net and C#. I received an error
while compiling, BC30652. This error says that a reference to an
assembly missing.
The Details are this.
1 VB ASP.net web application - this is the component where the error
exists.
2 VB class project containing our credit card transactions.
3 C# class project with our datastore utility (static) access methods
, IE SQL Database.
in the ASP event for a webform button click, I create the VB credit
card classes and fill appropriate data from the web form. I then pass
these classes to a static C# datastore class method. This saves the
data to the database prior to the actual transaction in the VB
classes. Finaly I update the database with the responses from the
credit card transaction.
example: (in pseudo code)
VB Class assembly *******************
public class (VB) CreditCardTransaction
public variables {Transaction information etc...}
public function commit() as CreditCardResponse ' commits the
credit transaction to provider
...
end function
End class
public class (VB same assembly as above) CreditCardResponse
public variables {Response information filled in by commit}
end class
C# Class assembly ********************
public class DataStore{
// more util functions for generic database stuff
}
public class (C#) CreditCardDatabaseUtil : DataStore{
public static CreditCardResponse saveToDataBase(
CreditCardTransaction trans){
...
}
public static updateToDataBase( CreditCardResponse resp){
}
}
ASP Project codeBehind: ***************
public sub On_Click()
dim trans as new CreditCardTransaction()
trans.{Set transaction information etc..}
saveCCToDataBase.saveToDataBase(trans) '{Error blue line
under trans}
dim response as CreditCardResponse = trans.commit()
updateToDataBase(response) '{Error blue line under response}
end sub
}
The error BC30652 only applies to the paramaters of the method calls
for the datastore class, save and update ToDataBase.
I find this extremely weird. I have references to my VB and C#
classes in the ASP Project references. But the error insists I am
missing a reference to an assembly. What's more weird is trans is
created above the error with no warning at all. And if I remove the
datastore calls the ASP project compiles fine.
My Workaround was to change the datastore parameters of the save and
update methods from the transaction and response classes to Object
classes. In both those methods I check for the appropriate class by
if object.GetType == typeof(appropriateclass);
but I am so confused as to why this happened. Anyone with any ideas?
How to prevent this in the future? Should I rely more on interfaces
to interact with an ASP project?
Thanks!
Erik
I am developing with VB ASP .net and C#. I received an error
while compiling, BC30652. This error says that a reference to an
assembly missing.
The Details are this.
1 VB ASP.net web application - this is the component where the error
exists.
2 VB class project containing our credit card transactions.
3 C# class project with our datastore utility (static) access methods
, IE SQL Database.
in the ASP event for a webform button click, I create the VB credit
card classes and fill appropriate data from the web form. I then pass
these classes to a static C# datastore class method. This saves the
data to the database prior to the actual transaction in the VB
classes. Finaly I update the database with the responses from the
credit card transaction.
example: (in pseudo code)
VB Class assembly *******************
public class (VB) CreditCardTransaction
public variables {Transaction information etc...}
public function commit() as CreditCardResponse ' commits the
credit transaction to provider
...
end function
End class
public class (VB same assembly as above) CreditCardResponse
public variables {Response information filled in by commit}
end class
C# Class assembly ********************
public class DataStore{
// more util functions for generic database stuff
}
public class (C#) CreditCardDatabaseUtil : DataStore{
public static CreditCardResponse saveToDataBase(
CreditCardTransaction trans){
...
}
public static updateToDataBase( CreditCardResponse resp){
}
}
ASP Project codeBehind: ***************
public sub On_Click()
dim trans as new CreditCardTransaction()
trans.{Set transaction information etc..}
saveCCToDataBase.saveToDataBase(trans) '{Error blue line
under trans}
dim response as CreditCardResponse = trans.commit()
updateToDataBase(response) '{Error blue line under response}
end sub
}
The error BC30652 only applies to the paramaters of the method calls
for the datastore class, save and update ToDataBase.
I find this extremely weird. I have references to my VB and C#
classes in the ASP Project references. But the error insists I am
missing a reference to an assembly. What's more weird is trans is
created above the error with no warning at all. And if I remove the
datastore calls the ASP project compiles fine.
My Workaround was to change the datastore parameters of the save and
update methods from the transaction and response classes to Object
classes. In both those methods I check for the appropriate class by
if object.GetType == typeof(appropriateclass);
but I am so confused as to why this happened. Anyone with any ideas?
How to prevent this in the future? Should I rely more on interfaces
to interact with an ASP project?
Thanks!
Erik