|
CAS (Code Access Security) at work You need to increase the trust level for assemblies that load off the network drive. See this[^] link to know how to do that.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I am doing a design where there is a menu of actions that the user can perform. This isn't about the user interface part. It is about the logic part. I've got a 3-teir architecture going and there are classes in the business logic layer that define what actions are available at a particular time. But there is a problem. I've discovered that there are 3 types of action, although there are many more actions than this. Some actions are optional (the user can choose whether or not to take those actions), some actions are mandatory (the user must take that action before a certain point. Before that point they may choose certain other optional actions, but not others), finally, there are potential actions (these are actions that the user has potentially available to them, but they must satisfy some other condition first before they can take that action. Some of those potential actions are optional and some are mandatory).
So far I have an action class. I also have a potential action class, and a mandatory action. The potential action class contains a field which is an action object. The mandatory action class is an abstract base class. The actual actions derive from either the action itself, or the mandatory action class.
What I am trying to do is keep coupling to a minimum, but I'm having problems with it. I also have a controller class that contains a list of the actions, this list is passed to the user interface. They user gets to see all the actions. However, if they pick a potential action where the condition is not met they get a message telling them what they need to do in order to take that action. The action of the potential action is to generate the message.
I don't know if I'm explaining myself very well. I guess that is part of my problem. If I could explain it well, I would understand it enough not to need to ask the question.
Any ideas would be welcome.
|
|
|
|
|
Andy MacAngus wrote: I've got a 3-teir architecture going and there are classes in the business logic layer that define what actions are available at a particular time.
So the actions that are mandatory and optional change over time? For example, an action that is optional at one point in time can become mandatory later? Can you model this as a state machine? Each state is responsible for providing a list of actions that are mandatory, optional, etc.
|
|
|
|
|
Leslie Sanford wrote: So the actions that are mandatory and optional change over time? For example, an action that is optional at one point in time can become mandatory later?
Not exactly, but I think this is probably going in the right direction.
The states are:
* Optional
* Potential, but optional
* Mandatory
* Potential, but mandatory
Potential meaning that a certain condition must be met first. Any potential action can transition to plain optional or mandatory. Certain actions are, by necessity, potential while there is a mandatory action available as the condition to be met is the invokation of the mandatory action.
I will look in to state machines, but I have to admit to not having read much about them. I'll look for some information on it. If you know of a good article to read on the subject I'd be grateful for a recommendation.
Cheers.
|
|
|
|
|
Andy MacAngus wrote: The states are:
* Optional
* Potential, but optional
* Mandatory
* Potential, but mandatory
Potential meaning that a certain condition must be met first. Any potential action can transition to plain optional or mandatory. Certain actions are, by necessity, potential while there is a mandatory action available as the condition to be met is the invokation of the mandatory action.
What I was thinking is that you could have a list of all actions, maybe represent these actions as an enumeration. Your application has a number of discrete states. Each state understands which actions are optional, potential, etc. You could possibly store this information in some kind of lookup table.
Anyway, my point is to not look necessarily at the actions as states, but rather have states that know what actions are mandatory, optional, etc.
Also, if some actions are mandatory, you could have a state execute them regardless of whether the user has selected them. In your UI, you could make sure the right radio buttons, check boxes, or whatever are selected programmically (and maybe switch to readonly so they can't be deselected).
I could go on and on. Hope this has given you some ideas.
Andy MacAngus wrote: I will look in to state machines, but I have to admit to not having read much about them. I'll look for some information on it. If you know of a good article to read on the subject I'd be grateful for a recommendation.
You may find Part I[^] of my State Machine Toolkit articles helpful.
Here is an article[^] describing finite state machines and UML statecharts.
And an article[^] by H. S. Lahman. One of my personal heros and a regular on comp.object.
|
|
|
|
|
There is method called CopyTo(src_start,dst,dst_start, length) in class String. While dst is a Char or __wchar_t array. What will be the best way to Copy part of First String to another String? For example, String *Str=S"dirName/filename", I would like just take the file name so I start copy from 8 from Str to another Char dst[]. But dst is not String instance.
Any better ideal? Thanks
|
|
|
|
|
System.IO -> file.* has all proper methods to parse any string like this...
Mikail Çetinkaya . The C# DEveloper
|
|
|
|
|
Let me solve the problem by myself to see if it is correct
Char str1[]={' ', ' ',' ', ' ',' ', ' ',' ', ' ',};
String* str2 =S"Long String";
str2->CopyTo(5, str2, 0, 6);
String* fileName= __gc new String(str);
Then fileName will be "String"-- which is part if str2.
|
|
|
|
|
How can I either detect that the onscreen keyboard has popped up and resize/rearrange my form elements, or have the form autoresize when the keyboard is displayed.
Right now my input field is hidden underneath the keyboard.
Andreas
|
|
|
|
|
u can get the proper windows handles of all app windows that are loaded on desktop by a series of activeDesktop api functions; refer to this function 's owner api doc for details
Function GetForegroundWindow Lib "user32.dll" () As Long
Function GetDesktopWindow Lib "USER32" () As Long
Mikail Çetinkaya . The C# DEveloper
|
|
|
|
|
Dear all,
I am a University Student. I am doing research on Web Service. My Topic is sending SMS, Short Message Service From Within My PC. Now, I got a problem of sending SMS using .NET Framework. Could please anyone giving me some ideas or sending my some code sample????
Thank you in advanced.
CamMan
|
|
|
|
|
there are many articles about sms sending on code project ; they basically send sms through a computer connected(usb or bluetooth) cell phone by etsi standards.codes make use of serial communication apis; opening a com port to cell phone and using it like a modem(used not to call somewhere ; do not worry) with etsi ruled modem commands. Etsi is supported on all phones. But many libraries should be customized on a small bit. The date time usage of your country(important)
search codeproject for "etsi" or "send sms" i think u get the idea
Mikail Çetinkaya . The C# DEveloper
|
|
|
|
|
Is there a first class URL/URI object in the .Net framework or are they operated upon as string s? If it's the latter, is there a helper class that allows you to extract components of a URL (protocol, host, etc)? Thanks,
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
|
|
It is said that Assembly.Load is a Dynamic Reference. Can anyone explain why it is a Dynamic reference? Furthermore, could someone please explain to me what Static Reference and Dynamic Reference mean?
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
If you load something during the execution of your code its called dynamic referencing, as you only load it when you need it. Assembly.Load does this. This can be usefull if you need to load tons of references but don't need them all the time.
Static references are those that are loaded as soon as your application is started.
|
|
|
|
|
Thanks for the Info. Everything's falling into place now.
Oh.. And a Very Happy New Year to You....
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
Hi everyone. i've written Photo editor. Currently it is WindowsApp.
I need to put it on the site. It's done by putting original APP to the WinControl.
And that dll can be used on the site, like:
<object id="ImageEditor" classid="ImageEditor.dll#ImageEditor.ImageEditor">
The problem first big problem - is that i can't use unmanaged code, i needed to put some UnmanagedCode permissions.
I've made big changes to the logic of it - and it doesn't use unmanaged code no more.
Onve i've finished convertion app to Control, i found that new permissions should be given:
Request of the Permission of type
System.Security.Permissions.UIPermissions (details in the end)
This is done when i use mouse (clicking on the workspace), when i'm changing the font - it appears after the standard dialog is closed.
From this point i need to solve this problem somehow.
I've tried to put the AssemblyKeyFile - but when i do that, applet isn't loaded at all.
Somewhere i've read that client that will use this editor needs to put PublicKeyToken to his trusted keys - but i can't find where do i put that.
Have anybody got some ideas of how to handle that?
Thanks for help.
Details of exception
System.Security.SecurityException: Request for the permission of type System.Security.Permissions.UIPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
at System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet grantedSet, PermissionSet deniedSet, CodeAccessPermission demand, PermissionToken permToken)
at System.Security.CodeAccessSecurityEngine.Check(PermissionToken permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 checkFrames, Int32 unrestrictedOverride)
at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark)
at System.Security.CodeAccessPermission.Demand()
at System.Windows.Forms.Control.Focus()
at ImageEditor.ImageEditor.pFore_MouseDown(Object sender, MouseEventArgs e)
at System.Windows.Forms.Control.OnMouseDown(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.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)
|
|
|
|
|
on the browser computer you need to run a specific .net commandline command that can be gacutil(global assembly cache utility) with proper permissions and keyfiles specified. pls look at its usage on msdn
Mikail Çetinkaya . The C# DEveloper
|
|
|
|
|
the applet is not loaded to the GAC, it's loaded to some temporary internet cache.
gacutil /ldl - list all utils from downloaded chache.
i'm still wondering how to do that
|
|
|
|
|
i want to use for the standard button myown png images.
Using for the normal state one png, for the mousemove another and for mouse down another one too.
How?
|
|
|
|
|
How would one go about protecting controls from unlicensed use? I know that you can use imperitave security, but how still seems unclear.
If have a control, do I create a custom permission, and demand that permission on access to my control's interface. Then how do I guarantee that only my client is granted that permission?
The DJ's took pills to stay awake and play for seven days. - Jim Morrison, Black Polished Chrome.
|
|
|
|
|
Hi there,
I had been for over 3 days trying to solve this problem and I have no clue of what's wrong.
I'm trying to create a Dynamic DNS service using only one DNS Server (dns.firmaware.com), but created a second NS record (dns2.firmaware.com) with the same IP address.
First of all I've created a small app in VB .net that updates (using WMI) Microsoft DNS Server whenever an IP change was reported.
It creates different zones for each sub-domain and adds NS records, updates SOA record to change the TTL and MinimumTTL and finally adds/updates the A record.
I know that zone creation/update is working fine because I tested my VB .net several times and checked that Microsoft DNS entries were created/updated.
After checking all that I created a record like “test.gimmeall.com” and resolved it from my home PC. Using “ipconfig /displaydns” I checked that “test.gimmeall.com” had the following values:
localhost
----------------------------------------
Record data . . . . . : test.gimmeall.com
Record type . . . . . : 1
TTL . . . . . . . . . . . : 60
Data length. . . : 4
Section. . . . . . . . . . : Answer
A record (host) . . : 213.13.100.111
So, TTL was fine, if I changed test.gimmeall.com’s A record, after 60 seconds it would be updated, BUT that’s not happening because, after my update, when I ping the same host again it returns the same IP address and when I type “ipconfig /displaydns” it returns the following result:
----------------------------------------
Record data . . . . . : test.gimmeall.com
Record type . . . . . : 1
TTL . . . . . . . . . . . : 85823
Data length. . . : 4
Section. . . . . . . . . . : Answer
A record (host) . . : 213.13.100.111
It looks like that ISP or something else is caching “test.gimmeall.com” with invalid values, but it’s not an ISP problem because tried from different ISP companies and always had the same result.
Can you help me please?
I would be very thankful.
Regards,
Filipe Freire
|
|
|
|
|
Hi
This is harikrishna M from hyderabad.Iam have been working as a software engineer in Asp.net/c#.
currently i am working in vb.net project due to some urgent bug fixings in my organisation.
i got one problem in setup project from 3 days.But not fixed.
i have been trying very well but i can't.
But unfortunately i didn't found my problem here.
So, i think u can solve my problem.
Please feel free and help me if any one know about it.
My requirement is
I created my vb.net application to setup file using setup project option in setup and deployment section.
after then, i tried to install in my computer using that setup file.
It installs good and working fine.
But at the end of installation before last wizard, i got msiexec dialog window (all details of msiexec with options is shown) appears.
This window forced me to click on ok button only.After clicking ok button of this window only it finishes the installation and same problem while Unstalling also.
But my client don't want to view this msiexec popup dialog window.
How to hide this msiexec dialog window.
i need to complete the installation/uninstalltion of application with out showing this window.
Is it possible? If it is possible, please give me a mail with details.It is very urgent, Please help me
I am waiting for quick reply
thank you
with regards
hari
harikrishna.m
-- modified at 1:36 Friday 30th December, 2005
|
|
|
|
|