|
Hi,
I'm new to this forum but have yet a question :
is it possible to get the whole type description of a class at runtime ?
I can get the name with the .GetType but I also want to know all his property's, method's and attributes (fields)
is this possible ?
greetings ,
Tim
|
|
|
|
|
Sure, just take a look at the System.Reflection namespace.
Regards,
mav
|
|
|
|
|
hi there
i have a pro
i made a report whit the crystal reports engen
when i want to see the report ill get a LogIn Form
i dont know what to type in the Login fileds
maybe someone can help my
my database in Oledb (Accses)
i am in C#
--------------------------------------------
the fileds in the LogIn Scrren are :
Server Name :
DataBase :
Login ID :
Password :
what do i need to write in does fileds ?
thanks to all Helpers ...
|
|
|
|
|
You have many ways to solve this issue by Crystal.engine library using the setlogininfo, or the simplest way: reset sa database password to blank and then screen will never pops up, enjoy it....
|
|
|
|
|
Hi,
I'm looking for a way to implement a network based mutex. For example, if one application on a LAN called Mutex.WaitOne() and got the mutex then all of the other applications using the network mutex would have to wait.
Is there anything out there that does this kind of thing? Something simple if possible
Thanks!
Cheers,
Chris
Smarten Up Your Assets...
www.identecsolutions.com
|
|
|
|
|
To implement such a thing like a mutex without direct operating system support (and as far as I know there is no such thing as a network-wide mutex in windows) you need an atomic operation that cannot be interrupted by any computer in the network.
Traditionally, a lock file was used to perform such a mutual exclusion.
The client trying to aquire the mutex tries to create a file on a common path.
If the file can be created then the client holds the mutex as long as he doesn't delete the lock file and for all the other client the creation of the file will fail, since it already exists.
Might not be failsafe in every constellation but usually works well enough.
mav
|
|
|
|
|
Thanks for the idea.
Unfortunately this won't be fast enough for what we are trying to do.
-Chris
|
|
|
|
|
Why not just implement a request/fulfill operation with a singleton remoted object? I have a distributed application that assigns jobs to multiple computers based on their availability and their CPU usage. They communicate with a master system, and ask for resources, the master computer returns a name of a "free" computer on the network, or a NULL if none are available. You could use the same concept...
Why not make a request server that tracks an availability status? If unavailable, return a FALSE. If available, set the availability immediately to unavailable (to prevent returning available status to multiple clients during subsequest calls) and return a TRUE. When finished with the "mutex", call a second method which resets the availability to available.
This would be even easier to track with a web service than a remoting object, but both would get the job done.
- Jeromy
|
|
|
|
|
I want to connect to a webpage and get it's HTML source (like ASPTear). The problem is, the page requires a login. You first have login at login.asp page and after that it redirects you to main.asp and that's the page I want. Login page uses a form based authentication, so I _think_ this can be done with a WebRequest using cookies. What should I do? Can you give me any ideas please?
|
|
|
|
|
Assign a new CookieContainer to HttpWebRequest.CookieContainer and add a Cookie instance with the login data in the cookie returned by the web site. Do this before calling HttpWebRequest.GetResponse .
There are many ways of finding out the cookie's key/value pairs. One easy way is to use Mozilla Firefox and, after logging in, right click on the page and select Page Info. One of those tabs will show you current cookie values, IIRC.
Depending on how the site implements authentication, this cookie could be preserved for quite some time.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Can somebody please tell me if it is possible to add some dlls to my setup project of my application (some graphic application), dlls like gdiplus.dll, so that the setup program will not check for the existence of the .net framework on the client machine - that is : it should run without it installed . the problem is that my application has 1.5 mb and including dotnetfx makes it over 25 mb.
thanks in advance, Bogdan
|
|
|
|
|
Sorry, can't do.
I believe you can compile your .Net application with the framework (necessary assemblies) embedded in it with Mono but I'm not sure.
Carl
|
|
|
|
|
Hi
Your concern is right. But to make the .NET independent of platform Microsoft has made it mandatory that if the client does not have the .NET platform but he wants to run .NET application then he has to have .net framework in it which you can download from Microsoft site.
So there is no other way to make your app run on client machine.
(This is same as having the Java JRE for Java app to run)
Hope you will get the point.
Naveen
|
|
|
|
|
ok, I understand it is not possible, but can I use the functions in gdiplus.dll and not use the whole .net framework? like include the gdiplus.dll in my source code and in my setup program for my application... is this the solution?
|
|
|
|
|
Yes sure, you can use the gdiplus.dll in your apllication.
No need of using whole of the .NET framework
Naveen
|
|
|
|
|
You're sure?
I'd rather doubt that Microsoft's license agreement allows you to rip apart the framework and distribute parts of it on your own...
mav
|
|
|
|
|
what im wondering is if there is a smaller version of the framework redistributable the one i found is 23698 KB
i mean thats just crazy for the ppl that are on a 56k hookup to have to DL that big of a file to run programs that were created in the .net framework
|
|
|
|
|
No, there is no such thing as a "micro .NET" doing everything the framework does but at 1/10th the size
There's no way around installing the framework on a client machine at least once. Newer windows versions already have .NET preinstalled, so in the future this will not be such a big point.
If you're only targetting people who have to download everything over a 56k modem then perhaps you should really opt for a different platform. Or make an ASP.NET application, so that you can use the advantages of .NET on the server side and your clients only need a browser.
mav
|
|
|
|
|
naw 56kers are not my main target i just tend to think of the ppl that dont have cable or dsl, I remember DLing a 24MB prog on 56k....it took forever
thanks for the info
|
|
|
|
|
Hi everybody,
I have a simple question but no answers to this...
On a C# client, I have 2 threads running: one for GUI and another one created for webservice synchronous calls.
When I click a button, I call 'SoapHttpClientProtocol.Abort()' on the GUI thread.
It then should abort a lengthy call (blocked) on a the worker thread and release the latter.
But it doesn't...
WHat's wrong!??!?
Thanks in advance!
|
|
|
|
|
Hi,
A client just sent me an obscure exception stacktrace that he got.
My guess is that it's a "one shot" exception (won't happen again) but still, I'd like to know what's going on. It doesn't even seem to have to do with my code.
How can I prevent such exceptions (I receive obscure exceptions like that once in a while)
Thanks!
Carl
Message: Object reference not set to an instance of an object.
Source: System.Windows.Forms/UnsafeNativeMethods.CallWindowProc
StackTrace: at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
at System.Windows.Forms.Control.DefWndProc(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ComboBox.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
OS Name: Microsoft Windows XP Professional|D:\WINDOWS|\Device\Harddisk0\Partition2
OS Version: Microsoft Windows NT 5.1.2600.0 System Type: X86-based PC Total Physical Memory: 535281664 Free Physical Memory: 262164 Windows Directory: D:\WINDOWS
|
|
|
|
|
Hi
i would like to explain a situation where this type of error might occur. In a windows form having a toolbar icon, place the cursor on any of the icons in the toolbar and try to do any other operation using the keyboard (may be by pressing the hot key combination). In these type of scenarios such error occurs... because when you have placed the cursor on the icon tooltip is being displayed and when u try to invoke any other procedure u get this error.
|
|
|
|
|
Any way to prevent this exception?
|
|
|
|
|
Hi Everybody
Im having a problem...
How can i install my assembly in my client machine which doesnt have the .NET framework.Actually i want to install my assembly in the client machine in the GAC so that the new version of the assembly can placed and used without any problem.
To install .NET framework in the client machine i have the dotnetfx.exe which will install the .NET framework in the client machine.
But how can i install my assembly in GAC there..
Any pointer ,any idea please let me know
Thanx a lot in advance
Naveen
|
|
|
|
|
Hi,
Open the Setup Project and then follow the below given steps:
Installing an Assembly to the Global Assembly Cache upon Installation
You can use the File System Editor to install an assembly to the Global Assembly Cache upon installation. To do so, the assembly must be incorporated in the setup project as a loose file and not compressed with the other project output. To install the assembly to the Global Assembly Cache, you must first sign your assembly with a strong name. Once your assembly has been strongly named, all you need to do is add a Global Assembly Cache folder to the File System Editor and add your assembly to that folder. Upon installation, your assembly will be added to the Global Assembly Cache.
To install an assembly to the Global Assembly Cache on installation
Sign your assembly with a strong name.
After creating your setup project, open the File System Editor.
Right-click the left pane and choose Add Special Folder. In the shortcut menu, choose the Global Assembly Cache Folder.
In the left pane, right-click the Global Assembly Cache Folder. Choose Add, and then choose Assembly from the shortcut menu. Choose the appropriate assembly or browse to its location and click OK to add the assembly.
The assembly will be added to the Global Assembly Cache upon installation. If the assembly was not already a part of your setup project, it is added to it.
Regards,
Sukesh.
Sukesh.g
|
|
|
|