|
Ravi - answering questions with questions here I'm afraid. What do you mean by self-hosted?
|
|
|
|
|
I mean the WCF service runs in a Windows service or console/WinForms app using an instance of a ServiceHost class, instead of running as a .svc in IIS. Thanks for any help you can provide!
/ravi
|
|
|
|
|
Figured it out - CP article coming soon.
/ravi
|
|
|
|
|
Ravi
I suspect you may have the key to my problem as well. I'm running a C# .NET web service under IIS with an accessible ClientAccessPolicy file too. I can call the service from an SL2 app running on the same machine and another machine running on the same intranet but not from an apparently different domain.
Thoughts?
|
|
|
|
|
Ugh.
Are you able to add a service reference (from scratch) by running VS2008 on a PC in the different domain? IOW, SL aside, are you even able to see the service from the PC on the different domain?
/ravi
|
|
|
|
|
Hello Ravi
I can see the service description page from the external site (1 below).
It all gets a little complex as the only way to test this is to use a GotoMyPc connection (essentially Citrix) to a machine 300 miles away in London and browse back to my desktop here!
Here are 3 URLs - youll need SL2 RTW for #2 to work. What do you see?
1. Raw service: http://ubik8.dyndns.org/novaserver/service1.asmx[^]
2. SL2 app which calls the above: http://ubik8.dyndns.org/novaclient/default.html[^] Just press the Connect button.
3. and the policy file ... http://ubik8.dyndns.org/novaclient/clientaccesspolicy.xml[^]
BTW on the remote machine I used IE7 with the WDH extension added. It gives no clues. Why is this so complicated .. I'd have expected the SL2 <-> IIS Web Service to be an extremely common use case.
Thx
Jerry
|
|
|
|
|
Jerry Evans wrote: Why is this so complicated ..
My thoughts exactly.
I can see your config file in my browser - it looks good. However, I think it's the SL client that's impeding access and not your firewall or webserver setup; I don't see the app trying to access CAP.xml.
/ravi
|
|
|
|
|
Hi Jerry, any success?
/ravi
|
|
|
|
|
Does anyone know how to listen to a custom static event in a .NET control from silverlight?
I cant add the reference to the .NET dll as VS2008 complains about it not being a silverlight assembly.
Anyone got an ideas how i'd get around this?
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
You can only reference DLLs compiled in SL from SL projects. So, you will need to build the DLL you trying to reference in SL. SL contains a subset of .net (as well a subset of WPF).
|
|
|
|
|
We are developing W PF application which uses .net framework 3.0 for compilation.We are not getting error in runtime or during compiling/debugging. But When we deploy the same application in the system in which visual studio 2008 is not installed we get the following error occurs when navigation takes from one page to other page.
system.windows.xamlparseexception
cannot create instance of "Page1" in defined assembly.
exception has been thrown by target of an invocation
error in markup file 'page1.xaml'
system.reflection.targetinvocation exception
exception has been thrown by target of an invocation
system.ArguementException:Arguement Prompt cannot be converted to type string
could anyone please help us asap?
|
|
|
|
|
dwarakk wrote: Prompt cannot be converted to type string
This is the key to your problem.
I'm not sure what Prompt is.
Would it make more sense to load .NET 3.5 SP1 on your development machine and target machine? Eliminate issues like this?
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Hi guys.
In SilverLight we can use C#.NET or VB.NET for programming or we should use Javascript ?
Many thanks in advance
|
|
|
|
|
If you're using Silverlight 2, you can use C# or VB.NET. If it's pre version 2, you had to use JavaScript.
|
|
|
|
|
Thanks Pete. You truly are an expert.
Pete O'Hanlon wrote: If you're using Silverlight 2, you can use C# or VB.NET. If it's pre version 2, you had to use JavaScript.
So if we use C# or VB, it will be Server side ? yes ?
|
|
|
|
|
Mohammad Dayyan wrote: So if we use C# or VB, it will be Server side ? yes ?
Well yes and no. The beauty about Silverlight 2 is it runs a low footprint CLR in the browser.
|
|
|
|
|
You can use either C# or VB.NET. Pick which ever one suits you best
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
But in Silverlight1 I couldn't use C# !!!
|
|
|
|
|
Mohammad Dayyan wrote: Silverlight1 I couldn't use C#
Which is why I didn't really look at Silverlight until Silverlight2. Are you developing in Silverlight1? If so, you should move to Silverlight2
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
I'm building a proof of concept using VS 2008 and the very latest Silverlight 2.
What do I need to do to deploy to a commercial host? DiscountASP.net in this case. Is it simply a case of copying the contents of \release onto the server? Where is the FAQ on this topic - seems to be AWOL
Any help appreciated.
Thx++
|
|
|
|
|
I'd be interested in how that works too. There isn't anything useful in the help file about it...I'm thinking that it's the same as deploying an ASP.Net based site, so you might look from that perspective.
I did find one potential 'gotcha' about mime-types that I didn't know about here[^]
|
|
|
|
|
Hello David
Thanks - the addition of a 'publish' option in VS 2008 would have been a really good idea I think!
I hope I've persuaded the DiscountASP.Net people to write up a KB article about it.
|
|
|
|
|
Totally agree...feel free to share your hard earned knowledge here in the Silverlight forum when you get it
|
|
|
|
|
Jerry Evans wrote: I hope I've persuaded the DiscountASP.Net people to write up a KB article about it.
You could always write one, based on your experience with Silverlight and commercial hosting, and post it here on CP.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
I managed to get a test Silverlight 2.0 Application working on my local copy of IIS 6.0/WinXP Pro...some things to know:
- It seems to work best if debugging is turned off in Web.Config, to change it, from VS2008 menus, go Website-->ASP.Net Configuration...that brings up an add-on for managing the security settings etc for your project.
- Mime-types: I found references for 2 mime types that need to be added in your IIS Control Panel:
- .xaml = application/xaml+xml
- .xap = application/x-silverlight
...see here[^] for the .XAML and here[^] for the .XAP This[^] is another reference to the mime type issue. If you add these yourself, make sure not to forget the period in front of the extension, or it doesn't work eg: '.xap' not 'xap'
- .Net 3.0 and 3.5 in Silverlight 2.0 still use the ASP.Net 2.0 stuff in IIS, make sure that your virtual directory under IIS is set to use ASP.Net 2.0 ...or your hosting provider has it set.
- When I created my Silverlight Project, I included an 'ASP.Net Website' for testing...I copy the entire contents from that to my IIS virtual folder...if I make changes and rebuild, I recopy the whole thing. The other project which is the actual Silverlight project gets compiled into a *.XAP file which is copied to the 'ClientBin' folder of the 'ASP.Net Website' project, so you don't need any files from the actual Silverlight project for deployment. So, if my project was called 'SilverlightApplication', you would wind up with a 'SilverlightApplication.Web' folder...copy the entire contents of that to your IIS folder...the files and folders were:
App_Data (folder)
Bin (folder)
ClientBin (folder with .XAP file)
Default.aspx
Default.aspx.cs
Silverlight.js
SilverlightApplicationTestPage.aspx
SilverlightApplicationTestPage.html
web.config
To load the site from a web browser, I put http://localhost/myvirtualfolder/SilverlightApplicationTestPage.html (or the aspx file).
I'm sure you can name your own files what you want etc...this is just a starting point to get all the pieces working.
|
|
|
|