Following simple code:
Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
results in missing method exception on Windows Embedded Compact 2013.
Any idea what can be that wrong?
Best regards:
Stoyan
If you're using System.Net class library for .NET nanoFramework that's expected because isn't meant to on Windows Embedded systems, only on devices running .NET nanoFramework CLR.
Related
I'm studying Microsoft COM technology from the book Learning DCOM 1999. I am puzzled with its Hello Universe sample program in Appendex D. The code is available here.
This sample contains a HelloClient.exe and a HelloServer.exe. They can be run on different Windows machines and HelloClient.exe is able to remotely call server's exposed IHello interface.
I tried HelloServer.exe on Windows XP and the HelloClient.exe on Win7 successfully call into the remote object.
However, when HelloServer.exe is run on Windows 7, the remote client always fails on CoCreateInstanceEx(CLSID_Hello, ...) with 0x80040154 (Class not registered).
So I think there must be some change since Windows Vista/7 that causes the failure.
Then what is the change, or, what am I missing?
BTW: I compile the code using Visual Studio 2010 SP1.
I created a test WCFServiceLibrary project leaving the example code created by VS20212, then i created a ConsoleApplication in the same solution and added a web reference to the service.
In my ConsoleApplication i write this:
var ns = new ServiceReference1.Service1();
Console.WriteLine( ns.GetData( 100 ) );
I press F5 and everything seems fine.
Now i keep my WcfTestClient (the server hosting my service when launching from visual studio) running and create a new CompactFramework 2.0 ConsoleApplication project from VS2008.
I add a web reference as before, i compile and distribute my app on my test device I try to execute the same code you see above but i get this error:
"Unable to connect to the remote server" inner exception {"No connection could be made because the target machine actively refused it"}
Dows WcfTestClient have some limitation that do not allow me to connect from outside localhost? How can i solve this problem?
I had to change 'localhost' to my actual server ip in my CompactFramework project's app.config since i was remotely debugging an application deployed on a real device :)
I am running 32 bit Windows 7 Operation System which has IIS 7.5 installed.
In Visual Studio 2010, I open my solution having the web site project hosting WCF service. I have created an application in the IIS which points to the website project. The web site's bin folder has many assemblies which I need to refer. But those assemblies also have built using .NET 4 on the same computer.
I can browse the WCF service using both HTTP & HTTPS.
However, when i access the service from the test windows application (using the proxy class of the WCF contract), I get the error in question. Everything was working without problem earlier.
Anyone can help to fix the issue?. How to investigate this issue?
Error 0x80040154 means "Class Not Registered", which usually means you're depending on a COM component that hasn't been installed properly on the machine.
Is any of those Assemblies you reference a COM Interop Assembly? If so, find out what it uses and then install the appropriate COM component.
I'm developing Smart Device application, In that i have set of statement, which establishes connection with sql Server 2000 Database. When ever I try to open SqlConnection, I’m getting error "Can't find PInvoke DLL 'dbnetlib.dll'.". My OS is WINDOWS CE..
Thank You
Background
I have a BLL DLL that uses NHibernate. I share the same BLL between a client application and the WCF service (even though the client runs on another machine).
I can successfully use either SqlServerCe or SqlServer driver with the BLL with the client application but can only use the SqlServer driver for the WCF.
If I change the hibernate.cfg.xml to use SQL Server I am able to use the service as required with no exceptions being thrown.
The Error
The exact error from the log4net output is:
2421, 5, DEBUG, NHibernate.Connection.DriverConnectionProvider, (null),Obtaining IDbConnection from Driver
2483, 5, DEBUG, NHibernate.Connection.DriverConnectionProvider, (null),Exception thrown obtaining connection: Exception has been thrown by the target of an invocation.
I also have the following code in my WCF code behind file:
AppDomain.CurrentDomain.SetData("SQLServerCompactEditionUnderWebHosting", true);
NOTES
WCF bin directory contains all required DLL's for NHibernate and SqlServerCe
Does not matter if System.Data.SqlServerCe.dll is in the GAC
Does not matter if System.Data.SqlServerCe.dll is added to the web.config file under assemblies
Operating Systems is Windows Server 2003 R2 SP2
.NET Framework 3.5SP1 installed
Visual Studio 2008 installed
Just incase, I uninstalled anything to do with compact edition but this still did not resolve the issue
The Question
How would you try and determine why NHibernate cannot load the SqlServerCe framework?
What forensic analysis would you perform to try and accurately determine the problem so that you can then find ways of resolving it?
Update 1
Incase it was my code I just created a simple website and am able to successfully use the ORM to insert and retrieve records using a hard-coded path to the SDF database. If I use the same hibernate configuration file for the webservice then exception is generated. This does narrow down the problem to the WCF implementation.
Well, clearing the ASP.NET temp cache did not do anything and deleting and republishing my site did nothing, but reverting to an VM Snapshot on the Windows 2003 R2 SP2 O/S did!
An update or myself must have done something to the OS that caused the problems.
I have a different problem now as the SQL is not successfully running under the environment but at least the NHibernate driver is loading and running to which this question was asking.
Update: Yes, I can only get NHibernate talking to SQL Server still and this is fine for the webservice endpoint. We will investigate the issues at a later stage. Marking this answer as the correct one as no other comments have been added.