Similar Threads:
1.ASP.Net doesn't like my ServicedComponent class? [C#]
Hi everyone,
I have a toy class that inherits from ServicedComponent and a
hand-crafted interface. It looks like this:
[Transaction(TransactionOption.Supported)]
public class myclass: ServicedComponent, IReadData //IReadData is the
hand-blown interface
{
public string GetString()
{
return "hello";
}
[AutoComplete]
public string GetData(string strParameters)
{
return "goodbye";
}
}
}
I've put this into a COM+ package, using regsvcs.exe, and made the package
as "open" as possible-- no security access checks, for instance. It's
running as a server application under COM+.
Here's the trouble: calling the class's GetData() method in a console app
works fine, but the same call from an ASP.Net page gives an error that says:
"System.InvalidCastException: QueryInterface for interface
Interfaces.IReadData failed."
Here's my definition of the IReadData interface-- it's simple enough:
public interface IReadData
{
{
string GetData(string strParameters);
}
}
Am I doing something wrong here that I can't see? Are you allowed to
inherit from interfaces at the same time as ServicedComponent, or are there
restrictions regarding this I don't know about? Or, is there something else
entirely at work? I'm scratching my head as to why this is happening.
Thanks for any and all help.
-Jim
2.ASP:Button OnClientClick and Server Side Not working together
Hi,
I have a asp:button which allows a user to delete a record, and I wish to
prompt them with a client side confirmation. The javascript confirm
messagebox does show and the cancel button is fine, however when I click OK,
I expect the Server Side Postback OnClick event to fire, but it does not.
Any Ideas?
Here is the code:
<asp:Button ID="BDelete" runat="server" CssClass="buttonRed" Text="Delete"
Width="80px" OnClick="BDelete_Click" UseSubmitBehavior="False"
Visible="False" OnClientClick="return confirm('Delete Work Order?');" />
3.ServicedComponent collection class w/ servicedcomponent value obje
I'm having trouble with the following combination. Ordinarily I would not
code something like this, but unfortunately I have to rewrite an existing COM
business app in .NET and client code must be compatible. So anyway, here is
the issue:
I have a collection class that inherits servicedcomponent and implements
IEnumerable.
I can add any object that doesn't inherit servicedcomponent to this
collection class and I can enumerate it in .NET and COM.
Unfortunately I need to be able to add a value object that inherits
servicedcomponent to this collection class. Via .NET everything works fine,
I can add objects and enumerate the collection. Via COM I can add the
object, and I can iterate the collection by its index, but if I try to
enumerate via For Each I get "Object required.".
Has anyone run into this or have any words of wisdom? I can post sample
code if that would help, but the code is pretty straight forward. The
collection class is simply wrapping an ArrayList and returning the ArrayLists
enumerator within the GetEnumerator. I have also tried implementing a custom
enumerator, to no avail. I also tried getting an object array from the
arraylist and returning its enumerator.
Any clues?
4.Access and ASP.NET working together - any advice?
I am using Access to run a database within the company and also have a
website that makes some of the information available to the general public
And so far everything is working very well
q. is there any problem using Access to do all our internal work while the
DB is exposed to the web
q. if I move to SQL server can I still use all the features of Access (VBA
reporting etc) for our internal work
I really like Access and would hate to have to do everything through ASP.NET
if I don't have to
I think I just need a little advise before I get stuck into the development
work
Any feedback will be much appreciated
Phil
PS I may have double posted this!
5.VB.Net 2003 and VS 2005 not working together
Does anyone know when building a msi file under VB.Net 2003, it would try to
install something from the VS 2005 Beta 1? I have both products installed.
Thanks,
6. Interop class works from winforms but not asp.net
7. named pipes connection string working fine in .net EXE, but NOT working from asp.net
8. ServicedComponent.DisposeObject(this) not working as expected