Serialization Error Serialization Error: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Microsoft.Dss.Services.Serializer.DataCache.SerializerFromType(Type type)
at Microsoft.Dss.Services.Serializer.SerializerService.SerializeToXmlNode(SerializeToXmlNode msg)
Hello,
Can anyone offer my any pointers to the above error in the debug log The code in question is as follows. The code seems to 'work' ok, and execution continues, except that this error shows up in the log. (The variables infile and instream are defined at class tevel since they are shared by other methods.)
// Handler for the message type OpenFile
[ ServiceHandler ( ServiceHandlerBehavior .Concurrent)]
public IEnumerator < ITask > OpenFileHandler( OpenFile _OpenFile)
{
LogInfo(_OpenFile.Body.FilePath, "OpenFileHandler" );
try
{
infile = new System.IO. FileStream (_OpenFile.Body.FilePath, FileMode .Open, FileAccess .Read, FileShare .ReadWrite);
instream = new System.IO. StreamReader (infile);
// skip the header
string s = instream.ReadLine();
if (s != null )
{
ReadLine _ReadLine = new ReadLine ();
_mainPort.Post(_ReadLine);
}
}
catch ( Exception e)
{
LogInfo(e, "OpenFileHandler" );
}
yield break ;
}
The type definitions are here:
// Open a text file
public class OpenFile : Update < OpenFileBody ,
PortSet < DefaultUpdateResponseType , Fault >>
{
public OpenFile()
: base ( new OpenFileBody ())
{
}
}
[ DataContract ]
public class OpenFileBody
{
// Filepath
[ DataMember ]
public string FilePath;
}
// Read the next line
public class ReadLine : Update < ReadLineBody ,
PortSet < DefaultUpdateResponseType , Fault >>
{
public ReadLine()
: base ( new ReadLineBody ())
{
}
}
[ DataContract ]
public class ReadLineBody
{
} Tag: Show and Tell My Vista Blog Architecture
How to use Serial Ports in MSRS On our sub ( see thread ), we communicated with most of our sensors via serial ports. There are various ways to read data from a serial port (polling, event handlers, etc.), and we chose polling because it was the only way we found that would guarantee packet synchronization. Because MSRS runs on only two threads, this presented a problem because (as we discovered), the .Read() and .ReadTo() functions are both thread blocking operations. This essentially brought our system to a halt, so we had no other choice but to open new threads within our service to handle the actual reading of the serial data; we then posted an internal byte[] message to get the data back into the MSRS system (hoping that we could post a message across threads). This scheme seemed to work, but is definitely not what is intended from within MSRS.
My question is, what is the proper way to handle reading of a serial port within MSRS in a non-blocking manner. Our only requirement is that the entire packet be read into a byte[] before a message is sent, because reading in a single byte and then posting a message for every byte would be unnecessarily costly on the system.
Is there a way to have a particular service run on it's own thread, or even multiple threads And if so, how would you decide how many extra threads you need, if any
Thanks,
Don Tag: Show and Tell My Vista Blog Architecture
Profiles Query When I try to run a profile query using the adapters, I get this from the event logĄ
The message body received by the send adapter is not valid for the CommerceServerProfilesQuery API call. Message ID: 60cfb944-8313-4ccd-aac1-eb6707fe7789. Detail: The XML supplied does not conform to the search clause schema.
This is the XML I am using:
< xml version="1.0" > <CommerceServerProfilesQuery ProfileType="UserObject" ReturnKeysOnly="false"> <CLAUSE OPER="equal" xmlns=" http://schemas.microsoft.com/CommerceServer/2004/02/Expressions "> <PROPERTY ID="first_name" TYPE="String" /> <IMMED-VAL TYPE="String"> <VALUE>Paul</VALUE> </IMMED-VAL> </CLAUSE> </CommerceServerProfilesQuery>
Any ideas what I am missing
Thanks for any help! Tag: Show and Tell My Vista Blog Architecture
Download of scripts from the web Hi Amy,
I really appreciate your help, still I couldn't manage to make it work.
Actually, there was a typo in my post: I tried to launch HDiSim with "-req" flag, but without success.
When I try to download a file to file:///required/ I always get an error code 40 (Not enough space for response) while, when trying with file:///common/ the download doesn't even start.
Finally I tried the example you pointed, but I got the same error code 40...
I am running short of ideas. Do you have any clue
Thanks again. Tag: Show and Tell My Vista Blog Architecture
WCF: Error Code vs Exception? You could try a more simplistic approach:
GetDocumentResponse GetDocument(GetDocumentRequest request)
GetDocumentRequest would have everything you need to call the service (input parameters, service/application parameters, etc.)
GetDocumentResponse would have the data you want to retrieve and the execution status.
You should leave SOAP as transport only. That way you can easily consume/expose services using other "protocols" (like REST, RSS, etc.).
This suggestion doesn't invalidate anything Udi said about the publisher/subscribe model. It's just a simplier and not so generic service contract. Tag: Show and Tell My Vista Blog Architecture
A Better Way To Solve the Silverlight/Firefox/Inline Xaml/Xhtml Doctype Issue? So I ran up against the problem mentioned here about how Silverlight can't render inline xaml in Firefox when the doctype is xhtml. I see the workaround there and it works. I just have doubts that this is the route we should be taking. To explain my proposal, here's my situation as a little backdrop. I've got a page. During the regular page cycle of that page I get all the data I need to dynamically create the Xaml I need. Since the Xaml is being generated on the fly, I don't think the file-on-the-server method is a good idea. And since the data is already there during the normal page cycle, I don't want to make a separate Ajax call to render the Xaml. That's wasteful. Ideally I would generate that Xaml, stick it in a literal, and load it inline. But that doesn't quite work right. So here's how I'm getting around this at the moment. I have a block of Javascript that loads the Xaml through the SourceString property of the WpfeControl object. The string for that javascript is a literal. That literal is assigned Xaml for its text value during the page's execution. This works. But is it best Anybody have any better ideas If you want to see the code and a slightly longer discussion, I posted something up on my site . I would live to hear your thoughts... Tag: Show and Tell My Vista Blog Architecture
failover to backup web service DRP solution is usually a multi-tiered effort - moving to a remote site is usually only done when you have a catastrophy - because of issues like data synchronization and freshness - Even though it depends on your particular business, you would probably find that you cannot synchronize the whole data between the two sites at the same level of synchronization
You may still want to add NLB or other clustering solution on your "main" site and handle the rerouting of services outside your code in cases of a site fail-over
Arnon Tag: Show and Tell My Vista Blog Architecture
HelloWorld Sample problem Hi,
I dont seem to be able to get the Helloworld sample working, whenever I
press the createsession button i get a SoapFaultException. Checking the
Application log gives the following Failure Audit error:
Login failed for user 'Session-service'[Client: <local machine>] from the source MSSQL$SQLEXPRESS.
A second error whose source is session gives: Error detail - System.Data.SqlClient.SqlException: Login failed for user 'Session-Service'.
Do I need to give Session-Service an account on the SQL Server
Looking at another thread
from this forum I noticed that this worked for another user after they
changed the authentication mode to mixed authentication mode, this
didnt work for me.
I then noticed that I could not log onto the Microsoft SQL Server
Managment Studio Express using the Session-service username and
password as given in the Session.config file.
I created a user (sql_login" on the SQL Server and changed the
Session.config file to use this user when connecting to the Server.
This did not work again, but I got a slightly different error message:
Error detail - System.Data.SqlClient.SqlException: Cannot open database "CSFSessionDB" requested by the login. Login failed for user 'sql_login'.
I have verified that the following 3 attributes are correct:
SessionManagerUri, UIFormUri , ParticipantUri.
Any help would be greatly appreciated.
John Tag: Show and Tell My Vista Blog Architecture
Windows - A realistic look at the future of this outdated operating system Well, letĄ¯s check my experience.
My UCI instructor love his Mac book and claim it is so good that it can recover from the most damaging program by simply hold the note book close and open again. Guess what, it froze during the class and nope, what he claims is not true. Eventually he has to power off the Mac book. And then he claim it is MS fault for crappy Power Point. But hey, first he said Power Point on Mac is more stable because the team porting it is doing a better job. All seems to be wrong. I have never had a problem on my so-call less stable Power Point on my so-called unstable Windows95, 98, XP. They never failed on me all these year. And what are the odds a Power Point froze on Mac book in class, the truth is, it is really high. Yeah, sure, call Windows sux when application is unstable, and call the application sux when whatever your OS is unstable.
My experience with Red Hat Unix Server on my network lab.
First, I have to mount a floppy to copy files. And sadly they even lie to me that they copied the file when it is not. I hate system that lies. Give me the damn pop-up window if it failed. Don't lie to me saying the file is copied. And sure, I crashed the system un-intentionally too, and sadly it doesn't have the resource to show me a blue screen of death, it simply totally forze. Now, a blue screen of death is bless because at least I know I still have minimum control to the computer, not just totally died.
I don't care those theoretical stability on Linux. Yes there are times I have to terminate programs on XP. There are occasional reboot froze on XP. But it isn't that much. And Windows offers the best collection of applications, good or bad application, at least I have the chance to use any one of them.
Also Vista Ultimate OEM is only 200 US Dollars. With 50bucks of Complete system backup utility build into Business and Ultimate Version. A very cool looking user friendly Media Center GUI. A very important Parental control. Bit Locker encryption. Integrated spyware, fire wall, and other security feature. Well you can get it from MS for free, but it is integrated, so it feels cool. XP's remote assistance, remote desktop to terminal servers, remote desktop to other computer. A windows easy to use hardware manager. I consider Vista is well equipped with lots of good features under the hood.
Hey, maybe it is true that NT is not so perfect or stable. But a good OS should have good apllication collection, gloablization, good additional service like perforamnace manager, easy to use GUI, include good startup software like image processor, media editor, a large customer support, and so on. Windows it not perfect, but I think it cover each area fairly well. And throwing away the legacy software support will make me stay on the old Windows instead of adapting one, which I am glad Vista has enough backward competibility. And I think MS has pretty fun developer network, kudos to them. Tag: Show and Tell My Vista Blog Architecture
Content type for EDIFACT Messages - AS2 Are you sending the same message, whichever received If so can you create a new message and post Because if you guys are posting the same message the context properties of message too will flow ...
Thanks,
Saravana Kumar Tag: Show and Tell My Vista Blog Architecture
Introduction Message Hi All,
My name is uday reddy and i have been working as QA from past 3 months. I take this priviledge in introducing myself and would seek your help in retaining new thoughts. I appreciate if you can help me out with the current process flow in testing tools and relevant version updated on automation and manual testing.
Seeking your valuable thoughts and innovations
Regards Tag: Show and Tell My Vista Blog Architecture
when and what is the next MSRS edition? As the title, I would like to know what will the next MSRS edition look like
During one year's development, MSRS has: Firstly, on robotics competitions, MSRS has supported the SUMO, FIRST and ROBOCUP, furthermore, the simulation models for them are also available now.(although there is still something need to be improved on real time and accurate simulation) . Secondly, the MSRS 1.5 has integrate the vision and speach AI packages which are quite help for the developers. Thirdly, the manifest editor ...
Everybody on this forum is watching the growing of MSRS, and I am really a fan now. So I would like to know the foreshowing of the next edition! ^_^ Improvement of performance on CE device More accuracy physical simulation More AI packages ...
Hope MSRS win the best!
Amy Tag: Show and Tell My Vista Blog Architecture
R2 EDI adpter and EDIFACT 92.1 Hello,
most of our trading partners use EDIFACT 92.1 What is the easiest way to create a schema for these documents
Should I use the EDI Adapter and use another schema as a starting point
Thanks in advance.
Iain Tag: Show and Tell My Vista Blog Architecture
Windows Search Service error I have the same error - x64 / office 2007 / WDS 3.
It is absolutely refusing to index pst files - the event log reads:
The protocol handler Search.Mapi2Handler.1 cannot be loaded. Error description: Class not registered
in parallel outlook is spamming:
Failed to determine if the store is in the crawl scope (error=0x80040154). Tag: Show and Tell My Vista Blog Architecture
Accessing/setting encrypted profile data How right you are. I'm still receiving the same error however. "Failed to import PublicKey". Anything else that I could be missing -jb Tag: Show and Tell My Vista Blog Architecture
Need Help on User Authentication Design/Architecture Hello all! I am struggling with the best way to proceed on the design of User Authentication model for a suite of applications we have. What We Have
- We have four .NET applications that are all standalone executables - Each application accesses the same database (MS Access 2000) - Each application performs a separate business function - Some users run 1 or 2 of the applications, while users with more responsiblity run all of the applications - The applications can be launched within each other to facilitate navigation What We Need
- We need a way to force a "login" for the entire suite of four applications - The first time the user logs into one of the four applications, a login screen will appear - Upon successful login, the user will be allowed to use the application - Launches of subsequent applications will NOT re-prompt the user to login since (s)he has already logged in - Once the last application has been closed, the user will be considered "logged off" and will have to re-login once any of the applications is run again - A Potential Feature May Be: If the application is "idle" for a period of time, the user will be forced to re-login one time
- On each workstation, only one user can be considered "logged in". Logging in of a different user on the same machine will automatically "log out" the previous user I'm trying to figure out a way to have a "global" security manager that determines if someone is logged in. My ideal solution would be to have some sort of "shared" global object in memory that tracks this information, with each application being able to query this object...But, I'm not sure if this is programmatically feasible. What is the best way to proceed here Some other potential solutions are:
- Create a Windows Service that resides on each workstation. Each time an application launches, it notifies the service that a user has run an application. The service then keeps track of the running applications, and whether the user has logged on previously. If not, the login is presented. Upon termination of each application, the service is notified again. Once the last application is terminated, the user is logged out. User logging is done via an entry in the database.
- Each launched application writes to a generic "security" file on the specific workstation. It can then determine if there are any other applications running, and who is logged in, etc. Again, upon termination of an application, the security file is updated accordingly, and after the last app terminates, the user will have to re-login. - Same as the entry above, but use the database to track the running applications (instead of the security file). Thoughts on this Am I over complicating Thanks in advance! Regards. Tag: Show and Tell My Vista Blog Architecture
Proxy vs. Non-Proxy References What is the difference between a proxy reference and a non-proxy reference
When do you need to add a proxy reference and when do you need to add a non-proxy reference (just one of them)
When do both of them should be added to the project
Thanks,
Uri. Tag: Show and Tell My Vista Blog Architecture
How to ignore some a MFT's flush operation, after Session::start(...)? Hi, all:
For seek operation, I called Session:: start(...), and then Session sent " MFT_MESSAGE_COMMAND_FLUSH " to all of MFT components. For some reason, I need to call Session:: start(...), but not need to trigger "flush" operation for all MFTs .In other words, I want to ignore "Flush" operation for some a MFT, After session:: start(...). Is there any way Tag: Show and Tell My Vista Blog Architecture
monitoring .net application Hi Chandra,
This is the same book mentioned by me.
The only thing is that it is based on .net 1.0 and windows 2000.
That's why i want to know about any of ite new edition of this book, though its many contents are still relevant.
Cheers Tag: Show and Tell My Vista Blog Architecture
Woohoo, My first VB app, a calculator OK guys, I just started VB like 2 days ago, and I have now created a (basic) calculator that adds, subtracts, multiplies, divides, and has a Memory feature (as do most calcs.. ). It also has a link to my site (still under construction) at the bottom. tell me what you think about it as a first program.
the download: http://www.filefactory.com/file/23d3d1/
the source: http://www.filefactory.com/file/c9cec0/
Good bad or ugly
Questions:
1.) I want to make it more like the normal windows one where you can type the numbers and operations in without having to click in the text window, how do I do this
Answered!
2.) I want to make an option to switch to advanced mode, but keep the memory data. can I do this by typing basic.memval memval being my memory number and basic being my form name. Also, How do I create a menu bar that will show the options like file, edit, view, window, help, etc I really only want the view and help ones...
Any answers are appreciated (sp ) Tag: Show and Tell My Vista Blog Architecture
Vista WoW, but I got problem with Vista's IE7 WOW = Win16 on Win32. The compatibility layer that allowed you to run 16-bit apps on 32-bit Windows. Tag: Show and Tell My Vista Blog Architecture
Writing new data to a service from another program Thanks for your help. That look pretty much like what I want. As far as Im concerned if you can read data and write data to a service the rest is just like regular coding. - Thanks I'll give that a go. Tag: Show and Tell My Vista Blog Architecture
Show window form before logon screen I believe you can change the background too, but I would think it would be very restricted. I believe it loads the background only the once and displays it so I doubt streaming would be the answer, possibly (if unlikely) a GIF but I doubt that would be of any use. Do you mind answering what this is for I.e. why not do it when they login Tag: Show and Tell My Vista Blog Architecture
share a web app's App_Code class with a console app? Mike Chaliy wrote:
By default asp.net runs under account that does not has access to the registry.
Regarding author's question:
As mentioned above refactor your App_Code code to the new project. Make configuration sections, so you will be able to configure your web application with web.config and console with app.config.
That works but then the settings aren't shared across the asp.net/console apps. The registry is a good place to centralize configuration info. Tag: Show and Tell My Vista Blog Architecture
Small bug in BlobTrackerCalibrate.cs If I understand it correctly, line 239 in BlobTrackerCalibrate.cs does nothing:
Arbiter .Choice(
setImage.ResultPort,
delegate ( EmptyValue success) { },
delegate ( Exception e)
{
fault = Fault .FromException(e);
}
);
I think there is a yield return missing in front of the Arbiter.Choice. It's a pity that this can't be caught by the compiler somehow. It compiles clean, but the Choice is never executed. In this case it does not matter because the following code is only looking for a fault and then it returns.
Trevor Tag: Show and Tell My Vista Blog Architecture
how to implement Filter using Acme as the simulator Hi,
If you want to add dupelim eventhandler to acme test process do the following
1. run acme end to end sample, also start acme device simulator ( present in %rfidinstalldir%\Samples\Device Service Provider\Acme)
2. build the dupelim sample (you can find the samples http://go.microsoft.com/fwlink/ LinkId=86689 ) and copy the dll to bin dir of the process (here %rfiddatadir%\Processes\AcmeTestProcess\bin)
3. now stop the AcmeTestProcess and then edit it.
4. open the browse tab fo the process and right click on "component bindings" and add "new component". selec and add "dupelim eventhandler" component (dupelim should be on top of sink eventhandler)
5. validate the process and start the process
now whatever tags that this process gets from "Acme Device" will be dupeliminated and will be put in the sink database.
Hope this helps.
thanks,
keerthi. Tag: Show and Tell My Vista Blog Architecture
Lego NXT Connection I am trying to work with a Lego NXT model... I tried to connect the NXT model with my PDA using my C# application. However, I just managed to get the device information... So, may I know is there any way to send input to the Lego NXT Model I have checked the list of commands for Lego NXT model, but it does not help to sovle the problem... Tag: Show and Tell My Vista Blog Architecture
product tracking I am wondering if there is a simple solution to this problem.
I want to track how many times a given product have been show to the customers in order to build a "Top 10 most viewed products" control. I figured it would be easy to just add a propery to all products called ProductImpressions and then just use that like product["ProductImpressions"] += 1 when a product is viewed.
The problem I experience it that due to the catalog caching I only get the cached value in the property. and hence if the product is attempted updated multiple times in the same caching cycle it wont increment properly.
The alternative is to disable the caching and this is not really something i want to do.
Does anyone have a suggestion to a good solution to this
Best Regards
Philip Haugaard Tag: Show and Tell My Vista Blog Architecture
WDS displays "Open with..." dialog when selecting "more" from the pop-up The registry key you should check is:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Search-ms\shell\open\command
The Default value in this key should be of REG_SZ type and contain data similar to:
"C:\Program Files\Windows Desktop Search\WindowsSearch.exe" /url "%1"
If you still have problems, please let me know.
-Allen Tag: Show and Tell My Vista Blog Architecture
Convert Money value to its Textual Representation Hi Mark, I realized I left something out. In my original post, this thread, I mentioned setting StringBuilder's size to 64 but did not include that in my code sample. So if you could change it to do this new StringBuilder(64) I would apreciate it. As to the tests, since a random number generator is being used, it may be advantageous to run the different methods against the same data for each. Its random, but not necessarily the same for each. Or may do both a random sample and the a static sample. Oh,
and for the record and this thread, I'm not out to start a
competition. I'm not a maniac about nanosecond performance. Mostly, I
write Windows client apps, and 300 milliseconds is generally fast
enough to suit me. It's just that I'm dying to see how well the old
dog can still hunt. Ok, competition is solely my responsibility. <g> I thought maybe someone else had and even different way of doing this which might be interesting. Thanks, OmegaMan. Tag: Show and Tell My Vista Blog Architecture
errors occured during unpacking hello,
i've figured out.. the problem is i'm using Turkish_CI_AS and it doesnt work because of regional settings... the capital i I throw errors in Turkish regional settings..
i did convert them to the LATIN_CI_AS and everything is ok now..
thanks again.. but this should be considered as a bug as well.. Tag: Show and Tell My Vista Blog Architecture
Tanmay.S
Hi Guys ! Since this is a Show and Tell section I thought I'll show my Vista related Blog here.
Here's the link : http://everythingvista.expertrio.com/
Tell me howz it Feedbacks and Suggestions are welcome :)
Edit : Ohh yea and please open it with IE7/FF/Opera as it has some CSS Formatting problems with IE 6 !