|
I can access to http://localhost/clientaccesspolicy.xml
The clientaccesspolicy.xml is
<br />
<br />
<?xml version="1.0" encoding="utf-8" ?> <br />
- <access-policy><br />
- <cross-domain-access><br />
- <policy><br />
- <allow-from http-request-headers="*"><br />
<domain uri="*" /> <br />
</allow-from><br />
- <grant-to><br />
<resource path="/" include-subpaths="true" /> <br />
</grant-to><br />
</policy><br />
</cross-domain-access><br />
</access-policy><br />
<br />
and still nothing help.
|
|
|
|
|
What about your crossdomain.xml? What happens if you browse to http://localhost/crossdomain.xml?
|
|
|
|
|
I can see the crossdomain.xml also when i try to enter
http://A.B.C.D/crossdomain.xml
from explorer - from different machine ( A.B.C.D is the server machine IP )
|
|
|
|
|
The first thought I have is that perhaps SOAPAction has been blacklisted. In the section
<allow-from http-request-headers="*"> change this to <allow-from http-request-headers="SOAPAction"> instead.
|
|
|
|
|
Hi,
There are two usercontrols i.e. page1.xaml, page2.xaml in my silverlight project which I am using like pages.
There are alot of codes in each usercontrol...
I would like to have one main page with a tab control and tab1 to show page1 and tab2 to show page2.
Is this possible?
Is it just a matter of referencing each control from each tab in the tab control?
Thank you
|
|
|
|
|
yes, this is possible.
you will have ( in the simple way ) reference to the tab control.
[I'm not sure but i think you can access to the usercontrol by calling too tabControl.Items - but any time you can use events to communicate with the userControl.
|
|
|
|
|
arkiboys wrote: would like to have one main page
This is exactly how we have designed our apps, you need to implement the navigation frame.
<Navigation:Frame x:Name="MainContent" Grid.Column="1" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
Source="Home" UriMapper="{StaticResource MyMapper}">
Our pages are usercontrols (this change is minimal) and we set the source have on user selections
Look into xmlns:Navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
This is what I am trying to do now.
My main page has the navigation frame with the navigation menue on the left hand side.
Clicking each linkbutton in the menue will navigate to the desired page and show the page inside the mainframe.
Question:
In page2.xaml, I have placed a button, and wouold like it to navigate me to the page1.xaml when clicked.
So, in page2.xaml, I have placed the namespace for navigation and the following code in the button
private void btnNavigate_Click(object sender, RoutedEventArgs e)
{
mainFrame.Navigate(new Uri("/Page1.xaml", UriKind.Relative));
}
BUT the problem is that mainFrame is on the mainpage.xaml and not on page2.xaml, so I get an error when running the application.
Does this mean I have to copy the mainframe xaml to the page2.xaml as well?
Thanks
|
|
|
|
|
I have a static class that handles the navigation.
public static class MainUI
{
public static void NavigateTo(string sViewName)
{
Frame oFR = (Application.Current.RootVisual as FrameworkElement).FindName("MainContent") as Frame;
NavigateTo(oFR,sViewName);
}
public static void NavigateTo(Frame oFR, string sViewName)
{
oFR.Navigate(new Uri(sViewName, UriKind.Relative));
}
The default is to use the main page navigate frame but I also use navigate frames within other pages.
private void ControlNavigate(object sender, RoutedEventArgs e)
{
Frame oFrame = this.FilterContent;
string sURL = "Blank";
switch ((sender as HyperlinkButton).Content.ToString())
{
case "Accounts":
sURL = "AccountFilter";
break;
case "Elements":
sURL = "ElementNodeFilter";
break;
case "Products":
sURL = "ProductFilter";
break;
}
gUI.NavigateTo(oFrame, sURL);
}
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
Thanks for the reply...
In my silverlight application, my main page is called HomePage.xaml which is a user control.
1- In regards to your second code which is ControlNavigate, does this have to be placed inside a navigated page or a usercontrol?, it's just that if I place it inside my page2.xaml, the compiler underlines an error for:
this.FilterContent and gUI
2-There is a Login.xaml which is a usercontrol. From page2.xaml I can now navigate to login.xaml using the code you sent.
BUT, using the button in login.xaml, I am unable to navigate to another page. When debugging, it seems your code for navigatioin does not give any error but it goes into Application_UnhandledException inside app.xaml.cs
Any thoughts on the above point please?
Thanks
modified on Thursday, March 31, 2011 12:50 AM
|
|
|
|
|
Good Evening
I have a Datagrid and i selectedChange event of the Datagrid, i show a child wind and i bind the textbox controls of the child window from the Parent Window which has a datagrid. Now my problem is that there is a Combobox on the Child window, onbviously this combobox is binded after the child window has opened. The data is not Static , its coming from the DB. What i want is to set the selected item from the parent. This is what i am doing
private void grdkids_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangeEventArgs e)
{
KidsViewUpdateDetails KidsDetails = new KidsViewUpdateDetails();
KidsModelExtended model = (KidsModelExtended)this.grdkids.SelectedItem;
KidsDetails.txtstudentnumber.Text = model.sStudentNumber;
KidsDetails.txtkidname.Text = model.sKidName;
KidsDetails.txtkidlastname.Text = model.sKidLastname;
KidsDetails.txtgrade.Text = model.sKidGrade;
KidsDetails.txtclass.Text = model.skidclass;
KidsDetails.ddlallergies.Text = model.sAllergyName;
KidsDetails.ddlschool.Text = model.sSchoolName;
GenericMethods.GenericMethods.SetCookie("kidId", model.iKidid.ToString());
KidsDetails.Show();
}
in this lines
KidsDetails.ddlallergies.Text = model.sAllergyName;
KidsDetails.ddlschool.Text = model.sSchoolName;
i am trying set the selected item to be that. but when the Child load , there Combobox remain unselected
This is the declaration of the Combobox
<telerik:RadComboBox HorizontalAlignment="Left" DisplayMemberPath="sAllergyName" SelectedValuePath="{Binding iAllergyID}" Margin="106,226,0,0" Name="ddlallergies" VerticalAlignment="Top" Width="142" Height="22">
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
I have found the combobox the most irritating control in SL, if any of the underlying data objects is changed, the combos binding is negated. I have a BindCombo() in the code behind. This renews the binding after the page has loaded and if any of the data sources change state (.Clear(), or new on the observablecollection that serve the itemssource and the selecteditem).
If the binding is setup properly then changing the selecteditem in the datasource of the datagrid should automatically update the combobox selected item.
You need to get away from manipulating the UI elements, its so... winforms.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I must agree , it is really annoying. This is supposed to be a simple thing.
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi All,
I had developed a Word Add-in using WPF Ribbon. The Ribbon has a button which displays a WPF Window on clicking. On running the Add-in in my machine, the window gets displayed and its runs well, but on installing the add-in in one of production machine, I am not able to see the Window. What's even more surprising is that, the code-behind the window runs but the Window UI doesn't get displayed. This is very weird and I am not able to find the solution for it.
Need your valuable solution for it.
But this problem is only with few computers, I am kind of stuck. Please help!
Thanks,
Vikas
|
|
|
|
|
Are you sure you have the proper version of .NET installed on the production machine? I'd be surprised if you aren't getting any runtime errors if its not working.
|
|
|
|
|
Well, I am also assuming the same thing, as there was a Silverlight 4.0 installed against the standard Microsoft .net 3.5 SP1 for our company. I have just uninstalled all the frameworks and trying to re-install to see if I get any luck!
Thanks,
Vikas
|
|
|
|
|
First of all, Silverlight is not installed against the standard .NET runtime. It uses it's own version - which is a stripped down CLR designed to be delivered in an efficient manner over the web. Secondly, Silverlight 4 is a subset of the .NET 4 runtime, not the .NET 3.5 one. It sounds to me like the app just isn't firing up due to missing prerequisites. Try checking the event logs to see if Office has written anything there.
|
|
|
|
|
Hi,
Im new to coding in XAML and silverlight.
I keep getting the error The Property 'Content' is set more than once.
This error came up after I added in the top stack pannel.
This is prob a very simple error to fix but I can see where I am setting the content again.
<controls:PanoramaItem Header="">
<StackPanel Height="100" HorizontalAlignment="Left" Margin="107,260,0,0" Name="stackPanel1" VerticalAlignment="Top" Width="200">
<Image Height="112" HorizontalAlignment="Left" Margin="12,184,0,0" Name="userProfilePhoto" Source="{Binding UserProfileImage}" Stretch="Fill" VerticalAlignment="Top" Width="111" />
<TextBlock Height="44" HorizontalAlignment="Left" Margin="129,184,0,0" Name="userProfileName" Text="TextBlock" VerticalAlignment="Top" Width="297" />
<Image Height="77" HorizontalAlignment="Left" Margin="350,219,0,0" Name="userProfileMood" Stretch="Fill" VerticalAlignment="Top" Width="76" />
<TextBlock Height="157" HorizontalAlignment="Left" Margin="129,219,0,0" Name="userProfileStatus" Text="TextBlock" VerticalAlignment="Top" Width="221" />
</StackPanel>
<ListBox Margin="0,150,0,0" ItemsSource="{Binding Items}" Height="402">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Margin="0,0,0,17" Width="432" >
<!--<Rectangle Height="100" Width="100" Fill="#FFE5001b" Margin="12,0,9,0"/>-->
<TextBlock Text="{Binding DatePosted}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}" />
<TextBlock Text="{Binding PostText}" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}" />
<TextBlock Text="{Binding UserText}" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<!--Double line list with text wrapping-->
</controls:PanoramaItem>
|
|
|
|
|
You've added two pieces of content to PanoramaItem ; in other words, you've added the StackPanel and the ListBox . I assume you mean for the ListBox to be part of the StackPanel - if so, move it insided the StackPanel tags.
|
|
|
|
|
I wanted two pannels inside my PanoramaItem
The StackPannel will hold fix pre set info
The ListBox will hold a groups of info which should be listed.
somethings like that.
How would I go about doing that, so that is isnt illegal.
Am I using the wrong items?
Thanks
|
|
|
|
|
Put a Grid (Or some other kind of panel) in the PanoramaItem, and put the StackPanel and ListBox in the Grid.
|
|
|
|
|
If you aren't intending to do something like change the visibility of the StackPanel, is there any reason you need two containers? If there is, wrap the StackPanel and ListBox in any of the containers that you want, such as a Grid.
|
|
|
|
|
I guess you need to move the listbox into another PanoramaItem.
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.
|
|
|
|
|
Hi I'm reading this article from MSDN regarding Message Security with a User Name Client
[^]
Two questions:
QUESTION 1 - Since no SSL, I take they don't encrypt using SSL cert but security context constructed AFTER authentication of client from server side using username+pwd? (Does it mean client send in pwd in clear text over the wire during initial exchange?! How does TLS negotiation work? What does it use as key for encryption? Server's got to publish her public key and client must know to use it to encrypt its initial transfer of username+pwd in order for initial exchange be secured. Here it says server need to expose a "Digital Certificate" (which I don't see in MSDN's diagram[^] - it's http, not https - what certificate?)
QUESTION 2 - how to check username and pwd from server side? This is how the sample set username/pwd from proxy/client side.
<br />
cc.ClientCredentials.UserName.UserName = ReturnUsername();<br />
cc.ClientCredentials.UserName.Password = ReturnPassword();<br />
But I don't see anything from server side anything which resembles this:
<br />
if(SomeRequestContext.UserName=="johndoe" && SomeRequestContext.Password=="abc123")
{<br />
IsAuthenticated = true;<br />
}<br />
From server side, I found two comes closest but no pwd and not sure if it's correct:
<br />
OperationContext.Current.ServiceSecurityContext.PrimaryIdentity.Name <br />
OperationContext.Current.ServiceSecurityContext.WindowsIdentity.User <br />
Also just a thought I don't think any of this[^] guards against say IP or arp spoofing this sort of attack?
What about replay attack (capture WCF request and resend) and mimic a license authorization or transaction for example.
Thanks!
REF: http://msdn.microsoft.com/en-us/library/ms752233.aspx[^]
dev
modified on Friday, March 25, 2011 4:31 AM
|
|
|
|
|
By default, there is no authentication.
If you want authentication, they have a bunch of different ways to go. I won't go into all of them, but it sounds like you want the custom validator. In any event, most (if not all) require a cert and SSL / HTTPS. Otherwise you would send credentials over clear text which is a no-no.
For the custom validator, SecurityMode is set to "TransportWithMessageCredential" and <serviceCredentials> has a section similar to:
<userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="x.y.Portal.UserNamePasswordValidator, Portal" />
UserNamePasswordValidator is a class you create that derives from UserNamePasswordValidator.
Thats just scratching the surface on the implementation details, I won't go into all of them since there are a lot (as with everything in WCF), but that should give you some good buzz words to google.
EDIT:
Oh yeah, forgot about your other question...
Once you get the password validator set up, you can get the username with:
ServiceSecurityContext.Current.PrimaryIdentity.Name
|
|
|
|
|