473,803 Members | 3,431 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

InstanceContext Mode.Single + OperationContex t.Current

Hi all,
i have a WCF service for USB communication. I need to instance it as a
singleton class so i do:

<ServiceBehavio r(InstanceConte xtMode:=Instanc eContextMode.Si ngle, _
ConcurrencyMode :=ConcurrencyMo de.Multiple)_
Public Class myService

....

End class

And that's OK! But I also need do define callbacks to signal events so
I add a callback Interface and:

<ServiceContrac t(NameSpace:="h ttp://Microsoft.Servi ces", _
SessionMode:=Se ssionMode.Requi red, _
CallbackContrac t:=GetType(ImyC allback))_
Public Interface IService

...

end Interface

The problem is in the constructor method of Service'class where I've
to get the InstanceContext for the CallbackChannel . I got an exception
in this code:

public sub new

callback = OperationContex t.Current.GetCa llbackChannel(O f
IEasyBusCallbac k)() '<-Reference to an object not set up on an object
request

end sub

Note that class myService inherits another class that implements
communication

thanks

Jul 24 '07 #1
0 1760

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

Similar topics

2
6606
by: Jen F. | last post by:
I have inherited a medical database in which there are multiple values stored in a single field (ie. "Current Conditions" field might contain 1-20 different conditions, separated by comma (ie. "Heart Disease,Hyper Tyroid,Cancer" etc. I would like to search via combo box for any one or more than one value in this field, ie-what patients have Heart Disease or Cancer by selecting these disorders off the combo box list. Any help would be...
2
1620
by: Keith Patrick | last post by:
I have a web app that consists of a single page. It works a lot like starter kit examples of menu/content apps, and it has a sitemap associated with it. However, my app doesn't go from page to page to show content; selecting a menu item from the associated TreeView loads a usercontrol associated with my content and displays it in a MultiView in the content area. The SiteMap stuff itself works because it's in Select mode, and my node...
2
9770
by: John Dann | last post by:
I'm retrieving some columns from a database with numeric values that fall comfortably within the range of the Single type and I'm tempted to use Single for the relevant column type in the retrieved dataset. (Actually the values are held as integers in the database for compact storage but are scaled to their true Single values during retrieval). But I'm sure that I keep reading that there's no performance penalty to using Double rather...
2
3400
by: Matt | last post by:
I have a client that transmits a file to us with many XML documents enclosed. The problem is that each is a different format and may have different encodings as they contain information from many different countries. We can handle all the different documents when they are split into single files and we currently have a cluge to do this. I was wondering if someone has a good idea to perform this same process in C#. I know I can open the...
5
2988
by: BMeyer | last post by:
I have been losing my mind trying to parse an XML document (with nested child elements, not all of which appear in each parent node) into a DataGrid object. What I want to do is "flatten" the XML document into a text document with a single row for each parent node (that has all of the values from all of the child nodes for that row) The DataView within VS 2005 IDE displays my 15 or so child tables - and knows that some parent rows...
3
7198
by: Mark Jerde | last post by:
VS 2005. When I google "CSharp single instance form" the returned pages usually use a Mutex or the VB.NET runtime library. http://en.csharp-online.net/Application_Architecture_in_Windows_Forms_2.0%E2%80%94Single-Instance_Detection_and_Management http://www.codeproject.com/csharp/SingleInstanceApplication.asp http://blogs.msdn.com/onoj/archive/2004/06/04/148532.aspx "Program.cs" below seems to work fine. A feature is it restores a...
4
10716
by: dgilbert | last post by:
I have a custom membership provider that I am using to authenticate users in a WCF web service hosted IIS. I want to be able to see any cookies that come across and save session variables, but I cannot get to the OperationContext.Current nor the HttpContext.Current (I am using aspNetCompatibility=true and confirmed that it is enabled in the debugger) - both are null. Is there a setting someplace that will enable these to be available to...
10
4158
maxx233
by: maxx233 | last post by:
Hi, I'm new to OO and GUI programming and would like to know: what's a good standard way of creating an application that loads different function-content in a standard space on a single form? In other words, I have a single form with a toolbar across the top. When someone clicks the "create new employee" icon I want the controls below the toolbar to change to whatever's needed to create a new employee record and add that to the DB. When they...
7
3510
hodgeman
by: hodgeman | last post by:
Hello thescripts forums users... I've found a lot of answers to problems I've had in the past from this forum, and this is the first mySQL query issue I haven't been able to find an answer from anywhere so thought my time first post should be here. With that out the way... I have a website I've built for my day job rotoruaNZ.com/events that I'd like to improve upon. We have numerous events posted on our website that take place around...
0
9564
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10548
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10295
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7604
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.