473,385 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Custom Events in Web Services

Hello,
I have created a class with custom events.
The delegate for the event is created before the class is declared.
This event works fine when deployed locally.
I convertied the Class into a Web Service, by adding the appropriate
[WebMethod()] and [WebService()] attributes.

When I try to build the Project, I get an error stating the the delegate has
no constructor.

Is there any special attribute I need to apply to the delegate, to make it
work?
Is there any Reference material for declaring delegates and events in
WebServices?
Any help would be appreciated.

Thanks in Advance,
Darshan
Jul 21 '05 #1
2 1495
You probably need to include some code. What part of the project is
failing? Is it the delegate definition that is failing to compile, or
an attempt to use the delegate?

Are you intending to delcare an event that will be consumed by your web
service clients? That they will automatically be notified when
something happens on the server? I don't think that is going to work,
you may have to re-think your design.

Joshua Flanagan
http://flimflan.com/blog

Darshan Mehta wrote:
Hello,
I have created a class with custom events.
The delegate for the event is created before the class is declared.
This event works fine when deployed locally.
I convertied the Class into a Web Service, by adding the appropriate
[WebMethod()] and [WebService()] attributes.

When I try to build the Project, I get an error stating the the delegate has
no constructor.

Is there any special attribute I need to apply to the delegate, to make it
work?
Is there any Reference material for declaring delegates and events in
WebServices?
Any help would be appreciated.

Thanks in Advance,
Darshan

Jul 21 '05 #2
Thanks for replying,
I found out from the knowledge base that
delegates and events don't work across a Web Service and a Windows App. I am
experimenting with TcpListener and TcpClient classes instead.

"In this world of complex technology to bring things together, the solution
often lies in simpler/primitive concepts."

Darshan

"Joshua Flanagan" wrote:
You probably need to include some code. What part of the project is
failing? Is it the delegate definition that is failing to compile, or
an attempt to use the delegate?

Are you intending to delcare an event that will be consumed by your web
service clients? That they will automatically be notified when
something happens on the server? I don't think that is going to work,
you may have to re-think your design.

Joshua Flanagan
http://flimflan.com/blog

Darshan Mehta wrote:
Hello,
I have created a class with custom events.
The delegate for the event is created before the class is declared.
This event works fine when deployed locally.
I convertied the Class into a Web Service, by adding the appropriate
[WebMethod()] and [WebService()] attributes.

When I try to build the Project, I get an error stating the the delegate has
no constructor.

Is there any special attribute I need to apply to the delegate, to make it
work?
Is there any Reference material for declaring delegates and events in
WebServices?
Any help would be appreciated.

Thanks in Advance,
Darshan

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Darshan Mehta | last post by:
Hello, I have created a class with custom events. The delegate for the event is created before the class is declared. This event works fine when deployed locally. I convertied the Class into a...
8
by: bryan | last post by:
I've got a custom HttpHandler to process all requests for a given extension. It gets invoked OK, but if I try to do a Server.Transfer I get an HttpException. A Response.Redirect works, but I really...
19
by: Jamey Shuemaker | last post by:
I'm in the process of expanding my knowledge and use of Class Modules. I've perused MSDN and this and other sites, and I'm pretty comfortable with my understanding of Class Modules with the...
3
by: George Jordanov Ivanov | last post by:
Folks, I am implementing a WebUserControl, which will have its own custom event StateChanged. Now, I want to add this event to the Events tab in the control properties, so that the users of my...
2
by: keithgell | last post by:
I needed to import large CSV files into Access, when requested by a command in a .Net interface. Because Access does not have a bulk insert command, and I already have vba macros in Access that...
5
by: Blue | last post by:
We have a custom word processing type editor built with C# and .NET 2.0 and we need to support typing in languages other than English. I want to be able to use the Windows IME to enter in text...
8
by: Tomasz | last post by:
Hello Developers! I have an interesting problem using my custom MembershipProvider, RoleProvider and Forms Authentication. Both MembershipProvider and RoleProvider require session state, where...
3
by: =?Utf-8?B?R3JhaGFt?= | last post by:
I've added 2 tracking services to the wf runtime; one is the standard SqlTrackingService: trackingService = new SqlTrackingService(<trackingConnectionString>); <workflow...
0
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Actually, my installer package is not for a Windows Service, but for a WinForms application. Well, it is kind of both: this is a multi-project solution with its main target being a WinForms...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.