|
Hi all.
I have a little problem and I can't solve it myself already 2 days.
I have an ASP.NET web application, it has static reference to an datamining assembly which collect some data. DataMiner loads some drivers using simple factory
DriverController's (Factory) static method LOADDRIVER:
<br />
private static IDriver m_driver;<br />
Assembly Driver = Assembly.LoadFrom(m_driverInfo.FullPath + m_driverInfo.FileName);<br />
m_driver = (IDriver) Driver.CreateInstance(m_driverInfo.TypeName);<br />
return m_driver;<br />
than, DataMiner works with driver by invoking its method
<br />
public double GetMetric(string MetricName, params Object[] args)<br />
{<br />
return (double) this.GetType().GetProperty(MetricName).GetValue(this, System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Default, null, null, System.Globalization.CultureInfo.CurrentCulture);<br />
}<br />
Driver has properties named accordingly metric names. This properties invoke remote web service's methods for getting values.
When i have simple winform application instead of webapplication - all works, but in case of web application any of Driver's properties fails on remote web service's method invoke with InvalidOperationException (message: There was an error generating the XML document.) --> Inner exception: InvalidCastException (message: Specified cast is not valid.)
Stack Trace:
at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle)
at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Serialize(SoapClientMessage message)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at TTServerService.ttsoapcgi.getRecordListForTable(Int64 cookie, String tablename, String filtername, CTableColumn[] columnlist) in ***
at TTDriver711.GetTotalDefectsCount() in ***
Has somebody any ideas?
Thanks very mach in advance for any helpful information.
Regards, Andrew Vaverchak.
-- modified at 13:40 Monday 6th February, 2006
|
|
|
|
|
Hi,
Has anyone (or know of someone) ever done the Smart Client app that has functionality similar to Outlook 2003? Any information is great appreciated.
Thanks,
Daniel
|
|
|
|
|
Hello...
How can I make a program to convert from one extension to another??
for example from .mp3 to .wav or ram and vice versa..
Database85
|
|
|
|
|
Get the specifications for each format and work out what you need to do to convert the data from one to the other. The other option is to buy in a pre-built API or look at open source projects that already do this. For example there is already an open source project called LAME that provides code for converting in to and out of MP3 format.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
what is the use of JIT complier in .Net Framework
sowjanyakumar
|
|
|
|
|
It compiles the MSIL code in your .EXE's into native processor code just before it's needed. The JIT is also heavily used by the Visual Studio IDE to help out with Intellisense, code completion, Immediate mode in the command window, and a bunch of other things.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi.
Well, the subject says it all. Where do I enter the account user\password which is different than the account I'm loged onto in the local computer.
(I set up all the requierments regarding debuging group as stated in various help files I found)
tnx.
Gilad.
|
|
|
|
|
I need to find a way to end an asynchronous call without letting the callback function run.
The call is a networkStream.beginRead, and I need to stop the object from reading the networkstream, without closing the connection.
Any ideas?
|
|
|
|
|
Could you get us into context here?
I have no clue WHY you want to do that, HOW your application is structured and WHAT the prerequisites of the network connection are, so I have no idea where I should start.
I am no native speaker, so I might be missing something obvious. In that case: Sorry. My bad.
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
m using .net framework 2. and compling my c# project using nant(new version). but while creating msdn like help(using ndoc task in nant build file), m not getting the description at all. can anybody tell me the reason. Thanks in advance...
pooja
|
|
|
|
|
Start by checking if the description is present in the xml file, to determine if it's the compilation or the documentation creation that fails.
---
b { font-weight: normal; }
|
|
|
|
|
First of all thanks for ur reply. Yes,Description is present in the generated xmls.(From description I mean the comments written in the various tags eg. ,<param /> etc...). These comments are not there in MSDN like help..
pooja
|
|
|
|
|
Well, NDoc does not officially work with .NET 2.0 yet so you could expect problems.
Kevin
|
|
|
|
|
Hi,
Im new to codeproject, I was hoping to get some help. Im tryin to convert the Image into Byte stream and send it to MySQL database. (Hence, so I can send image to database)
MemoryStream^ mst = gcnew MemoryStream();
viewPictureBox->Image->Save(mst,viewPictureBox->Image->RawFormat);
Byte BinaryImg[] = mst->GetBuffer(); <- doesnt like this line
MySqlCommand^ cmd = gcnew MySqlCommand("SELECT * FROM Patient", Mycon);
cmd = gcnew MySqlCommand("INSERT INTO patient(Leftimage) VALUES" + "('"+viewPictureBox+"')", Mycon);
I get the following error:
c:\documents and settings\hasan bajis\desktop\lei_patient_new\lei_patient\lei_patient\Form1.h(1230) : error C2440: 'initializing' : cannot convert from 'cli::array ^' to 'unsigned char []'
Im using MC++.
Can someone plz give me hand.
thanks alot in advance
hbjs
makaveli
makaveli
|
|
|
|
|
The trouble you have is that using managed C++ means you have two different memory models, AKA MC++ is gay. If you must do this, then you need to convert the data, probably using Marshall::something. Nish would be a better person to ask, and the C++/CLI forum a better place to get his attention.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks mate,
Ill post it tehre
makaveli
|
|
|
|
|
I'm looking for a way to capture information regarding the movements of windows belonging to an application outside my own. I'm working in C#.
My situation, in brief: I have a window-management tool which takes windows created by another application and sizes/positions them on the desktop based on a user's pre-defined preferences. I currently achieve this via a timer-based loop which reads top-level windows through Windows API calls.
Instead of this, I would like to monitor the windows message queues to note windows position changes; eventually, I would also like to monitor creation and destruction of windows, but I'll start with reading movement.
The trouble is that while there are many guides for writing local hooks, there are few for global hooks -- and the global hooks are mostly about capturing mouse and keyboard.
I know the target window handles; I believe I want to create Local hooks into specific threads (outside my application.) These will involve the same memory-context problems as global hooks, and I suspect I will need a .DLL with the hook handling code. I am unsure how to achieve this in VS 2005 and
C#; it seems I'm forced to use some compiled C code? Is that correct?
If anyone can offer advice or good references, it would be greatly appreciated. . . or if someone with experience building .DLL's for handling hooks can lend a hand, I'd be thrilled.
Again, my entire application is built and works; I just want to get away from the inelegant solution of repeatedly checking all window placements to compare against the last known position; I'd really like to make the architecture event-driven.
Thanks in advance.
|
|
|
|
|
According to this[^] KB article, you can't write global hooks in C#, other than mouse and keyboard hooks. So I guess you're out of luck, you'd have to write in C++ or C.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I had come to that sad conclusion, too.
I can't bring myself to take up the unfamiliar task of writing a DLL export in C++ when the application already works. . . but I'm going to try to find a collaborator who will produce the necessary DLL as a joint project/article here on Code Project. I can tell exactly what information we need to capture and which hooks to use; we can have the DLL track the target window's action via hook, pass the information to the source .NET application via windows messages, and have the source application read the message via a local hook.
I think it would be a great demonstration project showing how to really put things together in a project. I'm going to draft out the plan and make some posts soliciting a partner sometime next week.
|
|
|
|
|
I`m going to develop an mp3 application for windows mobile 5 capable smartphones. So what are the softwares i need? and suggest me some good books and demo codes for that
dipankar
|
|
|
|
|
If you want to know about mappoint in mobile 5 operating system demo.May be i can help you
John
|
|
|
|
|
Hi,
In JAVA, a pair of public/private keys can be generated using KeyPairGenerator. Then the getEncoded() method of public key or private key can be called to encode the key into a standard representation before sending it to a some other party. I know private key is not supposed to be sent out to a third party but still it can be encoded in a standard format as specified by PKCS#8 by using PrivateKey.getEncoded().
In .NET, a pair of keys are generated internally by an instance of RSACryptoServiceProvider. If I want to achieve the same functionality as that of JAVA's [PublicKey|PrivateKey].getEncoded() for both private and public key, how to achieve it in .NET? For example, I should be able to encode the public key in a standard format as specified in X.509 format before sending it to a third party. Similarly for private key. Any example code illustrating the same will be extremely helpful.
Regards,
P.Prasad
|
|
|
|
|
I have an application that acts as a remoting server. The app has a front end with lots of controls, and the remoting is (as it must be) a class in a class library of its own, which is instantiated by the remoting system when a call is made by a remote client (as I understand it).
I want to be able to update stuff on the screen when a remote client calls a method in the server, but I can't work out how to communicate between the server object and the rest of the application. Can anyone tell me if this is possible and how it's done.
Dave
|
|
|
|
|
When you setup the remoting on the server side, instead of allowing the remoting infrastructure to create server objects, create them yourself and register it using RemotingServices.Marshal[^]. You could then expose events from those objects and subscribe to them from the GUI. Something like
class RObject: MarhsalByRefObject
{
event SomethingChangedDelegate SomethingChanged;
public void RemoteMethod()
{
SomethingChanged();
}
}
}
class GUI
{
void RegisterRemoteObjects()
{
RObject o = new RObject();
o.SomethingChanged += ...
RemotingServices.Marshal(...);
}
}
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Thanks Senthil. I eventually found a viable solution by getting the server class to post windows messages to the GUI. However, yours is an interesting alternative which I shall investigate. I need to understand some of these more advanced remoting techniques. Thanks.
Dave
|
|
|
|