tag:blogger.com,1999:blog-6907873803403737979.post6703463038291430564..comments2023-10-16T12:48:46.251+01:00Comments on C# Bits: Securing Dynamic Data Preview 4 Refresh – Part 3Stephen J. Naughtonhttp://www.blogger.com/profile/17435527974910745156noreply@blogger.comBlogger19125tag:blogger.com,1999:blog-6907873803403737979.post-7917152884107968352014-04-25T09:49:32.508+01:002014-04-25T09:49:32.508+01:00nevermind about my previous question.nevermind about my previous question.Evaldashttps://www.blogger.com/profile/08195345924752030281noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-59924525908543792782010-12-15T07:54:39.056+00:002010-12-15T07:54:39.056+00:00Hi Steve,
have you tested the "SecuringDynami...Hi Steve,<br />have you tested the "SecuringDynamicData" whith listDetails ?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-76332134352289841072010-11-30T10:30:25.427+00:002010-11-30T10:30:25.427+00:00Thank you SteveThank you SteveAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-3409077465933787332010-11-30T09:06:36.594+00:002010-11-30T09:06:36.594+00:00Hi VB not a problem :) I don't believe I teste...Hi VB not a problem :) I don't believe I tested it with ListDetails sorry. I'll try to have a look today.<br /><br />Steve.Stephen J. Naughtonhttps://www.blogger.com/profile/17435527974910745156noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-51621871700385346212010-11-30T08:48:53.981+00:002010-11-30T08:48:53.981+00:00Hi Stev,
I'm new in programing ASP.NET
I use D...Hi Stev,<br />I'm new in programing ASP.NET<br />I use DD whith EF NET 4, I downloaded SecuringDynamicData - 2010-06-13a.zip security works without problem, but as I try to use ListDetail.aspx it does not work, the only change is that :<br /><br /><br />routes.Add(New DynamicDataRoute("{table}/ListDetails.aspx") With { _<br /> .Action = PageAction.List, _<br /> .RouteHandler = New SecureDynamicDataRouteHandler(), _<br /> .Model = DefaultModel, _<br /> .ViewName = "ListDetails"})<br /><br />routes.Add(New DynamicDataRoute("{table}/ListDetails.aspx") With { _<br /> .Action = PageAction.Details, _<br /> .RouteHandler = New SecureDynamicDataRouteHandler(), _<br /> .Model = DefaultModel, _<br /> .ViewName = "ListDetails"})<br /><br /><br />Sorry the code is in VB.<br />Thank you for your help.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-74784517900286881092010-03-25T14:19:28.265+00:002010-03-25T14:19:28.265+00:00Hi Steve
The hyperlink controls don't appear ...Hi Steve<br /><br />The hyperlink controls don't appear to be implemented in the sample. If they are I can't find them.<br /><br />Thanks, SimonAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-74643031946034748062010-03-25T14:18:23.881+00:002010-03-25T14:18:23.881+00:00Hi Steve
The hyperlink controls don't appear ...Hi Steve<br /><br />The hyperlink controls don't appear to be implemented in the sample. If they are I can't find them.<br /><br />Thanks, Simonprimatehttps://www.blogger.com/profile/14021076939807007019noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-56387354708003622482010-03-25T01:34:45.808+00:002010-03-25T01:34:45.808+00:00Thanks for the snappy response Steve.
I've be...Thanks for the snappy response Steve.<br /><br />I've been using the sample as a reference and to fill in some of the gaps. Especially the SecureColumnAttribute code. Problem is that the hyperlink controls don't appear to be implemented in the sample and I can't figure out how they are supposed to be used.<br /><br />Everything else works great.<br /><br />Thanks, Simonprimatehttps://www.blogger.com/profile/14021076939807007019noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-85194855521497333912010-03-25T01:29:42.287+00:002010-03-25T01:29:42.287+00:00Thanks for the snappy response Steve.
I've be...Thanks for the snappy response Steve.<br /><br />I've been using the sample as a reference and to fill in some of the gaps. Especially the SecureColumnAttribute code. Problem is that the hyperlink controls don't appear to be implemented in the sample and I can't figure out how they are supposed to be used.<br /><br />Everything else works great.<br /><br />Thanks, Simonprimatehttps://www.blogger.com/profile/14021076939807007019noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-63936886092938600502010-03-24T08:12:32.416+00:002010-03-24T08:12:32.416+00:00Have you run the sample?Have you run the sample?Stephen J. Naughtonhttps://www.blogger.com/profile/17435527974910745156noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-30144976850119397752010-03-24T07:49:13.987+00:002010-03-24T07:49:13.987+00:00Hi Steve
I managed to understand and get everythi...Hi Steve<br /><br />I managed to understand and get everything to work except for the final two hyperlink controls (DynamicHyperLink.ascx & DeleteHyperLink.ascx). Please could you provide an example of how to use them?<br /><br />Many thanks, Simonprimatehttps://www.blogger.com/profile/14021076939807007019noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-58177847553144080612010-03-16T22:32:34.179+00:002010-03-16T22:32:34.179+00:00Sorry about that, I switched to C# about 4-5 years...Sorry about that, I switched to C# about 4-5 years ago and find it hard to switch back now :(<br /><br />and I've not heard of anyone doing a port.<br /><br />Steve :)Stephen J. Naughtonhttps://www.blogger.com/profile/17435527974910745156noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-26421969625682040122010-03-16T21:53:54.300+00:002010-03-16T21:53:54.300+00:00Great stuff, but its's hard following along fo...Great stuff, but its's hard following along for us lowley VB types.. <br /><br />it's not the regular loops and logic that stumps us, but the multitude of new declarations with inheritance, metadata, etc..<br /><br />do you know if this was translated to VB by anyone ?jeff Denmarkhttp://jeffdenmark.comnoreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-78713473105014437882009-08-01T14:02:28.842+01:002009-08-01T14:02:28.842+01:00Hi Trialot, as I explained before I'm just try...Hi Trialot, as I explained before I'm just trying to give a simple sample that does security, I don;t waht to make to too complicated otherwise it will confuse the issue.<br /><br />However if the IsReadOnly method of the Column class becomes virtual the I can return true in cases where there is restricted access this would then simplyfy the code. and when this change appears then I will look at extending the solution to incorporate it.<br /><br />Steve :D<br />P.S. just drop me an e-mail is you want to chat more in depth on this and I can add you to messenger :DStephen J. Naughtonhttps://www.blogger.com/profile/17435527974910745156noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-42095187829706298352009-08-01T13:26:46.757+01:002009-08-01T13:26:46.757+01:00Euhm, as another comment.....i have changed the se...Euhm, as another comment.....i have changed the secure dynamicdataroute classes to incorporate both the restrictions on tables as on actions. <br /><br />Maybe you can have a look at it and post the corresponding changes to this topic. <br /><br />Shall i mail ?trialotnoreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-75390243511260606782009-08-01T13:22:16.816+01:002009-08-01T13:22:16.816+01:00I am not sure what you want to achieve with the ex...I am not sure what you want to achieve with the extension part of your answer. <br /><br />If I am not mistaken, you want a gridview or formview (the ones used in DynData) that has the attribute IsReadOnly in both the parent control (e.g. asp:gridview/formview) as the child controls (in this case, only itemtemplates or variants of that). <br /><br />If that is your intention, than you have the problem that this intervenes with the DefaultMode in the formview. <br /><br />Simple managed code can be used to make formviews read-only for specific (security) roles. No need to extend or no need to use attributes there. <br /><br />The gridview is something different though. No attribute such as DefaultMode is present. <br /><br />Then again, you probably want to prevent (based upon security rules and roles) the edit, delete and insert hyperlink and the possibility for inline editing. <br /><br />Managed code can again be used to disenable and remove visibility of the linkbuttons. <br /><br />The only thing that then remains is the read-only property for specific columns, but that can be easily achieved by managed code (when using templates for the columns). <br /><br />Seems to me that you desire an extension that is not directly necessary. I can be mistaken. <br /><br />As a final consideration: is the securityattribute meaningful, taking into consideration that everything can be achieved by managed code? <br /><br />Yes, it is, as a general method. The managed code approach should be used for custom page templates or in addition, in order to tie up and intensify security. <br /><br />Furthermore, the security part of dynamicdata contains the delicious routehandler, also resulting in a better security. <br /><br />In short, no need for the read-only extension. <br /><br />By the way, any quick idea how the prettydynamicdataroute compares to the secure dynamicdataroutehandler?<br /><br />I presume the same idea applies as in my previous post.....<br /><br />As a final point: if you want me to, i am happy to provide you with some (untested) code, containing the combination of security and custom classes, including the prettydynamicdataroute and securedynamicdataroutehandler.....trialotnoreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-24501265927533472092009-07-31T09:41:44.270+01:002009-07-31T09:41:44.270+01:00Hi trialotm, first I think you will find the missi...Hi trialotm, first I think you will find the missing bit in part 1.<br /><br />second, this is just an example and I like to keep them as simple as possible.<br /><br />And yes you are correct about the custom meta classes inheritance would let you do that.<br /><br />There is more you can do with the custom metadata classes, one thing I'm looking at is allowing you to pass in a delegate for row generation. I have also asked that some of the other methods of Table and Column be made virtual so they can be extended i.e. IsReadOnly which could add the logic to determin by security if the column was read only.<br /><br />Steve :DStephen J. Naughtonhttps://www.blogger.com/profile/17435527974910745156noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-64707515699865834032009-07-31T02:52:00.158+01:002009-07-31T02:52:00.158+01:00Question?
In the Dynamic Data Preview 4 there is ...Question?<br /><br />In the Dynamic Data Preview 4 there is a Futures Sample, containing custom classes, tables etc. <br /><br />These CustomMetaModel, CustomMetaTable (etc.) classes are more elaborate then their SecureMeta* counterparts, as they are proposed by you. <br /><br />This is somewhat confusing, in different ways. <br /><br />First of all, seems to me that inclusion of CustomMeta* classes should be desirable and that the reference to the Meta* classes in the SecureMeta* classes should be changed to CustomMeta*. <br /><br />Not sure though, which changes are adequate. Any suggestions?<br /><br />Second, the CustomMeta* classes are more elaborate and contain more definitions. <br /><br />I suppose they can be simply copied (with minor alterations) to the SecureMeta*.<br /><br />Any suggestions?<br /><br />Third and most important: it seems to me that we want customization with security (with security being part of customization). <br /><br />It then seems to be desirable to have SecureMeta* classes that extend the CustomMeta* classes. <br /><br />If i am not mistaken, this would be a solution to the second point and requiring a step as mentioned in the first point. <br /><br />But confusion exists: can you have a look and add a part 4 of securing dynamic data? <br /><br />Thanx in advance.....trialotnoreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-47072443815548299752009-07-31T02:33:29.101+01:002009-07-31T02:33:29.101+01:00Missing Text....
It seems that something misses i...Missing Text....<br /><br />It seems that something misses in the text, being the securecolumattribute class. <br /><br />The corresponding file is in the download, but not in the explanation.<br /><br />Please add the class and corresponding explanation.trialotnoreply@blogger.com