|
Woo!! This is the same link suggested by "Abhinav S".
Don't forget to Click on [Vote] and [Good Answer] on the posts that helped you.
Regards - Kunal Chowdhury | Software Developer | Chennai | India | My Blog | My Tweets | Silverlight Tutorial
|
|
|
|
|
Alright. I'm trying to connect to a WCF web service from a SL4 app. I've tested the service with the WCFServiceTester utility, and it works fine. However, from the Silverlight application, it fails. When I watch it under fiddler, the clientaccesspolicy.xml file is being requested, but it appears to not be found (404). The file is in the root of the service, so I'm not sure what's wrong.
The service's web config:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="httpBinding0" >
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="KraftsSvc.KBKBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<services>
<service name="KraftsSvc.KBK" behaviorConfiguration="KraftsSvc.KBKBehavior" >
<host>
<baseAddresses>
<add baseAddress="http://75.11.0.157/KraftsSvc" />
</baseAddresses>
</host>
<endpoint address="/"
binding="basicHttpBinding"
bindingConfiguration="httpBinding0"
contract="KraftsSvc.KBK" />
</service>
</services>
</system.serviceModel>
The ClientAccessPolicy.xml file:
<?xml version="1.0" encoding="utf-8" ?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="SOAPAction">
<domain uri ="http://*" />
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>
The ServiceReferences.ClientConfig file:
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="HttpBinding_KBK"
maxReceivedMessageSize="2147483647"
maxBufferSize="2147483647" >
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint name="HttpEndPoint_KBK"
address="http://75.11.0.157/KraftsSvc/KBK.svc"
binding="basicHttpBinding"
bindingConfiguration="HttpBinding_KBK"
contract="KraftsService.KBK" />
</client>
</system.serviceModel>
</configuration>
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
The client access policy should be in the root folder.
So maybe it's not in there and you get the 'not found' error.
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.
|
|
|
|
|
I'm sitting here looking at it. It's in the service's folder...
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: It's in the service's folder...
Microsoft suggests "Place a clientaccesspolicy.xml file at the root of the domain where the service is hosted to configure the service to allow cross-domain access."
So it should be in the root of the domain and not in the services folder.
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.
|
|
|
|
|
You mean in wwwroot?
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Would be worth a try....though I guess it could also be the root folder of the application.
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.
|
|
|
|
|
I've read that it belongs at the root of the service, not the domain.
However, not having tried it, I copied it there, and lo and behold - it works.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
I am using WPF .Net 4.0 and I have a Window that populates a number of controls with data from a file. These are all within a DockingManager ContentControl which I then have its IsEnabled property bound to a global boolean variable. Now when the window first loads, it is correctly enabled or disabled based on what default value I set to it. However when I select "Edit Network" from my context menu, I update the global bool, which does update when I put a breakpoint, but the ContentControls IsEnabled property does not get set. Any ideas as to why this may be? Is there a view update I need to call or something?
<ContentControl Name="contentCtrlValues"
syncfusion:DockingManager.Header="Current Values"
syncfusion:DockingManager.CanAutoHide="False"
Visibility="Visible"
syncfusion:DockingManager.State="Document"
syncfusion:DockingManager.CanDock="False"
syncfusion:DockingManager.CanFloat="False" IsEnabled="{Binding Path=NetEnabled,
ElementName=window1, Mode=TwoWay}">
private Boolean bNetIDEnabled = false;
public Boolean NetEnabled
{
get { return bNetIDEnabled; }
set { bNetIDEnabled = value; }
}
private void HandleEditNetwork(object sender, RoutedEventArgs e)
{
NetEnabled = true;
}
|
|
|
|
|
You actually need to raise a notification to tell the binding object that the property has changed. This relies on you using the INotifyPropertyChanged interface and raising a PropertyChanged event naming the NetEnabled property.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
|
You are welcome. Good luck.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
OK
You have two ways to do that, you either implement the INotifyPropertyChanged interface or simply change this CLR property to dependency property to let wpf handle notification
|
|
|
|
|
Thanks for the help! Going to go try this out now.
|
|
|
|
|
I am making a custom tooltip control, (derived ftom tooltip), and wondering if there is some simple way to make the tip clickable, (url and close button). I have managed to 'fake' it, using mouse capture and previewmousemove, but wondering if there was an easier way?
Thanks,
j
|
|
|
|
|
You can use a button that you apply a tool tip control on it as a control template
|
|
|
|
|
If only it were that easy.. I have tried deriving the control from other elements, but if you use the tooltip in a standard way, (as below), it does not work correctly. I have managed to get this working using capture and manipulating mouse input, good enough for now unless another solution becomes available.. thanks
<Button.ToolTip>
<vht:vhToolTip HasDropShadow="True"
Opacity="0.9"
Header="Test Header: Tip 3"
Hyperlink="http://www.the-noc.net"
Text="this is just a bunch of tooltip text"
ImageSource="/Images/13.ico"
HasCloseButton="True"
HyperlinkClicked="vhToolTip_HyperlinkClicked"/>
</Button.ToolTip>
</Button>
|
|
|
|
|
If I were you, I'd look at substituting this by using the AdornerLayer and creating a mocked up tooltip that gives you the elements you want.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hey Pete,
Do you mean scrap the custom control all together?
|
|
|
|
|
Not quite - I mean show your control in the AdornerLayer in place of showing the ToolTip.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
That's a thought.. I'll try it out
thanks
|
|
|
|
|
Good luck. Let me know how you're getting on.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hi all,
I have two projects in same solution : 1 WCF project and 1 silverlight project.
WCF project start at port : 54432
Silverlight project start at port : 55647
i deploy WCF project on IIS and copy ClientAccessPolicy.xml and CrossDomain.xml into wwwroot folder. From SL project, i add reference service to WCF on IIS. It's run.
But from SL project, i add reference service to WCF project in same solution and run. I found the error about cross-domain. I already added ClientAccessPolicy.xml and CrossDomain.xml into the root of WCF project. The same error is displayed.
Could you please guide me to solve it? Any helps will be welcomed
|
|
|
|
|
|
I installed VS2010 and SL4 (with tools and toolkit), and I can't get the debugger to stop anywhere in the code in a silverlight (v4) app - not even the first line of the constructor in App.xaml.cs.
Can anyone help?
(and before anyone asks, yes, the solution configuration is set for debug)
SOLUTION ======================
It seems that it's because FireFox executes plug-ins out-of-process, so the debugger can't attach to the appropriate process. The fix is described here:
On MSDN Connect[^]
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
modified on Sunday, July 4, 2010 9:45 AM
|
|
|
|