|
Not a problem mate. Great minds and all that.
|
|
|
|
|
We have a security model where the authentication is done via active directories and the authorisation is done via a group application that passes a user profile object to each application.
The user profile basically identifies the bits within each application that can be enable/visibled and also applies some data filters based on attributes.
The Question
Is it reasonable to put the security checking methods in the ViewModelBase (inherited by all ViewModels), the methods will then need to reference the CurrentUser object. It feels odd to build a dependency between a base class and the CurrentUser.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: Is it reasonable to put the security checking methods in the ViewModelBase
That's entirely up to you, but this feels like a real violation of Separation of Concerns. If it's being done entirely at the client side, I'd consider using a CurrentUser service and a service locator to retrieve this service when I needed it.
|
|
|
|
|
CurrentUser is loaded from the SecuritySVC so we already have that in place, it is loaded at logon and is the local representation of the securitysvc object. SecuritySVC is used by many apps, including winforms ones.
Maybe if the ViewModel ctor pushed the CurrentUser to Base rather than a direct referentce between Base and CurrentUser would be better.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Is it possible for Silverlight to be delivered via the windows update.
Working within a major organisation where admin rights are restricted means SL cannot be installed from the browser. And as SL is not on the "approved" list it is a PITA to get the dammed thing installed. IT are not (never are) being helpful so I would like to shove a link under their nose (or possibly up their...) and ask them just to do their job.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
RobCroll wrote: escalate to the most senior (short tempered) user who has an interest.
It is about to hit the fan as I will be deploying an app requested by the CEO and no one can run it b/c SL cannot be installed without admin rights which are restricted.
The link is no use to me as SL needs to be delivered via ITs update system (I presume they manage the windows update).
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
With all due respect, perhaps developing the app in Silverlight wasn't such a good idea - one needs to sort these things out before starting devlopment, not when the project is all but completed.
That said, Here[^] is a link explaining how to install via group policys - which I think is about the best you will be able to do.
|
|
|
|
|
_Maxxx_ wrote: With all due respect
Isn't that the english way of saying bloody idiot
It never even occurred to me that delivering the infrastructure would be the issue, mind you the same problem would arise no matter what I used, except aspx maybe, but that is sooo yesterday...
I just assumed that a browser plug in could be installed, the admin lock down is only about a year old so no one was prepared for the implications to internal development(we are not supposed to exist, everything is supposed to be outsourced via the IT department).
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Its not quite possible to use the Windows Update service itself.
However, have a look at BITS[^] - I found it an interesting read.
Maybe, just maybe, the API here can help you out - if not, its a good read.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
|
|
|
|
|
Article - It is declared deprecated as of Windows 7.
The very last sentence was the killer(not that we are using such advanced stuff as weven).
Besides this seems to be a transfer protocol/method I need something that I can shove up ITs nose and state loudly, this is how it is done, go to it.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: Is it possible for Silverlight to be delivered via the windows update.
Oh yes, indeedy. This has to be done by the system administrators (obviously), but Silverlight has been able to be delivered by something known as WSUS since version 2 (that's Windows Server Update Service). As long as you have Windows Server 2008 in the mix, you should be good to go. Link[^]
|
|
|
|
|
Excellent - if you hear an anguished squawk from this region it will be some IT flunky trying to dodge a job! thanks POH
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
No problems mate. Glad to help, and glad that I can shift the burden of care off your shoulders and dump it entirely on somebody else's.
|
|
|
|
|
who someone can help me.... i am doing a project about WPF ... but it can playing through the network ... who can help me? please!
|
|
|
|
|
Are you asking how you can make WPF applications communicate online? If you are, then you should look into using Windows Communication Foundation to accomplish this. Without any more details of what you are trying to accomplish I really can't offer any further assistance.
|
|
|
|
|
You need to use WPF with web services (or some other network protocol) to communicate over the network.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
|
|
|
|
|
How can we display our WPF user control into Visual Studio ToolBox under a particular tab? I understand that we can drag a DLL into toolbox or right-click and select 'choose items', but what if we want to deploy it to some other user? Now for example, as soon as I install Telerik controls - it creates a tab 'RadControls for WPF Q1 2010' and places all related controls inside that. Also, it places all controls into 'Assets' tab of Expression Blend. So how to do that with our user control? Any help/ website reference?
|
|
|
|
|
I would assume you build your controls into a control library (it is a project type) which will compile into a DLL and then you include that DLL same as any other. Blend I have no idea about.
Caveat - I have not used this so it is an assumption.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks for your reply. But my question is related to already compiled DLL using control library project type.
I am sorry if I couldn't make it clear, but I am not asking about including a DLL into the project. Once we have the DLL with us, how can we put into VS tool box under a particular tab - along with other default controls. Again, that should not be by dragging DLL into VS tool box. Because I need to deploy that DLL. So, I guess - I need to create some EXE, which will perform some specific action - and everything will be done. Just like in the case of Telerik and other professional WPF controls.
I need to get an idea about how to do that.
|
|
|
|
|
Yeah I felt the answer was way too simplistic.
I presume you are looking to create an installation package that will place the controls into a specified tab in VS.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Yess!!
|
|
|
|
|
This is a follow-up to http://www.codeproject.com/Messages/3896423/Create-business-objects-from-XML.aspx[^] for which I didn't get any answer.
I'm experimenting with the idea of putting a static set of pre-defined business objects in a assembly (CRRT.Domain) by means of XAML. I have a ReportDefinitions.xaml file containing this:
<?xml version="1.0" encoding="utf-8" ?>
<ReportDefinition
xmlns="clr-namespace:CRRT.Domain;assembly=CRRT.Domain" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ReportDefinition.Parameters>
<TextInConditionReportParameter Name="Foo" />
<TextInConditionReportParameter Name="Bar" />
</ReportDefinition.Parameters>
</ReportDefinition>
Alas I get the following message: error MC3074: The tag 'ReportDefinition' does not exist in XML namespace 'clr-namespace:CRRT.Domain;assembly=CRRT.Domain'. Line 3 Position 3
What's wrong ? I checked that the classes do exist (in the proper namespace).
And by the way, should this eventually work, where would the result of the compilation go ? In a resource ? I stumbled upon this last question by accident btw, my initial plan was to incorporate the XAML as a text resource and load it using XamlReader. But Visual Studio spotted the .xaml extension and created a build step.
|
|
|
|
|
Okay, I found how to make it compile: remove the assembly directive from the namespace declaration:
<?xml version="1.0" encoding="utf-8" ?>
<ReportDefinition
xmlns="clr-namespace:CRRT.Domain;assembly=CRRT.Domain" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
...
This works:
<?xml version="1.0" encoding="utf-8" ?>
<ReportDefinition
xmlns="clr-namespace:CRRT.Domain" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
...
Now for my other question, where did the compilation product go ? And more importantly, how do I get at it ?
|
|
|
|
|
Hello all,
I have a series of "drawing" objects that hold some application specific data alongside an image. These objects (or at least their dates) are displayed in a listbox, when an item is selected it's image should be generated and displayed in another part of the grid. It does however not appear.
Here is some code:
<ListBox Grid.Column="0" ItemsSource="{Binding Source={StaticResource _Settings}, Path=ImageCollection.CurrentList}" Name="DrawingsList">
<ListBox.ItemTemplate>
<DataTemplate>
<Label Content="{Binding DateTime}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Image Grid.Column="1" Source="{Binding ElementName=DrawingsList, Path=SelectedItem.ActualImage}" Width="500" Height="500"/>
<!--<Label Grid.Column="1" Content="{Binding ElementName=DrawingsList, Path=SelectedItem.DateTime}"/> -->
And behind:
private System.Drawing.Image _ActualImage;
public System.Drawing.Image ActualImage
{
get
{
if (_ActualImage == null)
{
_ActualImage = GenerateImage();
}
return _ActualImage;
}
}
private System.Drawing.Image GenerateImage()
{
Bitmap bmp = new Bitmap(500, 500);
Graphics G = Graphics.FromImage(bmp);
G.Clear(Color.Red);
G.Save();
return bmp;
}
The commented label in the WPF that just displays the datetime property of the object works perfectly, so why doesn't the image ?
|
|
|
|