|
The CF doesn't support WMI at all. It also doesn't support ASP.NET, Enterprise Services, Message Queues, COM Interop, the OleDb and ODBC data providers, generic serialization, asynch delegates, Remoting, Printing, some XML stuff, ... and some other stuff I can't remember.
No, you can't use WMI form the Compact Framework. Windows CE doesn't have the support for WMI, so it's not included in .NET CF.
|
|
|
|
|
But is there some kind of work-around, maybe a library that someone has made or a link to a way to make a library? Because it works with queries there seems like there should be a way to hack a way to do it, even if I have to do the socket code myself.
|
|
|
|
|
Nope.
WMI has two parts, a server AND a client portion. The server runs on any Windows machine, with WMI installed, compiling all the data from the WMI Providers and serving it up through something akin to a small SQL server. This part doesn't exist in Windows CE at all.
The client side is also on every machine that has WMI installed. This part is a COM-based library that formats requests, talks to the WMI Server, processes results, handles application interaction, and all kinds of other stuff on WMI collections of WMI objects. This part ALSO doesn't exist in Windows CE.
There's nothing you can do about this unless you find someone who has written a WMI Client library for Windows CE. I haven't been able to find one...
|
|
|
|
|
:/, that's unfortunate... it seems like it would be a highly arduous task to do. I suppose its back to the drawing board; thank you very much for your assistance.
|
|
|
|
|
Hi all,
I'm trying to open a socket between a device running .NET CF 1.0 and a PC. The code that sets up the socket (in C#) looks something like this:
TCPClient cli = new TCPClient("192.168.100.150", 11240)
The host runs on 192.168.100.150 and listens on port 11240. When I run the above code on a device with .NET Framework 2.0, everything works fine but when I run it on a device running .NET Compact Framework it throws a System.Net.Sockets.SocketException with error code 11001 (which translates to "No such Host is known").
This seems to have something to do with the dotted IP Address because when I provide a url like "www.google.com" it works (but then throws another exception because you can't connect to google on 11240).
Would anyone have an idea why TCPClient wouldn't accept a dotted IP Address and how to get around it?
|
|
|
|
|
No idea why it's not working, but use the TcpClient constructor which takes an IPEndPoint instead.
TcpClient cli = new TcpClient(
new IPEndPoint(
IPAddress.Parse( "192.168.100.150" ),
11240
)
); The TcpClient constructor that takes a string is documented to accept a DNS name. A string representation of an IP address is not a DNS name.
|
|
|
|
|
Thanks Mike, that's good to know and I will certainly use this method in future, it just seems better.
However, this does not seem to relate to my problem. I have figured out in the mean while that it is not the dotted IP address causing the problem but rather the fact that I'm trying to access a computer on the local network.
I can open a socket to www.google.com for instance (by specifying either the IP address or the DNS name) but when I specify an IP address on the local network it doesn't work.
I can ping that address though so it's not a connectivity issue.
|
|
|
|
|
Is this a Windows Mobile 5.0 or 6 device connected to the desktop via ActiveSync?
ActiveSync doesn't actually route packets from the device. Instead it acts as a proxy - all DNS lookups resolve to the PC's IP address (of the PC end of the ActiveSync connection). ActiveSync then forwards the requests to the actual target server and vice-versa. However, it doesn't work for IP addresses.
Windows Mobile 5.0 turns off all other network interfaces and drops any dial-up connections (e.g. GPRS/EVDO mobile data) when connected to ActiveSync. Your only connectivity option is via the desktop passthrough.
Windows Mobile 6 allows you to control this - there's a checkbox in ActiveSync's Connection Settings labelled "Allow wireless connection on device when connected to the desktop" which I think is unchecked by default.
|
|
|
|
|
Hmm, that's good to know. The device runs Windows CE.NET 4.2 so I can only assume that your scenarion for version 5.0 will apply (if not worse).
Be that as it may, I did think of disconnecting ActivSync before attempting a socket connection and it still didn't work. However, in the mean while I've found another way of setting up a socket. In stead of using System.Net.Sockets.TCPClient I tried using System.Net.Sockets.Socket which required a few more specific parameters but ultimately worked like a charm.
My code now looks something like:
using System.Net;
using System.Net.Sockets;
Socket mySocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
EndPoint myEndPoint = new IPEndPoint(IPAddress.Parse("192.168.100.150"), 11240);
mySocket.Connect(myEndPoint);
I'd be very curious to know why this works but the TCPClient failed. But at least I've got this stumbling block out of the way now.
|
|
|
|
|
I need to write a debugger which will execute an process and I need to get notification when that process will write or modify any thing on the hard disk. Can we keep watch on any process for getting info when that process will write to hard disk? I have read something about "Win32 Debug API". Can any one guide me or give me any demo code for this?
|
|
|
|
|
chandni_chandrakant_maheta wrote: I need to get notification when that process will write or modify any thing on the hard disk.
There is no such notification. You'd have to inject hooks into all the I/O functions in the Win32 API to handle this, kind of like how FileMon does it.
chandni_chandrakant_maheta wrote: Can any one guide me or give me any demo code for this?
You probably won't find any specific to this application. No, I don't have any links or examples myself.
|
|
|
|
|
Thanks for your reply.
Dave Kreskowiak wrote:
You'd have to inject hooks into all the I/O functions
Can you please give me any sample code or any article from where I can know how to inject hooks for an I/O function.
|
|
|
|
|
|
Hi.
This morning tried to run an aplication running under .NET 1.1 at the same time i was developing something in 2.0. But all sites configured in IIS6 gave me errors, for .NET framework 1.1 version. I made a restart (iisreset) and launched first 2.0 web site containing all aplications under that framework version, and all of them worked.
If i repeat the process but first initialize aweb aplications under 1.1 net framework website, those aplications works but the ones on 2.0 net framework doesn't.
This is normal? I'm a newbie yet, but i'm hungry to learn more.
Thanx in advance everybody.;P
"I hated myself... no, I hated my place in the world" - From Jerry Maguire
|
|
|
|
|
You have to make 2 different Application Pools(App1 and App2), set the ASP.NET 1.1 sites to run on the App1 pool and ASP.NET 2.0 on the App2 pool.
http://stefanprodan.wordpress.com
|
|
|
|
|
Thank you Stefan. I guess i need less gaming and more IIS training. I'll make sure to learn begining from the basis and not to just jump into the last chapert.
Thanks again mate.
Leistath;)
"I hated myself... no, I hated my place in the world" - From Jerry Maguire
|
|
|
|
|
The fundamental problem here is that you can only load one version of the Common Language Runtime (CLR, the actual execution engine of the .NET Framework) into a process. The first version to load wins - subsequent attempts to load a different version are simply ignored.
IIS 6.0 uses the W3WP.EXE (W3 [World Wide Web] Worker Process) executable to run ASP.NET code. It knows how to host the CLR. IIS 5.x does not natively understand .NET and uses a different model, loading a DLL into its regular worker process, which in turn launches an ASPNET_WP.EXE process, but significantly, different versions of .NET launch their own separate worker processes so the clash does not occur.
So what you have to do is to ensure that the .NET 2.0 and .NET 1.1 applications do not share a worker process. You do this, as the other reply says, by defining a new application pool and assigning the .NET 2.0 applications to that. Or you can do it the other way round if you like, placing the 1.1 applications in the new application pool.
|
|
|
|
|
Well what can i say. A perfect answer might say. Too much books about this kind of topic doesn't explain this technical fact in so few lines and at the same time so clearly. I'm on the right path now.
Thank you Mike, great explanation! Right now i'm hungry for knowledge hahahaah.
Cheers.
Leistath
"I hated myself... no, I hated my place in the world" - From Jerry Maguire
|
|
|
|
|
If you want to know what's going on at the low levels of the .NET Framework, Jeffrey Richter's book "CLR via C#" is a good one. I have the first edition of this book, titled "Applied Microsoft .NET Framework Programming". I've not re-read it in a while - I have a good memory for crazy technical detail - but it was a great introduction to the CLR when I first started .NET programming.
I can't recall where I first heard about the two-frameworks-in-one-process problem. It might have been Chris Brumme's blog[^] (warning, lots of technical detail ahead!) or simply someone complaining about it in the context of Office add-ins.
|
|
|
|
|
I am hosting in a windows service a remoting object as singleton, I want to make sure that clients calls are thread-safe. Here is the class definition:
[Synchronization(true)]<br />
public class Service : MarshalByRefObject, IService
My question to you is if the Synchronization attribute is a good thing or should I use locks inside every Method of the Service class.
http://stefanprodan.wordpress.com
|
|
|
|
|
Hello sir,
i am maintaining a windows service which run in every ten second and check if certain condition is true then it will connect with the database and made some entry when i install it on machine , at run time it display AN Unhandled Exception('System.Data.SqlClient.SqlException')occurred in windowsservice.exe. just in time debugging this exception failed with the following error:No installed Debugger has just in time debugging enabled. say not to connect with sql server.
please sir resolve my problem
Siddharth jain
siddharth
|
|
|
|
|
In VS.NET go to Debugger menu and select the 'Attach process', you'll be able to debug the service.
http://stefanprodan.wordpress.com
|
|
|
|
|
In your connection string, did you use trusted connection or did you supply a username and password that the SQL Server recognizes? If you used trusted connection, it won't work. The Local System account has no rights to the SQL Server. Change this to supply a username and password of an account that the SQL server trusts and you shouldn't have any problems.
|
|
|
|
|
Visual Studio .NET 2003 comes with version 8 of Crystal Reports. If I were to buy the complete package of Crystal Reports XI can I use the version XI Report Viewer instead of what comes with Visual Studio 2003?
jeneesh k v
Programmer NIC
|
|
|
|
|
Hi all,
I just joined a software solution providing company called, Zone24X7 in Sri Lanka.
I would like to know what is NUnit and hope someone could guide me through this .
Thank you.
RangaSL
|
|
|
|