Skip to main content
Home Forums Silverlight Programming Visual Studio & Silverlight Development Tools HowTo publish Silverlight website (with web service) from VisStudio to remote server?
5 replies. Latest Post by TBink on July 23, 2008.
(0)
TBink
Member
254 points
188 Posts
07-21-2008 5:39 PM |
This will no doubt be a dumb question... but, could anyone give me a 1, 2, 3... of how to install my Silverlight website (with web services) to a remote server?
Here's what I have built so far.
1) within Visual Studio I built a Silverlight application + website Solution (from the preset)
2) added a web service "myservice.asmx.cs" to the App_Code directory of the website
3) everything works solidly running from within VisStudio using the VS 'development server
NOW... how can I (as easily as possible) install what I have working within Visual Studio to a remote webserver? This part is all new to me and I'm afraid I can be a little dense so a "for dummies" approach would be appreciated
SteveWong
Contributor
6323 points
1,281 Posts
07-22-2008 12:43 AM |
Well, I personally think it is a good practice to publish the WebService first if it is not on the Remote Server
Here, after you have published your Service, you should edit the Service Reference in your ASP.net WebSite. Edit the Service and type in the address of the published Service. Check if the clientaccesspolicy.xml is accessible in the root of the Service.
Then, it is the part of publishing the WebSite, since you have edited the Service Reference there, check if the ServiceReferences.ClientConfig has included the correct endpoint address or not. If yes, you can do the things similar to what you did with the Service
07-22-2008 5:23 PM |
Thank you. That answers most of my question. I got everything working in a test. But I now want to do this...
Is it a problem with this setting?? allowDefinition="MachineToApplication"
So, again, my Question.How can I consume my remote server based web service from within my Silverlight website running in VS2008?
My installed web service (#1 above) has a web.config that reads. Should it be changed?
---------------- the web.config installed with the web service on the remote server -------------
<
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
</
<?
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
The system.webServer section is required for running ASP.NET AJAX under Internet
Information Services 7.0. It is not necessary for previous version of IIS.
07-22-2008 11:11 PM |
[duplicated post] Sorry
If the remote Server is accessible, what you have to do differently is to type the remote server Service address rather than the local one.
In another way, if the remote Server Service is a kind of search engine like the seeqpod.com. You can create a local Service to help you to handle the communication between the remote service which only return XMLString. The local Service then pass it back to Silverlight to show on the screen in different way.
07-23-2008 6:05 PM |
the problem was solved finally by a change in clientaccesspolicy.xml
this line was added
<allow-from http-request-headers="*">