|
It may be possible, but that is not what servers do; it's poor design.
|
|
|
|
|
Hi,
Please help me regarding a doubt. i have a .xml file which is having around 3000 nodes, now I want to retrieve the name attribute of those nodes for which store attribute>30. Please suggest the esaiest way to do it.
Thanks,
Inder....
|
|
|
|
|
Hi All,
How can we determine if a user-certificate is contained in a smartcard or if it is installed in the system itself?
I wasn't able to find a .NET class that does this?
Thanks in advance...
Sunil
|
|
|
|
|
There is no inbuilt class for smart card in .net ,
you have to use winscard.dll wrapper .
go through the below link in CP
A Smart Card Framework for .NET[^]
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
As much as i know even if a certificate comes in a card then also it has to be installed in your personal store.
While reading the cetificate you need to insert the smart token in order to execute ComputeSignature . And if you set the silent parameter to false while using ComputeSignature it will automatically reads the card and asks for password for the certificate (if any).
|
|
|
|
|
Hi all
Your help\opinion is required on a bothering subject I am debating with for a long time...
Tools: .NET 2.0, VS2005. C#
The story:
I am designing a platform that uses plugins (written by her users) and does something with them.
The plugins are mainly dll file(s) that implement some declared interface.
My platform architecture is as such:
The platform sits at certain directory (say c:\PlatformBin).
The plugins sits in user defined location (say c:\UserPlugins)
Upon starting the platform, it accepts at run time (registry key) the plugins directory, traverse and instantiate all plugins resides there.
The problem:
User plugin is eventually a dll, that implements given interface (say UserPluginDll.dll). This dll can use, if\as needed, other external dll's that needs to be in the same directory. (say User3rdPartyDll.dll)
When the platform loads the plugins, it explicitly loads the UserPluginDll.dll file (through Assembly.LoadFile(UserPluginDll.dll);). This works fine.
The problem happens when the platform actually access at runtime to the user code in the plugin, that uses the user 3rd party dll (User3rdPartyDll.dll)
The CLR can't find the relevant User3rdPartyDll.dll file and raises up an exception "file not found...").
The suggested solutions:
Here are some tricks and solutions that I have tried\disqualified:
1. Use GAC (not an option)
2. Add to the appDomain private bin path for the c:\UserPlugins directory (and its subdirectories) - not working since private bin path (and other similar tricks) is always relatively to the app bin path (c:\PlatformBin), and I don't want to create this unnecessary coupling between the users plugins directory and the platform bin directory
3. Use <Probing> element in application config file - not good (and not working as well from some reason), since the plugins directory is learnt at runtime and I don't want the user to go and edit the app config file and change the plugins directory there.
4. Use AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve method, that is raised exactly when the CLR fails to locate the necessary dll.
Summary and question:
I think I will use this forth option eventually, but it also demonstrates a compromise from my side, as it means that the CLR first have to fail and then request my help (at runtime), instead of automatically allows me to tell him at the very first beginning were else he needs to search for its missing dlls at runtime.
I would have expect that CLR will allow me to add additional search paths for searching dll's at runtime, and it drives me crazy that I can't do so !!!
Any one can help ? have other suggestions ?
-- Modified Tuesday, October 5, 2010 3:32 AM
|
|
|
|
|
Member 3941620 wrote: CLR first have to fail and then request my help
Programming by error - I love it.
Isn't there a reference path in there somewhere, maybe that can be set in the userdll.dll at runtime.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi
The solution can't come from the user code side, since the problems occures before actually access him.
In addition, I don't want to force\expect the user to be aware of my (CLR) limitations and have hime handle some technical issues, not directly relating to its domain\knowladge
If, from the other hand, you are aware of an option that allows to define the assembly, upon loading, other assemblies to load when needed - that can certainly be done from my side (the platform) and I will be happy to be notified about such an option...
Thanks
Shultz
|
|
|
|
|
An assembly has a GetReferencedAssemblies() method. Have you tried that? E.g.
string assemblyName = "c:\\UserPlugins\\UserPluginDll.dll";
string assemblyPath = System.IO.Path.GetDirectoryName(assemblyName);
Assembly assembly = Assembly.LoadFrom(assemblyName);
AssemblyName[] referenced = assembly.GetReferencedAssemblies();
List<Assembly> assemblies = new List<Assembly>();
foreach (AssemblyName an in referenced)
{
string extra = System.IO.Path.Combine(assemblyPath, an.Name + ".dll");
if (System.IO.File.Exists(extra))
{
Assembly tmpAssembly = Assembly.LoadFrom(System.IO.Path.Combine(assemblyPath, an.Name + ".dll"));
assemblies.Add(tmpAssembly);
}
}
|
|
|
|
|
Hi
I wasn't aware of that option and I will certainly test it today (when I will get back home),
I believe though, that it won't work, as the CLR can't realize that the missing assembly at runtime that he searches, has actually been loaded before, and lies at my private 'assemblies' list declared somewhere... ,Unless you can tell of a way that connects my local 'assemblies' list to the ones that CLR is aware of ?
(that is my assumption according to other threads that I have read in the subject and implied that issue..).
I will report once I will try it.
Thanks
Shultz
|
|
|
|
|
I haven't run into that problem, so I'm not sure it exists.
|
|
|
|
|
Be sure. It exists.
CLR doesn't know to search for your dynamically referenced dlls at runtime, unless they appear in its default search paths and probing dirs.
The main question in this thread is how to add him some more search directories to look at...
|
|
|
|
|
Write a little app that demonstrates what you think is a problem.
|
|
|
|
|
Any one have simple code that will determine whether the web page has fully loaded?
Can be any browser.
|
|
|
|
|
There is java script window.onload.
rahul
|
|
|
|
|
|
I need a program that run in the back end console then when the webpage is done loading then it will call another method.
|
|
|
|
|
Without hooking into the browser, you can't determine what's going on there directly from an external application. You were told this yesterday.
|
|
|
|
|
I thought for a minute this was a school question but I see it is the same OP. At least you managed to get him thinking. I still think you were too gentle, this feels malicious to me.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
It also feels malicious to me which is one reason why I'm not going to write code out for him.
|
|
|
|
|
I have successfully logined into a web page, the background management in this page contains multiple pages and per page has its own corresponding URL, I want the information of one page collected in the process. When I get the page URL, but it's the source of information and data display,and when I use HTML tags to preview display only a page frame, information are not displayed, but in the browser open the URL can display properly. How do I get this page?
|
|
|
|
|
I don't really understand what you want, or what your problem is. If I do understand you correctly, you want to get the source of a certain url. You can perform a webrequest
WebRequest wrFetch = WebRequest.Create("http://www.google.com");
The webrequest contains a response object which will contain the source of the webpage called.
|
|
|
|
|
Hi,
Maybe I was not expressing a very clear, but thank you for your support, you give a good idea!
|
|
|
|
|
Does anyone know how to go about adding your own .Empty property as in String.Empty?
N.B. I should mention its currently a struct!
Definitely a PEBCAK! (Problem Exists Between Keyboard And Chair)<br><a href="http://www.fruitbatinshades.com" target="_blank">www.FruitBatInShades.com</a></br>
|
|
|
|
|
Make it static?
public static MyClass Empty { get { return new MyClass(); } }
|
|
|
|