|
hehe. Bad hey? The worst for me is when the registry data changes between debugs, and you think "why is it not working!???!".
All your source are belong to us!
|
|
|
|
|
You will find lots of useful .Net material in this site
Visit this site
http://www.dotnetguide.co.nr
|
|
|
|
|
Amazing! I clicked on the "Source Code" link at the site which took me to a page whose first link was CodeProject.
I think it's more efficient to just stay where I am.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
What an utterly useless site!!
Every link I click on is obliterated by Google Ads.
Have I mentioned how much I hate Google Ads? They make your site look cheap and cluttered...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
I'm sure if you printed it out there would be other content:
The URL at the bottom of the page!
|
|
|
|
|
Hi ,
I have a problem with getting content of a word, excel ,pdf document to be displayed as a report. The path of the file is stored in the database (sql server 2000 in my case) . I want the to get the path and show the contents of the file as a report ...this because i don't want to allow users to modify the contents of the file...can this be done with crystal reports or any other tool?
My application is in VB.Net...
Please help me with any information about this...
Thanks in anticipation..
|
|
|
|
|
No, you cannot. However, I have developer a Viewer control which views any file type that the OS can view. This was mostly done by using a webbrowser control and hooking into different events. Now, it IS possible to handle specific events and get the type of object that is being loaded into the browser. Using this, you could write another layer to your code that can handle the multiple versions of MS Office which could stop a user from modifying a Document. For PDFs it doesn't really matter, only about 5% - 10% of employees actually have a full version of Acrobat where they could actually manipulate a PDF.
I cannot go into futher details because my code belongs to my company and I cannot distribute it. But the webbrowser will be your best bet. In .NET 2005, the webbrowser has been fully overhauled to be .NET friendly.
|
|
|
|
|
i need a program in .Net using API's which can give system information like memory status(usage), processor status(% of cpu utilization)etc.....
-- modified at 5:43 Thursday 4th May, 2006
|
|
|
|
|
|
System.Diagnostics.PerformanceCounter class has access to all performance counters on NT based systems. Supports for CPU and memory usage and a lot more. Check it.
AISAC - An Intelligent Sense of A Computer
http://aisac.wordpress.com
|
|
|
|
|
Hello:
I have used Omar Al Zabir's article Implement a Microsoft Word-like Object Model for Your .NET Framework Application[^] as the basis for several applications I have written now, partially because it made for a solid basis for developing Smart Client applications, but also as a means to learn some of the more advanced capabilities contained in the article Developing next generation Smart Clients using .NET 2.0 working with existing .NET 1.1 SOA based XML Web Services[^].
Where does one start when discussing this great framework? Everything about it is elegant, in addition to the fact that it provides a soup-to-nuts complete Enterprise application infrastructure including data access layer using .netTiers templates, a custom enhanced Business Layer facade, secure access to the services in the smart client, elegant implementation of the 'command' and 'mvc' patterns in the smart client, attractive user interface, etc.. That being said, as far as I can tell, the only competitor to this framework is the CompositeUI Application.
My question is this: Have any other developers evaluated both of these architectures, and if so, what reasons have you chosen to use CompositeUI or SmartInstitute?
|
|
|
|
|
Personally, I think the Composite UI App Block sucks! I've studied it intensely fro 6 months and MAYBE after about 6 months of studying, you MIGHT be able to put a project together. There is just way to much to grasp.
One of our requirements at my company is to make a Framework that all projects can be built from. I would NEVER base this framework off of the Composite UI! I would be training developers for years! I understand that MS must make App Blocks which work for all cases and all scenarios. However, most of their naming conventions and the way they've put things together could have been done so much better and cleaner!
One thing in particular is developing Plugins. If you use the Composite UI, not only will your Plugin need to know everything about the Host, but you Host also needs to know everything about your Plugin!!! Decoupled model my a$$!
|
|
|
|
|
Before you think this is just another "How do I...?" please read. I DO NOT need to know how to do async operations. Here's my scenario...
I am performing Async callbacks on a Form to retrieve data on a seperate thread. I am using Delegates not Threads. First, I am not simply calling one Query and Oh, we're done. I kick off about 7 different delegates to load data from different sources. I am using "SyncLocks" or "lock" in C# with different Lock objects per data I am retrieving. One thing that is happening now is that users are CLOSING my form while data is still loading. Obviously, this causes numerous errors because the Callbacks do not have a UI thread to go back to.
My question is, how can I cancel an Async operation or gracefully exit running one?
|
|
|
|
|
Since executing a delegate asynchronously means that the target method executes on a thread from the CLR's thread pool, you will not have fine-grain control over the worker thread. If you need the ability to manipulate the worker thread you should explicitly create it.
Josh
|
|
|
|
|
Hi,
My apllication gives error when I try to open the oledb connection. "CreateActCtxW could not be located in the dynamic link library KERNEL32". This windows app is running on windows server 2000. But if I run on my client machine on Win XP, it runs fine. I am using com object for excel 9.0.
Can anyone please help ??
Thanks a lot!
|
|
|
|
|
Is the com object for excel 9.0 registered on the 2000 machine?
|
|
|
|
|
Yes, I belive so, otherwise I should have got the error that excel not registered error. I am using the COM interop for excel, Interop.Excel.dll
How do I find out if the COM is registered.
Thanks!!
|
|
|
|
|
I should have asked the question a little better. Is Excel installed on the windows 2000 server? If not this is your problem. If so what version? My guess is that the version's are different and the COM compenents support different methods.
I had this problem once a long time ago with VB6 and different versions of office installed on the clients machines, but I cannot remember the specific error message
Mike Lasseter
|
|
|
|
|
Thanks for your reply, I will look into the version.
Otherwise, excel is intalled on the server machine.
|
|
|
|
|
I tried the VB.NET forum, but maybe that was the wrong forum.
What I need to do is check what rights that the current authenticated user has
on a given file or directory. If the code needs to create a directory(sub-folder)
does the current user have Create rights. If the current user needs to write in a directory
do they have the Write permissions.
I have tried several renditions of the following which is from the Microsoft
Help section. This code seems add the access rule even when I don't have the rights
do this
TRY
Dim dInfo As New DirectoryInfo(FileName)
Dim dSecurity As DirectorySecurity = dInfo.GetAccessControl()
dSecurity.AddAccessRule(New FileSystemAccessRule(Account, Rights, ControlType))
dInfo.SetAccessControl(dSecurity)
CATCH
END TRY
|
|
|
|
|
Hi,
Dotnet Security is huge topic. I can just point you to the resource as such. Here is a good article.
http://www.codeproject.com/dotnet/UB_CAS_NET.asp
Permissions are based not only On Identity of User but also based on identity of code. So, If you want to give your code some permission You must assign certain Evidence to it which will be used to calculate Permission grantset during Policy Resolution. After all this Final Hurdle still remains. You OS should allow to write into that perticular directory.
Just try to make a custom permission which will allow you to write in directory and assign it to code. For that you need to run Mscorcfg.msc from VS Command prompt or run it from .net Framework 2.0 configuration from Administrative tools.
|
|
|
|
|
Well I did read the entire article and saw what was happening.
From everything I saw unless I was not doing it exactly, is that
one way to do what I want to do was to Create a permission set, then
add the appropriate rights to that permission set and then do a Permission
Set DEMAND on it. From his example though it seemed that if He wanted to then
check for Create rights he still had to go through the trouble of creating a
FileStream Object to see if he really had the rights to do the operation.
I have tried the following. Even if I have only Read access only to XPath that this code works
all the time, I can never generate a SecurityException Error.
TRY
DIM DirectoryName AS STRING = XPath
DIM PS As New PermissionSet(PermissionState.None)
PS.AddPermission(New FileIOPermission(FileIOPermissionAccess.Write, PATH.GetFullPath(XPath)))
PS.Demand()
RETURN TRUE
CATCH EX AS SecurityException
RETURN FALSE
CATCH EX As Exception
RETURN FALSE
END TRY
I also created a codegroup, and a permissionset using the .NET 2.0 configurator. That gives
unrestricted access to the Security, UIPermission, and the FileIOPermission objects. I just
want to tell if my current user can create in a given directory, or if they can read from a
given directory etc. Any further ideas as to why I cannot trap an error above?
|
|
|
|
|
Hi,
Sorry for late reply. I found that there is a class called DirectorySecurity. I think this is what you need.
http://msdn2.microsoft.com/en-US/library/system.security.accesscontrol.directorysecurity.aspx
You might know this, But this is just to remind that Demand() method just to perform Stack walk. That is used just to prevent the Elevation of Priviledge. When your method call some function in some other dll. So, That DLL may check your DLL by creating a instance of requested permission and compare it agaist all the methods in the call stack.
According to MSDN, If the Parent Directory is Readonly then when you try to create a directory in that it will give an exception. Here are the more cases when Exception is thrown. Just check if your directory is readonly??
I've played a lot with policy files, Because I am studying .NET security course at my school. And I suggest you can do the same if you want. But, Instead you can create a new permission file under user group and do not assign any permission to it except execution. Now you can create a code group and assign this permission only as a permission set. You also need to select two checkboxes from General tab. This will prevent any access to be given to the All_Code when this condition is met. Otherwise, Permission will be granted based on Union of all code groups at each policy level + intersection of all policy level.
|
|
|
|
|
How can I make the items in the report to have alternating gridlines?
e.g.
first line
second line
third line
fourth line
The lines with the strike trough should have a light grey background colour, and the other lines must have a white background colour.
Thanks
Cornelis
|
|
|
|