|
I don't think you understand... I AM seeing "localhost", but nobody else is. I'm not concerned about it when it's on a web server, I'm only concerned about it when it's running on my local box.
.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 think I got the actual problem. It is not related to webserver stuffs. In your local devbox also you can come to this situation. If you run your Silverlight application from IIS you will always get the host name. If you execute the HTML file of your Silverlight application by double clicking on it, you will see it as empty string. Now come to the point of Visual Studio. There seems to be two option. One, if you run the application hosted on IIS or Visual Studio's inbuilt server you will find the value as the name of the host (generally localhost). In case, you don't have any web application project or your startup project is not your Web application project, you will see the value as empty string.
As I mentioned, please check the URL. If it is pointing to http://localhost/blahblah it will show proper value (in your case) and if it is pointing to some local drive path (i.e. C:\Documents\blahblah\blahblah.html etc.) it will show as empty string (in your team members case).
Please confirm that one first.
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
|
|
|
|
|
KunalChowdhury wrote: As I mentioned, please check the URL
Check *what* url?
In the clientconfig? That's set to localhost. We're running from the IDE, so it's using the internal server.
.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: Check *what* url?
I mean to say here the URL in which you are running. Once run from your Visual Studio check in the browser address bar. If you don't have any web application added into the Silverlight solution or your Silverlight project itself set as a Startup Project, you will see this behavior. Just check the URL in your PC and also in your team mates PC (where you are seeing empty string). I think those are different and one is pointing to "localhost" (in your case) and the other is pointing to "physical path" (in your team mates case).
Let me know, what's the result.
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
|
|
|
|
|
Any update on your problem?
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
|
|
|
|
|
We implemented a workaround.
.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
|
|
|
|
|
Following is the exception that occurs at client side(Silverlight) when we add reference of WCF service created through WCF Software Factory (tool by microsoft).
“An error occurred while trying to make a request to URI 'http://localhost:58159/WssWCFService.Host/WssService.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.”
I have already put the CrossDomain.xml and clientaccesspolicy.xml file at root location of WCF hosting project but still error exists.
Note: If we create simple WCF service without using WCF software factory tool then that works fine with existing silverlight application.
Any suggestions from anyone who has faced this type of problem will be appreciable
|
|
|
|
|
Dear All,
Here is my combobox in Silverlight
<br />
<ComboBox x:Name="drpUserList" Width="200" Height="30" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left" DisplayMemberPath="FullName" SelectedValuePath="UserNumber"><br />
and i use
<br />
drpUserList.ItemsSource = e.Result;<br />
To fill my combobox, it works fine and will file the combobox with values but i want the selectedvalue which is my userid for selected user from dropdown. How could i get the value.
|
|
|
|
|
Have a look at this post[^].
|
|
|
|
|
You can directly bind from XAML like this,
SelectedValue="{Binding UserID}"
|
|
|
|
|
Do the following:
var selectedUser = (from user in usersList
where user.UserId.Equals(selectedUserId)
select user).FirstOrDefault();
drpUserList.SelectedItem = selectedUser;
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
|
|
|
|
|
I have a custom user control loaded in the main window of the application. Inside of the custom user control I have a list box.
If the mouse left click is held down, I want the user to be able to drag the main window to a different location on the screen. Is it possible to handle this event inside of the listbox? If so, how can I go about doing it?
|
|
|
|
|
Try this for a starting point ...
private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
this.DragMove();
}
|
|
|
|
|
There is a problem with MouseEvents in ListBox - if you click on ListBoxItem, event will be handled and your application will not get event. Possible solutions are useing preview event or using AddHandler for handled events. See this article for sample code: How to Attach to MouseDown Event on ListBox[^]
|
|
|
|
|
hello,
I'm new in Silverlight Development. I want to know how to include "System.Data.SQLClient" in Silverlight application.
In other words, I want to use SQlConnection in Silverlight application
.
Please help
|
|
|
|
|
vinci007 wrote: System.Data.SQLClient
This is not part of the Silverlight runtime.
You can user either Web services or the Entity framework to access data.
|
|
|
|
|
It's simply not possible. Silverlight apps can't connect directly to a database. You have to use a web service (or RIA services).
.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
|
|
|
|
|
you can use the ADO.net DataModel to mappe your Database or the LinqToSQl(dbml)
then you create a WCF for (ADO.Net DataModel) and a web serice for LinqToSql.
|
|
|
|
|
I already had v3 (Nov 2009) installed, and when I added a referenece to my app, everything was fine (the namespaces showed up). So then I installed v4 (Apr 2010), and I didn't see any namespaces for v4 when I tried to change the references.
To try to fix it, I uninstalled both V3 and V4 and then reinstalled v4, but I still don't get the v4 namespaces (or any namespaces for that matter since I uniinstalled v3).
What do I have to do to fix this? Anyone?
.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 believe the Silverlight toolkit v4 supports only SL4.
Are you using SL4?
|
|
|
|
|
Yeah, I saw that, but that Delay guy (that's his last name) presented a demo using that version that works on our SL3 systems. I gave up and went back to the prior version (Nov 2009).
I honestly don't understand why they dropped support for SL3 - more often than not, I really hate Microsoft.
.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: presented a demo using that version that works on our SL3 systems
I'd be very interested to know how he did that.
|
|
|
|
|
I ran out of time to be really interested. I had to revert back to v3...
At home, I have SL4 so it's not an issue.
.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
|
|
|
|
|
Ran into something similar - edit your project file and look for a line like:
<Import Condition="$(EnableSilverlightToolkitExtensions)=='true'" Project="$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SilverlightToolkit\Tools\v3.0)Microsoft.Silverlight.Toolkit.Build.targets" />
if it's there replace with two lines like:
<Import Condition="$(SilverlightVersion)=='v3.0'" Project="$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SilverlightToolkit\Tools\v3.0)Microsoft.Silverlight.Toolkit.Build.targets" />
<Import Condition="$(SilverlightVersion)=='v4.0'" Project="$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SilverlightToolkit\Tools\v4.0)Microsoft.Silverlight.Toolkit.Build.targets" />
|
|
|
|
|
Hi all,
I have a combo box in my WPF application that displays a confirmation dialog (MessageBox.Show() ) when certain items are clicked.
Ie. I have the following options
- Pending (default selection)
- Completed
- For Review
When the "For Review" option is selected, I display the confirmation dialog.
My problem is that the combo box isn't updated prior to the dialog being displayed. So, even though "For Review" was selected and the Selection_Changed event is firing, the combo box shows "Pending" while the dialog is being displayed.
I've tried some DoEvents loops and even tried changing the combo box selection programatically prior to showing the dialog, all to no avail.
Any ideas?
|
|
|
|