|
I may be going slightly insane, but I have just installed VS.NET 2003 side-by side with my VS.NET 2002 installation.
I have compiled my remoting applications with VS.NET 2003 and they compile and (apparently) run fine -- but when I do System.Runtime.Remoting.RemotingConfiguration.Configure("server.exe.config") I get an exception informing me that there is malformed XML near the </configuration> tag.
I even tried putting a standard XML header in there but nothing changed.
Exactly the same config file works fine for the same code compiled under net1.0.
Am I doing something wrong, or has my mind finally cracked?
I'm going to sit in the corner and cry until someone helps me.
Dr Herbie.
|
|
|
|
|
I am currently prototyping an application that will support plugin extensibility.
I figured this would be easiest achieved by allowing assemblies to be dumped in the application's directory and then having my application enumerate all the classes in those assemblies that support the IMyPlugin interface.
So far so good.
The problem I am having is in the instantiation of those IMyPlugin supporting classes.
None of these classes have a parameterless constructor because they must be provied with at least an identifying GUID when they are instantiated. I thought the following code would allow me to create one of these objects using the Activator.CreateInstance(a,t,p()) method.
However, I am having a hickup ... I get an exception at the Activator.CreateInstance line
"[System.MissingMethodException] Constructor on type MyDemo.Plugins.BasicPlugin not found"
Here is the code ...
---------------------------------
Namespace MyDemo.Plugins
Public Class BasicPlugin
Implements IPlugin
Public Sub New(ByVal guid As System.Guid)
MyBase.New(guid )
End Sub
...
End Class
End Namespace
... And in another class this function tried to instantiate it ...
Public Function NewPlugin(ByVal pluginAssembly As String, ByVal pluginType As String) As IMyPlugin
' These are the parameters to pass to the tasklet constructor.
Dim constructorArgs As Object() = New Object() {_GUID}
' Instantiate the tasklet class.
Dim myDynamicallyLoadedPlugin As Object = Activator.CreateInstance(pluginAssembly, pluginType, constructorArgs).Unwrap()
' Cast the tasklet object to a Task type.
Return CType(myDynamicallyLoadedPlugin , IMyPlugIn)
End Function
---------------------------------
I would really appreciate any suggestions that help me resolve this. In the meantime I have added a static "factory" method to the BasicPlugIn class that creates returns a new BasicPlugIn object, but this is not as ellegant and I am feeling quite defeated.
TIA
JBoy
|
|
|
|
|
JBoy wrote:
Activator.CreateInstance(pluginAssembly, pluginType,constructorArgs).Unwrap()
You shouldnt be Unwrapping it, thats for remoting!
<a TITLE="See my user info" href=http:
|
|
|
|
|
I am looking for suggestions on how to do something described below:
- a web service that will be called by a web application about 200,000 times in a 15-minutes interval.
- Each call will generate a string of data that needed to be recorded to the central database.
Someone suggested to me:
- the data generated by each call should temporary be sitting in memory.
- A timer should wake up periodically to push the data to a queue, before the memory is too full.
- The queue will write the data to the central database at a daily scheduled time.
I would like to get some idea of what technique / technology that I can use to implement those suggestion., and to make the web service efficient.
I am new to .NET and MS technology. I hope that someone can just point me to some directions and will be very much appreicate.
Thanks.
A Newcomer
|
|
|
|
|
200,000 times in 15 minute intervals? Are you sure you really need to use a webservice for that? That is 200,000 HTTP requests and responses. Plus all the SOAP packaging, serialisation of the data, deserialisation, authenticating... At the least I know one IIS box is not going to come anywhere near handling that. You could optimise the data factory to hell and back but it is the IIS and webservice part that will tank.
Why does it have to be 200,000 transactions? Can you not send more data with fewer transactions?
I just think that no amount of in-memory storage, "queuing of memory" etc. ideas will help. The database could handle the writes easily enough, but not IIS.
Maybe you can explain what you are trying to do and we can come up with a better architecture and set of technologies for this
Paul Watson Bluegrass Cape Town, South Africa
Robert Edward Caldecott wrote:
My father-in-law calls yer man bits "weasels"
|
|
|
|
|
Actually 200,000/15 minutes is the total hits in the peak time of the day for a farm of 6-7 servers.
We are a brokeage firm that offers on-line quotes to clients. We would like to log the usage.
A Newcomer
|
|
|
|
|
farm of 6-7 servers
That is better. Also I misunderstood you originally, I thought you meant every 15 minutes you get 200,000 requests. Not 200,000 per 15 minutes
We are a brokeage firm that offers on-line quotes to clients.
Ok. Well if I think of anything I will post.
Paul Watson Bluegrass Cape Town, South Africa
Robert Edward Caldecott wrote:
My father-in-law calls yer man bits "weasels"
|
|
|
|
|
What if you use a message queue through, say, MTS; the webservice creates a message on the queue, then forgets about it. You could create a service somewhere else that listens for messages on the queue and processes them accordingly.
|
|
|
|
|
I feel you can use the MSMQ of Microsoft.. to log into it.. (From the webservice)..Now write a bunch of message handlers..(exes /windows service) that keep pulling out messages from the queue and write into DB..
This might work.
<hr>
Visit me:
http:
When you know something.. its meant to share with others :-) for otherwise that knowledge has no worth:-)
mail me:
aravinthan@rediffmail.com
<hr>
|
|
|
|
|
I've tried using the Register property of a deployment project, it works fine for COM components, but for Assemblies, I've tried vsdraCOM and vsdraCOMRelativePath, neither seems to do anything. No tlb file is generated, and no entry in OleView. I've tried registering through Custom Action, but the problem is in Uninstall, you can't use custom action because the dll's are deleted before any custom action is run which could unregasm. Has anyone dealt w/installing assemblies needing to be regasmed?
|
|
|
|
|
CybrWeez wrote:
I've tried vsdraCOM and vsdraCOMRelativePath
These two settings only do any magic if the assembly is designed to work through a CCW (Com Callable Wrapper). Basically, if you have designed your assembly to be a <gasp> COM component.
I have used these settings with success. I found a great .NET pdf library that I needed to use in VB6, so I wrote a wrapper object that looked like the VB6 printer object. Using attributes to control the visibility of my properties and methods, then using CCW to expose the object to the COM world. Worked great.
In the project properties of your source project (Not the deployment project), check the "Register for COM interop" to get the TBL built, etc.
Also, using the various attibutes can make your assembly look much better to those COM eyes...
<br />
Imports System.Runtime.InteropServices<br />
<br />
' Expose this object as a COM object<br />
<ClassInterface(ClassInterfaceType.AutoDual), Guid("07C9F63C-4776-49d1-9D12-BB0AF62FC6F2")> _<br />
Public Class PDFPrinter<br />
' Content Goes Here<br />
End Class<br />
Then, in the deployment project...
[cPDFWriter.tbl]
Register=vsdrfCOM
[cPDFPrinter.dll]
Register=vsdrfCOM
|
|
|
|
|
Anyone been able to do this?
I can do it, but I cannot connect to the solution file form a remote machine (get told that the solution file is invalid).
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
Webservice NOT in wwwroot..
Well, I have never made a webservice that WAS in the wwwroot. By defualt VS.NET puts it in a sub-folder. Is there a typo in your question?
Paul Watson Bluegrass Cape Town, South Africa
Robert Edward Caldecott wrote:
My father-in-law calls yer man bits "weasels"
|
|
|
|
|
That's really what I meant
I wanted to run 2 web sites on one bok so I set up another root folder named 'webroot' and set up all the host headers and stuff for it that way.
I even assigned another IP address to my NIC and set up an entry in DNS to point there, then bound that site ot that IP address.
Every time I try to use VS.NET to open a site in a sub folder of the second root folder I am toild that I can't.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
Ray Cassick wrote:
I wanted to run 2 web sites on one bok so I set up another root folder named 'webroot' and set up all the host headers and stuff for it that way.
Perhaps reinstall the .NET fx, only takes a few minutes.
<a TITLE="See my user info" href=http:
|
|
|
|
|
Hello,
"generic error occurred in GDI+. at System.Drawing.Bitmap.GetHbitmap(Color background)
at System.Drawing.Bitmap.GetHbitmap()
at MyAssembly.Engine.Resources.GetPatternHBitmap(Int32 patternId)"
Does anyone know what this error means?
More info:
My method GetPatternHBitmap() gets a Bitmap from my resource assembly:
<br />
Bitmap b = GetPatternBitmap(patternId); <br />
Then, the error occurs at
<br />
IntPtr ip = b.GetHbitmap();<br />
TIA.
|
|
|
|
|
|
I have a server service running, and i want to IPC using a server activated singleton. How can I give the remoting object acces to the data in my server ? My server process runs all the time ? I just cannot see how to do this
Can anyone help ?
Thanks
Hmmm
|
|
|
|
|
on server side:
HttpChannel chnl = new HttpChannel(port_number);
ChannelServices.RegisterChannel(chnl);
RemotingConfiguration.RegisterWellKnownServiceType
(typeof(remote_object_class),
URI_used_by_client,
WellKnownObjectMode.Singleton);
on client side:
ChannelServices.RegisterChannel(new HttChannel());
remote_object_class obj = (remote_object_class)Activator.GetObject
(typeof(remote_object_class),
"http://localhost:port_number/URI_used_by_client");
Good coding is to put configuration of channels and remote objects in config files: you won't have to change the source code if you'll change configuration.
|
|
|
|
|
I have the remoting working, but how does the remote object that is registered by my service get data from that service.?
Confused Again
|
|
|
|
|
In your example obj is on the client side not the server, the remote object needs data from the server
Non-Guru
|
|
|
|
|
how does the server (my app ) know the server object has been created, does the server have access to this object ?
DOesn't the the initial creation of the remote object not happen until the first client connects ?
|
|
|
|
|
Im not sure we are talking about the same thing thanks for your time
I have a service running that monitors a machine tool. this runs forever. form this service i created a well known singleton from the server , and my client connects to this ok, but how do I get data from the service through the remote object to the client. I don't see how to link the service application and the remote object that the service registered.
.Confused
|
|
|
|
|
so the object will not be created until accessed ? hmmm
in .reflection .Confused
|
|
|
|