|
I see the following error while connecting to a wcf service through my silverlight application.
An error occurred while trying to make a request to URI 'http://localhost:3046/Service1.svc'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details.
Tauseef A Khan
MCP Dotnet framework 2.0.
|
|
|
|
|
|
wcf service is in the solution where silverlight application is.
i m hosting silverlight app in a web application in the same solution.
Tauseef A Khan
MCP Dotnet framework 2.0.
|
|
|
|
|
Tauseef A wrote: wcf service is in the solution where silverlight application is.
i m hosting silverlight app in a web application in the same solution.
The project/solution has no relevance here.
I mean the web hosts...WcfSvcHost...IIS....Self Hosting?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
its wcfsvchost i think.
Tauseef A Khan
MCP Dotnet framework 2.0.
|
|
|
|
|
Then you'll definitely want to study the information
at the links I provided to understand the cross-domain
issue and how to deal with it.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
thanks.
Tauseef A Khan
MCP Dotnet framework 2.0.
|
|
|
|
|
The WcfSvcHost is for testing/debugging.
You'll probably want to consider how it will work
when the service is actually deployed. I find hosting
on IIS the easiest and most flexible.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi All,
I have to take the inputs as multiple entries in WPF data grid like this.
----------------------------------------------------------------------------------------------------------------------
| Select Option | Name | Age |Country | Action | Action |
----------------------------------------------------------------------------------------------------------------------
| option button | textbox | textbox | combobox | linkbutton edit/update row | linkbutton edit row |
------------------------------------------------------------------------------------------------------------
ADD Button
-----------------------------------------------
--> By clicking the ADD button i have to create a new row with new controls as in 2nd row.
--> By clicking the DELETE button in the 5th cell the corresponding row should be deleted.
--> By clicking the EDIT button in the 4th cell the corresponding row should be UPDATED(if user want)
Can I achieve this by taking WPF Data grid (WPF tool Kit Latest Build ), and how?
Or is there any other ways to achieve this?
Suggest me some URLs, Samples..etc
Many Many Thanks in Advance.
Eswara G
|
|
|
|
|
If the itemssource for the datagrid is an observablecollection,
generally all you need to do is add or remove items from the
collection and the datagrid will update appropriately.
How are you providing data to the datagrid?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi Mark Salsbery,
Thanks for Quick Reply,
Right now am providing data by using DataSet like
dgXXX.ItemsSource= dataSetXX.Tables[0].DefaultView;
Case 1: How to convert Data set to observablecollection..
case 2. i have some limitations, a) I am retrieving data as DataSet from Oracle11g by using Ref_cursor.
Now ... Please suggest me a way to approach.
Thanks
Eswara G
|
|
|
|
|
You should be able to use the DataTable as-is if
I remember right.
dataSetXX.Tables[0].Rows is the collection you can add/delete items
from (using DataTable.NewRow() to create new rows to insert).
dgXXX.SelectedItem should give you the DataRow selected in the datagrid.
Here's some more info: Windows Presentation Foundation Data Binding: Part 2[^]
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thank you Mark..
I tried this way..But am unable complete my requirement...
Can you provide me some sample code or Application or URL..
Regards,
Eswara G
|
|
|
|
|
Eswa wrote: Can you provide me some sample code or Application or URL..
Here's one example (see first reply): Binding a WPF listview to a DataTable[^]
An article with a little background in it: How do I bind to ADO.NET?[^]
If you can show a simple example of what you tried that
didn't work then maybe I can see what's going on...
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Does anybody know of a working Weather Web Service that I can use in my WPF app? I've tried numerous ones but none seem to be available when I try to add a reference to it.
|
|
|
|
|
|
Thanks I'll try them out.
I've been trying the GlobalWeather service from WebServiceX, and I get it working to display the following in a textbox:
<?xml version="1.0" encoding="utf-16"?><CurrentWeather>
<Location>Port Elizabeth, Port E Apt, South Africa (FAPE) 33-59S 025-36E 0M</Location>
<Time>Nov 13, 2009 - 09:00 AM EST / 2009.11.13 1400 UTC</Time>
<SkyConditions> mostly cloudy</SkyConditions>
<Temperature> 68 F (20 C)</Temperature>
<DewPoint> 55 F (13 C)</DewPoint>
<RelativeHumidity> 64%</RelativeHumidity>
<Pressure> 29.91 in. Hg (1013 hPa)</Pressure>
<Status>Success</Status></CurrentWeather>
Does all web services return information in this way or not? I'm quite new to them. If yes, how can I show this data in a more understandable format e.g. in textboxes?
|
|
|
|
|
Hi,
I have intel core 2 duo processor. I have two applications (wpf desktop based applications). I want to run 1st application on 1st core and 2nd application on 2nd core.
Thanks & Best Regards,
Divyesh Chapaneri
|
|
|
|
|
Have a look at the function SetProcessAffinityMask.
Greetings
Covean
|
|
|
|
|
I want to learn silver light.Can any one tell me the best approach?
|
|
|
|
|
|
In addition to the help that Mark provided, you should also make sure you have the proper tools.
You need Visual Studio 2008 as well as Expression Blend 3. EB3 is almost a must-have to quickly check your formatting, binding, and event handler settings.
|
|
|
|
|
I want to create a "Are you sure Messagbox when closing application (with never show this message again check box) using WPF and C#,
Could someone please help me out.. its very urgent.
here is the code:
WPF Code:
====================
<window x:class="Pfizer.EPRA.SmartClient.Forms.Master"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:y="clr-namespace:Pfizer.EPRA.SmartClient.Controls"
title="ePRA" windowstate="Maximized"
icon="\Images\ePRA-Icon.png"
closing<b="">="Window_Closing" >
<window.resources>
C# Code:
=======================
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
MessageBox.Show("Are you sure pop-up when closing application ");
Here, I need a MessageBox with Yes, No buttons and A checkbox with "never show this message again"
When never show this message again check box is selected by the user, this message shold not be shown again.
}
thank you very much in advance for helping me out
|
|
|
|
|
rajeberer wrote: Here, I need a MessageBox with Yes, No buttons and A checkbox with "never show this message again"
When never show this message again check box is selected by the user, this message shold not be shown again.
You need to start with a Custom Message Box[^], to which you add a checkbox. When the Show() method returns you need to store the value from the checkbox in some permanent place where your application can check in the future. I think one of the config files is probably the appropriate place to save it; there is probably an article here on CP on the subject.
|
|
|
|
|
Hi,
First of all, i had no intention of this being so long, but i needed to be thourough, so here goes.
I have been a Code Project member for so long that i feel guilty for not contributing more to this wonderful site. I recently have begun converting a Windows Form application that I wrote to WPF. I can safely say that I am really comfortable using Windows Forms because I have been programming using them for years. Before that, MFC windows apps. I'm not afraid of a challenge, and I really believe that in the long run my application will be better for making the transition to WPF. Thus, comes the issue.
My Application is a retail photo editing application that is used exclusively in our stores to sell printed photos to people These photos have been adorned with "Borders" or "Frames" that are bitmap based. Basically, I have a set of "Layers" that comprise my product. The picture, the Bitmap border, and maybe some little adorner decals and a text layer or two. Each layer has a z-order and in my WinForms app is neatly rendered by a custom control that i wrote using old style GDI+ drawimage commands and a-lot of refreshes everytime something changed.
When I say everytime something changed i mean if the user dragged the photo to a new position under the border or changed the zoom, colors, saturation etc the application would have to redraw everything reflecting the changes. Needless to say, that in order to achieve realtime rendering of all these effects, i had to use a scaling factor and cached, smaller bitmaps in order to get these things to happen in realtime. It was a real pain to keep everything straight.
Then comes along WPF and turns everything upside down for me. I now have a new rendering system that natively supports transparency and has pixel shaders for the effects such as saturation and chroma key. I have done some tests with raw bitmaps and all of these effects can be achieved realtime with no problems on todays hardware. Everythings good right?
Wrong. I have converted everything but what i call the main Workspace control. I am soooo stuck on this it isn't funny to me anymore. I have been reading everything i can get my hands on and I guess I am too close to the problem because I am hopelessly stuck trying to decide how to implement this. I have a .xml file that describes how a picture should be placed in a border. meaning the top left and size depending on the orientation and aspect ratio. This is already done from my winforms application, so i have all of the info i need. I would love to make a control that would work in my "Real world" coordinates. Just so you know. My bitmaps are 300 dpi bitmaps so they are large. like 2700x3000. I think i should be able to make some sort of composite control that is like a canvas that holds all of my "Layers" and places them at there respective coordinates and shows all of the content even though it is huge, all in a small control, say 600x600.
I can see 2 ways to do this. Do as i said, and layer image controls in some sort of layout control, but i have no idea how to translate the coordinates or does WPF handle that automagically for me? or create a control and use drawvisuals in order to make the composites. I have been trying to get something to work for days and keep running into walls. I know that this comes from a basic lack of experience in the WPF layout technologies, but i need help. I thought this topic would maybe someday make a good 1st article for me. So what do you think? Any help? Ideas? Good idea for an article?
Thank you for your time,
Bryan Wilkins
|
|
|
|