|
Hi,
I have been battliing with an issue with wcf and wonder if anyone can solve my issue.
Many thanks
In a silverlight apllication, I created a wcf service under the host i.e. (projectname.web) project. Then from the silverlight application which holds all the .xaml pages, I reference the wcf and all works fine (The wcf is calle dfrom the .xaml and data is retrieved).
Problem is arised only when I try to separate the wcf service from the webhost i.e. (projectname.web). So I created a separate wcf service application project and then tried to call the service from the .xaml project.
The error I get is in references.cs
The error message is: The remote server returned an error: NotFound.
and the code which causes the error is:
public Samples.ProductServiceHost.Product EndGetProduct(System.IAsyncResult result) {
object[] _args = new object[0];
Samples.ProductServiceHost.Product _result = ((Samples.ProductServiceHost.Product)(base.EndInvoke("GetProduct", _args, result)));
return _result;
}
I have also added the crossdomain.xml to the wcf service application project.
I wonder if the error is to do with the web.config.
This is what the web.config looks like in the wcf service application:
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<services>
<service behaviorConfiguration="Samples.Services.ServiceBehavior"
name="Samples.Services.ProductService">
<endpoint address=""
binding="basicHttpBinding"
contract="Samples.Services.IProductService">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="Samples.Services.ServiceBehavior">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
|
|
|
|
|
Having had this error 1000s of times I can confidant you can interpret the error as something went wrong on the server side . This is what we have done (recently)
Move you WCF out to another solution, start it up and leave it running. Now start the host application in a second instance of VS. This should allow you to debug the service.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
use fiddler to trace the error and post the error, without knowing it we cant tell you what the problem is..
|
|
|
|
|
I think you posted this to the wrong person....
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
I have a java menu on the webpage that is partially hidden from the silverlight control that i have placed below.
Is there a way to render the menu above the SL content?
|
|
|
|
|
As the SL control works inside a webpage, it should simply be a matter of setting the Z-order. Basically, host your menu in a div with a higher z-order than the div you are hosting your SL page in. I haven't tried it, but the theory is sound.
|
|
|
|
|
ok, i will check in to it thanks.
|
|
|
|
|
Hi!
I tried the z-index:-1 but it didn't seem to work.
edit:
but i found a solution that i tested and worked
Add
<param name="windowless" value="true" />
on the aspx or html page when you add the Silverlight element in the <object> tag
modified on Thursday, November 25, 2010 3:24 AM
|
|
|
|
|
Thanks for posting a solution.
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.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
Hi,
I am trying to make a rounded TextBox like this:
<Border BorderBrush="Black" BorderThickness="3" CornerRadius="8" >
<TextBox Width="300" Height="30" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,10,0,0" />
</Border>
but instead I get a stretched border to the surrounding Grid and a regular TextBox in the middle of the border.
What am I doing wrong ?
|
|
|
|
|
1) When you add a Border around a TextBox, you're... adding a border AROUND the textbox. You're not replacing the existing one.
2) The border is stretching because its HorizontalAlignment and VerticalAlignment are defaulting to Stretch. Move those from the TextBox to the Border. You probably also want to move the Margin, as otherwise you're telling the TextBox to leave ten pixels between it and the border (Unless that's what you want).
This is probably, however, the wrong way to go about this... You don't really want to add a border object. You want to re-style the TextBox to change its existing border. If you're new to WPF, your best bet is probably just to find some code on the web to do this... Google "wpf rounded textbox", and you'll be flooded with options.
|
|
|
|
|
The border is stretching because its HorizontalAlignment and VerticalAlignment are defaulting to Stretch
Thank you, that was the problem, but not only. Now that the border sticks to the texbox, the edges of it are still "square" and the rounded border is just around it.
I got this code from web and wonder how can it work for somebody
<Border BorderBrush="#FF000000" BorderThickness="1,1,1,1" CornerRadius="8,8,8,8">
<TextBox/>
</Border>
Anyway, I re-styled the textbox with template and it works very nice. Thanks again.
|
|
|
|
|
Glad to help
|
|
|
|
|
well generally a control template is applied if you want change the appearance of a Control. Its just that a control's visual tree is changed. Like for a rounded button, we have to replace the button with a border with a specified corner radius and then provide some animation(storyboard) to make it feel like a Button and still it will be having the Click event!
|
|
|
|
|
Remove Height and Width from Textbox, so that it takes the same from the Border.
It should work fine.
-
Bits and Bytes Rules!
10(jk)
|
|
|
|
|
i want to write some control that will contain 2 button and listView.
Pressing button 1 will scroll the listview up.
Pressing button 2 will scroll the listview down.
The direct scroll of the listview will be unavailable - ( will be invisible ? ).
1. I don't find the listview method 'scroll-up' / 'scroll-down' that i could callon the button event.
2. How can i make the listview scroll to be always visible ?
Someone can help me here ?
Thanks.
|
|
|
|
|
One way to do this is to get the ScrollViewer inside the ListView. In the following sample, I demonstrate how to get the scroll viewer of a ListView called myListViewInstance.
public static T FindChild<T>(DependencyObject child) where T : FrameworkElement
{
if (child.GetType() is typeof(T)) return child;
for (int count = 0; count < VisualTreeHelper.GetChildrenCount(child); count++)
{
var childItem = VisualTreeHelper.GetChild(child, count);
var result = FindChild(childItem);
if (result == null) continue;
return result;
}
return null;
}
private ScrollViewer _instanceViewer;
private void ScrollUp()
{
if (_instanceViewer == null)
_instanceViewer = FindChild<ScrollViewer>(myListViewInstance);
if _instanceViewer == null) return;
_instanceViewer.LineUp();
}
private void ScrollDown()
{
if (_instanceViewer == null)
_instanceViewer = FindChild<ScrollViewer>(myListViewInstance);
if _instanceViewer == null) return;
_instanceViewer.LineDown();
}
I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be Forgive your enemies - it messes with their heads
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Are you looking for this[^]?
|
|
|
|
|
That is some kick ass Post you got Kunal.
Uday
|
|
|
|
|
|
AFAIK there is not.
However, after elevating your project to full trust in SL4, you can use some of .Net's built in classes.
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.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
Hi Sri Abhinav,
Hope this is not too OT: but: what are the implications of elevating a project to full trust in SL4 for end users who deploy the appplication ?
"Many : not conversant with mathematical studies, imagine that because it [the Analytical Engine] is to give results in numerical notation, its processes must consequently be arithmetical, numerical, rather than algebraical and analytical. This is an error. The engine can arrange and combine numerical quantities as if they were letters or any other general symbols; and it fact it might bring out its results in algebraical notation, were provisions made accordingly." Ada, Countess Lovelace, 1844
|
|
|
|
|
Found this[^] intersting article that might be a good read if you've not come across it before.
"Although trusted applications do not have full access to the host computer, they can access personal data and potentially cause harm. Therefore, you should treat them as full-trust applications when you perform security evaluations and audits. To prevent users from installing or running trusted applications, system administrators can use machine policy settings to deny access, as described in the "Policy Restrictions for Elevated Trust" section of this topic."
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.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
Hi everyone!
Has anyone worked with QR barcode using WPF? Is there a free library for Wpf?
modified on Tuesday, November 23, 2010 2:43 PM
|
|
|
|
|
Big blinking stock trading screens - would you recommend WPF?
Note, i'm fully aware of this article[^]
But, from my own experience, as well as from experience from other guys who do demanding apps, that WPF is slow.
dev
|
|
|
|