none
Publish and Hosting my silverlight Project

    Question

  • Hallo,

    I am beginner with Silverlight.

    I am working with Bingmaps and database and..

    How i can publish and deploy and host my silverlight project.

    Thanks...

    Wednesday, May 05, 2010 5:17 AM

All replies

  • I found the best way was to publish to a local directory, and then upload this to the server.  Once on the server, I amended the web.config file so that all of the relevant ConnectionStrings etc. were pointing at the production databases etc. etc.

    Wednesday, May 05, 2010 5:59 AM
  • can you plz an exemple for me giving , because i dont know how i can that doing ...

    Wednesday, May 05, 2010 6:32 AM
  •  And shall I all endpoints in Servicereference changing ???

    Wednesday, May 05, 2010 6:34 AM
  • Yes, you will need to change all service references etc. as well.

    Wednesday, May 05, 2010 6:44 AM
  •  First, Thanks for your Help.

    Sorry but i cannot good speek english Sad

    I did everything , but now i cannot the database acccess Sad

    I dont know why ?

    i have the config file also changed but that will not do

    what is your opinion ??

    Wednesday, May 05, 2010 8:48 AM

  • Wednesday, May 05, 2010 8:52 AM
  • Check your ConnectionString.  If you are using Integrated Security, you will need to change this to a user that has access to the database.

    Wednesday, May 05, 2010 9:40 AM
  •  I do not have integrated security.

    I have a username and password .

    Wednesday, May 05, 2010 9:46 AM
  •  that is my web.config

     

     

     

     

    <?xml version="1.0"?>
    <configuration>

      <connectionStrings>
        <add name="PosterPointConnectionString" connectionString="Data Source=localhost;Initial Catalog= databasename;Persist Security Info=True;User ID=dsdfsdfd;Password=sdfsdfsdff;"
            providerName="System.Data.SqlClient" />
      </connectionStrings>
      <system.web>
        <compilation debug="true" targetFramework="4.0" />
      </system.web>

      <!-- Mail START -->
      <system.net>
        <mailSettings>
          <smtp>
            <network host="smtp.gmail.com" port="587" userName="email" password=""/>
          </smtp>
        </mailSettings>
      </system.net>
      <!-- Mail ENDE -->

      <system.webServer>
        <modules runAllManagedModulesForAllRequests="true"/>
      </system.webServer>

      <system.serviceModel>
        <bindings/>

        <client/>
        <behaviors>
          <serviceBehaviors>
            <behavior name="PosterPoint.Web.PosterPointServiceBehavior">
              <serviceMetadata httpGetEnabled="true" />
              <serviceDebug includeExceptionDetailInFaults="true" />
              <dataContractSerializer maxItemsInObjectGraph="1000000"/>
            </behavior>
          </serviceBehaviors>
        </behaviors>

     
       
        <services>
          <service behaviorConfiguration="PosterPoint.Web.PosterPointServiceBehavior" name="PosterPoint.Web.PosterPointService">
            <endpoint address="" binding="basicHttpBinding" contract="PosterPoint.Web.IPosterPointService">
              <identity>
                <dns value="databasename"/>
              </identity>
            </endpoint>
          </service>
        </services>


      </system.serviceModel>
    </configuration>

    Wednesday, May 05, 2010 9:49 AM
  • Your DataSource is pointing to localhost.  You need to change this to the production database server.

    Wednesday, May 05, 2010 10:02 AM
  • I chaged it but always is the same :(

    Wednesday, May 05, 2010 10:13 AM
  • Does your Web Server have access to the Database Server?

    Wednesday, May 05, 2010 10:15 AM
  • yes of course ...

    Wednesday, May 05, 2010 10:22 AM
  •  that is end point in serviceReferences.ClientConfig

     

    <endpoint address="http://localhost:50079/OnAir/PosterPointService.svc"
             
                   binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IPosterPointService1"
                   contract="PosterPointService.IPosterPointService" name="BasicHttpBinding_IPosterPointService" />

     

    OnAir  >> folder in root

     

     

    Wednesday, May 05, 2010 10:24 AM
  • And you have changed that from localhost to the production server where the service is held?

    Wednesday, May 05, 2010 10:56 AM
  •  <endpoint address="http://localhost:50079/OnAir/PosterPointService.svc"
             
                   binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IPosterPointService1"
                   contract="PosterPointService.IPosterPointService" name="BasicHttpBinding_IPosterPointService" />

     

    Is the Address in the  endpoint True ??

     

    And can you tell me how i write the address in endpoint Please ??

    Thursday, May 06, 2010 2:50 AM
  • You just need to change the endpoint from http://localhost:50079/etc.... to http://myproductionserver/etc...

    Thursday, May 06, 2010 2:52 AM
  • i did a test application , for test the connection on database but the same problem

     

    ServiceReferences.ClientConfig >>>

     <configuration>
        <system.serviceModel>
            <bindings>
                <basicHttpBinding>
                    <binding name="BasicHttpBinding_IService1" maxBufferSize="2147483647"
                        maxReceivedMessageSize="2147483647">
                        <security mode="None" />
                    </binding>
                </basicHttpBinding>
            </bindings>
            <client>
                <endpoint address="http://71.75.44.141/OnAir/Service1.svc" binding="basicHttpBinding"
                    bindingConfiguration="BasicHttpBinding_IService1" contract="ServiceReference1.IService1"
                    name="BasicHttpBinding_IService1" />
            </client>
        </system.serviceModel>
    </configuration>

     Web.config >>>

    <?xml version="1.0"?>

    <!--
      For more information on how to configure your ASP.NET application, please visit
      http://go.microsoft.com/fwlink/?LinkId=169433
      -->

    <configuration>
        <connectionStrings>
            <add name="PosterPointConnectionString" connectionString="Data Source=Server;Initial Catalog=database;User ID=User;Password=pass"
                providerName="System.Data.SqlClient" />
        </connectionStrings>
        <system.web>
            <compilation debug="true" targetFramework="4.0" />
        </system.web>

        <system.serviceModel>
            <behaviors>
                <serviceBehaviors>
                    <behavior name="TestDatabase.Web.Service1Behavior">
                        <serviceMetadata httpGetEnabled="true" />
                        <serviceDebug includeExceptionDetailInFaults="true" />
                      <dataContractSerializer maxItemsInObjectGraph="1000000"/>
                    </behavior>
                </serviceBehaviors>
            </behaviors>
          <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />


          <services>
            <service behaviorConfiguration="TestDatabase.Web.Service1Behavior" name="TestDatabase.Web.Service1">
              <endpoint address="" binding="basicHttpBinding" contract="TestDatabase.Web.IService1">
                <identity>
                 
                </identity>
              </endpoint>
            </service>
          </services>
         
         
         
        </system.serviceModel>
    </configuration>

     

    can you help meeee Sad


     

     

     

    Thursday, May 06, 2010 4:00 AM
  •  I Dont know where is the problem in my Codeee ...

    Thursday, May 06, 2010 4:32 AM
  • You may need a crossdomain policy now that you are in a live environment.  Please take a look at this post:

    http://stackoverflow.com/questions/213251/can-someone-post-a-well-formed-crossdomain-xml-sample

    and implement in the route directory of your service and website.

    Thursday, May 06, 2010 4:34 AM
  •  i have a XML file create >>> clientaccesspolicy.xml

     >>> that is the code

    <?xml version="1.0" ?>
    <cross-domain-policy>
     
    <site-control permitted-cross-domain-policies="master-only"/>
     
    <allow-access-from domain="*"/>
     
    <allow-http-request-headers-from domain="*" headers="*"/>
    </cross-domain-policy>
     
     
    But the same problem come ..
     
    can you tell me what I write in this xml file 

     

    Thursday, May 06, 2010 5:08 AM
  • Your XML is fine.  Install an application called "Fiddler 2" and this will tell you more information about what is happening between your Test application and your database.

    Have you removed the link to your Test application as I was going to test it here?

    Thursday, May 06, 2010 5:11 AM

  • Thursday, May 06, 2010 5:24 AM
  • Right, I get a 405 error: Method not allowed.

    <h2>405 - Für den Zugriff auf diese Seite verwendetes HTTP-Verb ist nicht zulässig.</h2>

    <h3>Die gesuchte Seite kann nicht angezeigt werden, da für den Zugriff eine ungültige Methode (HTTP-Verb) verwendet wurde.</h3>

    Thursday, May 06, 2010 5:34 AM
  • Here is a useful Microsoft page with fixes:

    http://support.microsoft.com/kb/216493

    Thursday, May 06, 2010 5:35 AM
  •  No Solutions Sad

    Thursday, May 06, 2010 6:11 AM

  •  

    Thursday, May 06, 2010 7:31 AM
  • Have you installed Fiddler to do some more diagnosis?

    Thursday, May 06, 2010 9:45 AM
  •  I did that .

    my error is >>>

     

    Debuggingressourcen strings are not available.

     

    have you an idea ??

    Friday, May 07, 2010 5:00 AM
  • Can you post the error?

    Friday, May 07, 2010 5:42 AM
  •  yes but she is in German >>

     

    Details zum Fehler auf der Webseite

    Benutzer-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB6.4; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
    Zeitstempel: Fri, 7 May 2010 09:47:59 UTC


    Meldung: Unhandled Error in Silverlight Application [Async_ExceptionOccurred]
    Argumente:
    Debuggingressourcen-Zeichenfolgen sind nicht verfügbar. Oft enthalten der Schlüssel und die Argumente genügend Informationen zur Diagnose des Problems. Weitere Informationen erhalten Sie unter http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.50401.0&File=System.dll&Key=Async_ExceptionOccurred   bei System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
       bei TestDatabase.ServiceReference1.getAllUsersCompletedEventArgs.get_Result()
       bei TestDatabase.MainPage.s_getAllUsersCompleted(Object sender, getAllUsersCompletedEventArgs e)
       bei TestDatabase.ServiceReference1.Service1Client.OngetAllUsersCompleted(Object state)
    Zeile: 1
    Zeichen: 1
    Code: 0
    URI: http://localhost/onair/TestDatabaseTestPage.html

    Thanks for your Help

    Friday, May 07, 2010 5:48 AM
  •  

    Friday, May 07, 2010 6:18 AM
  • Hi,

    If you are hosting Silverlight application then following things you must check:

    1) MIME Type added in your IIS.

    2) Client Policy running fine with localhost

    3) If you are using LinqtoSqlClasses then make sure it serialization property is set to UniDirectional.

    4) In Client config file replace localhost with your server IP thats where your are hosting your Silverlight Application.

    Check this:

    http://learn.iis.net/

    http://forums.silverlight.net/forums/p/41534/116614.aspx

    HTH Smile

    Friday, May 07, 2010 6:29 AM
  • Thanks varshavmane.

    I did all but always the same error.

    I cannot access the database and i cannot look my svc file in xml

    i dont know ...

     

    Friday, May 07, 2010 6:40 AM
  • Can you please post your SVC code or sample project?

    Friday, May 07, 2010 6:49 AM
  •  How i post a simple project ??

    Friday, May 07, 2010 6:57 AM
  • Post it on skydrive.

    Friday, May 07, 2010 7:07 AM
  •  http://cid-67bd7992f9ba2eb0.skydrive.live.com/browse.aspx/Application?uc=1&nl=1

    Thanks for your help

    Ali

    Friday, May 07, 2010 7:13 AM
  •  Details zum Fehler auf der Webseite

    Benutzer-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB6.4; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
    Zeitstempel: Mon, 10 May 2010 07:03:03 UTC


    Meldung: Unhandled Error in Silverlight Application [Async_ExceptionOccurred]
    Argumente:
    Debuggingressourcen-Zeichenfolgen sind nicht verfügbar. Oft enthalten der Schlüssel und die Argumente genügend Informationen zur Diagnose des Problems. Weitere Informationen erhalten Sie unter http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.50401.0&File=System.dll&Key=Async_ExceptionOccurred   bei System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
       bei TestDatabase.ServiceReference1.getAllUsersCompletedEventArgs.get_Result()
       bei TestDatabase.MainPage.s_getAllUsersCompleted(Object sender, getAllUsersCompletedEventArgs e)
       bei TestDatabase.ServiceReference1.Service1Client.OngetAllUsersCompleted(Object state)
    Zeile: 1
    Zeichen: 1
    Code: 0

     

    Helpppp Meeeeee !!!

    Monday, May 10, 2010 3:04 AM
  •  In English >>>

     

    Details about the error on the website

    User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB6.4; SLCC2;. NET CLR 2.0.50727;. NET CLR 3.5.30729;. NET CLR 3.0.30729; . NET4.0C;. NET4.0E)
    Timestamp: Mon, 10 May 2010 10:37:45 UTC


    Message: Unhandled Error in Silverlight Application [Async_ExceptionOccurred]
    Arguments:
    Debuggingressourcen strings are not available. Often the key and the arguments contained enough information to diagnose the problem. For more information, visit http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.50401.0&File=System.dll&Key=Async_ExceptionOccurred at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary ()
       
    at TestDatabase.ServiceReference1.getAllUsersCompletedEventArgs.get_Result ()
       
    at TestDatabase.MainPage.s_getAllUsersCompleted (Object sender, getAllUsersCompletedEventArgs e)
       
    at TestDatabase.ServiceReference1.Service1Client.OngetAllUsersCompleted (Object state)
    Line: 1
    Char: 1
    Code: 0

    Monday, May 10, 2010 6:39 AM
  • I have my error resolved !!! Big Smile

    WCF was uninstalled !!

    Thanks for all !!

    Monday, May 10, 2010 7:46 AM
  • Don't forget to mark as answer to help others :o)

    Monday, May 10, 2010 8:36 AM
  •  Yes Of Courseeeee ... Wink

    Monday, May 10, 2010 11:17 AM
  •  Smile Now I have a new Problem.

    Why when I get from Database a big Data, I take a error.

    How Ican take from Database a big Data ??

    Shall I something in web.config writing ??

     Thanks.

    Tuesday, May 11, 2010 2:52 AM
  • Check your Command Timeout value.  It may be timing out that is causing your problem.

    Alternatively, if you are paging data, you don't need to pull back large amounts of data as you can set the LoadSize and PageSize in order to browse your information.  I'm using this technique as retrieving 14000 records over a slow broadband connection takes a couple of minutes.  So, by utilising the LoadSize and PageSize, I select 1000 records split over 5 pages.  Works a charm.

    Tuesday, May 11, 2010 4:33 AM
  • Hi everybody,

    I dont know why icannot open my silverlight website.My website opened normaly in my work , but from another computer cannot open !!

    Why ??

    Thank you very much !!!

    Wednesday, May 12, 2010 2:15 PM
  • I got this error message:

    Webpage error details

    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E)
    Timestamp: Thu, 13 May 2010 05:24:04 UTC


    Message: Unhandled Error in Silverlight Application
    Code: 2007   
    Category: ParserError      
    Message: Unknown element: OutOfBrowserSettings.SecuritySettings.    
    File:     
    Line: 8    
    Position: 45    

    Line: 54
    Char: 13
    Code: 0
    URI: http://78.46.67.106/onair/posterpointtestpage.html

     

    Thursday, May 13, 2010 1:24 AM
  • why when there is no silverlight 4,the user get this error when he open my website ??
     
    why it does not immediately ask whether the user will silverlight 4 installing or not ??
     
    why with silverlight 3 it ask but with silverlight 4 NOT !! ???
     
    Thanks for help !!
    Monday, May 17, 2010 5:02 AM
  • Do you have the Silverlight.js file in your website?

    Monday, May 17, 2010 5:35 AM
  •  Thanks for your Help But I have it done !! Smile

    Wednesday, May 19, 2010 7:51 AM
  • And it is still not checking?

    Wednesday, May 19, 2010 9:36 AM