Finding a dll whose CLSID is known - dll

I've downloaded the w3sockets. Primarily using for trying to do telnet via an application. So far we've been experimenting with vbscript. In vbscript we do something like:
Set socket = CreateObject("Socket.Tcp")
I am trying to use this for a .net application. I need to know the dll it is hosted in. Anyway I can find this?

Look in the registry under HKEY_CLASSES_ROOT and search for Socket.TCP. Drill down and it should be there.
If all there is under there is a guid like
{ECCDF543-45CC-11CE-B9BF-0080C87CDBA6}
Then search for that under the registry. It should all be there.

You can search the registry for that progid (the human-readable name), use the entry there to find the classid (the guid for the class) and use the entry there to find the path of the localserver its hosted in... or you could run up OleView.

If you need to open a TCP socket from a .NET application, why are you using an external library instead of System.Net?

Related

Where SBODI_Server library is save?

I need to create a C # project that uses the DI server library. But I do not know where the libray is saved.
I reinstalled the SDK (and enabled to add the Di server library), but when I try to add it as a reference, I do not find it.
I'm using VS2017 and SAP 9.3.
enter image description here
If it's installed correctly it should show up as a COM reference called "SAP Business One DI Server API". See https://archive.sap.com/discussions/thread/3776529
The default installation location is C:\Program Files (x86)\SAP\SAP Business One ServerTools\DI_Server
Note that if you're going to use it in a web service hosted under IIS, you have to set DCOM security to enable it to be instantiated. In Component Services it's called "SBODI_Server".

Can I specify a port on a COM object server URL?

I am attempting to create a COM object from a remote source in Coldfusion and I'm running into a lot of errors. I am running 32 bit coldfusion because 64 bit does not support COM objects so I know that isn't the issue.
My question is can I specify a port in the server path in a <cfobject> tag?
I currently have (and yes, for the example I'm pointing to localhost):
<cfobject name="QBSession" type="COM" class="{6C8E45LC-B9MM-22LR-A223-50BMGBD45ACP}" action="create" context="remote" server="http://127.0.0.1" >
Can I put server="http://127.0.0.1:80"? Or will this cause further issues. I want to be able to specify a single port for the server to listen to for added security.
Thanks in advance!
Well, the answer seems to be that you cannot specify a port when creating a COM object.
The 64-bit question is still unanswered. I haven't found Adobe documentation supporting nor denying my earlier assertions, I have only found web posts that support it.
The other interesting thing is that apparently CF does not like to instantiate COM objects on different servers. Meaning I cannot pull an object from one server and instantiate it on another. I'm sure some of you knew this already but I am putting this up as a reference for all of us who didn't.
Hope this helps.

Port listening with JScript

I'm Trying to write a plugin for NotePad++ using NppScripting - a platform for writing plugins using javascript (specifically - JScript).
I was wondering if there was a way (probably via ActiveXObject) with which I could listen to a port asynchronously (specifically - I'm trying to write a CSS-X-Fire port to NPP).
I know .NET has that capability via System.Net.Sockets but I couldn't figure out a way to access it via JScript.
Any help?
If I were doing this, I would write the Socket server in .NET as a standalone EXE.
If I understand CSS-X-Fire correctly, it is a plugin to IntelliJ Idea that listens to outgoing communications from Firebug, and then updates source files appropriately. It sounds relatively simple. The .NET socket server could do this very easily.
Then, rather than expose a 2nd interface directly from the socket server to the scripting environment - like a COM object or a COPYDATA channel or something like that - I'd use the filesystem for communication. In other words, script something in NPP that polls the filesystem file for updates. When the .NET Socket server gets a message that says "Firebug just updated file X.css", the .NET Socket server can apply those updates to the filesystem file, and save changes back to the filesystem. Because the Notepad++ app polls the filesystem, it will see the updated file and reload it, picking up those saved changes. You'd need to do cursor management within N++ intelligently.
Emacs has an "auto revert mode" for this sort of thing, so the .NET CSS-X-Fire Socket server would work with emacs out of the box - no additional scripting required. Not sure if N++ has an auto-revert equivalent.
I eventually decided to use Adobe AIR to create my solution. It provides an amazing set of APIs, including a set of Socket APIs.
You can look at my solution here

FluentNHibernate blows up in Windows Service but not website

I've got a class library doing all my NHibernate stuff. It also handles all the mapping using Fluent NHibernate - no mapping files to deploy.
This class library is consumed by a number of apps, including a Windows Service running on my computer. Although it works fine in all my web apps, the Windows Service gets this when it tries to use NHibernate:
An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.
at FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory()
at Kctc.NHibernate.KctcSessionFactory.get_SessionFactory() in C:\Kctc\Trunk\Kctc.NHibernate\KctcSessionFactory.cs:line 28
...more stack trace...
I have checked for an InnerException and there doesn't appear to be one. I have no idea what the PotentialReasons collection is, and Google doesn't seem to be forthcoming either.
This is my dev machine, so when I'm working on my web apps they run locally (i.e. using the web server in Visual Studio). The fact that the Windows Service and my dev web apps are running on this same machine suggest it's not to do with trust settings or what have you.
Can anyone suggest what I should try? This is one of those ones where I'm so stumped I can't even think of how to get more information about the problem.
Just a wild guess. NHibernate picks up the hibernate.cfg.xml file from the execution directory. Did you configure the execution directory of the service that it can find this file?
I've found out what the problem is. The Service did not deploy with the required NHibernate.ByteCode.LinFu.dll.
I appear to have an ongoing problem with the Visual Studio compiler not always copying indirect dependencies (i.e. dlls required by class libraries required by the app) into the output folder during the build. I should have thought of this sooner really.
Thanks for racking your brains on my behalf guys.
I bet the name of the connection string is missing from the app.config. For me that message is almost exclusively a missing connection string.
Are you targeting the same database or could it be some sort of schema mismatch between databases?
Could it be authentication issues on the service like you use windows authentication where it can't be used (or the sql authentication that doesn't work)?
It's hard to tell when there is no code, just an exception!
EDIT Are you ever using HttpContext, HostingEnvironment or anything else specific to "web"?

WCF can only serialize parameters on development machine

I have created a WCF service using vb.net. Everything works fine on my development machine but when I deployed it it failed with the following error
'There was an error while trying to deserialize parameter http://tempuri.org/:querys'
I call a single method on the service and it has a single parameter called 'querys'. This parameter was a list(Of CustomType).
I then created a new method with a single parameter of type ArrayList. Thinking that this should serialize. Again it works fine on my development machine but fails when I deploy it with the same error a above.
I am completely stumped how it can serialize a parameter on one machine and not on another. I've tried it on 2 other machine and it doesn't work on either of them. So that rules out a problem with the machine itself.
All machines are running Win XP and .Net v3.5. The service was developed using VB .net in Visual Studio 2008.
Has anyone else experienced this?
I have not included any code because the error is happening System.ServiceModel and as I mentioned above the code does work on the development machine.
Please let me know if you need any more information.
Thanks in advance
Did you mark your 'CustomType' and its fields/properties you want to serialize with attribute DataContract, DataMember?
When you add the service reference to your client app which setting do you use? (Reuse types in referenced assemblies, always generate message contracts...)
If you host the WCF service on a IIS, then you should remember to run this command on the servers.
C:\WINDOWS\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe /i /x
Thanks to everyone who replied,
I have resolved the problem but unfortunately do not how. I tried many code changes but as far as I can tell I have reset the code back to the way it was. It is working now and I can not spend any more time on the issue to find out what caused it.
Just one of those things I guess.