Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

I want to Upload a Silverlight Application to a Linux s... RSS

10 replies

Last post Jul 09, 2009 08:31 AM by Daní

(0)
  • mojara2009

    mojara2009

    Member

    7 Points

    24 Posts

    I want to Upload a Silverlight Application to a Linux server. How can I attach a SQL Database?

    Jul 07, 2009 03:24 AM | LINK

     Is there a way I can access sql data with my Silverlight Application on a Linux server? The server does not accept the web.config file it allows me to load the Silverlight application via the html page and xap file. So is there a way I can obtain sql data access, or do I need to use another method.

    Amen Moja Ra
    Senior Software Developer
    Imagination Everywhere, Inc.
    www.imaginationeverywhere.com
    mra@imaginationeverywhere.com
  • vinCracker

    vinCracker

    Contributor

    4059 Points

    673 Posts

    Re: I want to Upload a Silverlight Application to a Linux server. How can I attach a SQL Database?

    Jul 07, 2009 01:16 PM | LINK

    HI,

    I don't think you can host your application on Linux server and connect to SQL Server. To connect to Sql Server you need to have WebService which can not be hosted without windows environment. And if you have to do so then you need to have another Windows Server where you will host your Database and webservice. Now place correctly configured clientaccess policy and crossdomain access files to windows server and your Silverlight application from linux server can access SQL Server data via webservice.

  • mojara2009

    mojara2009

    Member

    7 Points

    24 Posts

    Re: I want to Upload a Silverlight Application to a Linux server. How can I attach a SQL Database?

    Jul 07, 2009 04:44 PM | LINK

     So if I understand you. I can have a situation where I can get a windows hosted server to host SQL databases. So I can have many instances of SQL Databases for the different website I have. Now how would I access them from a Silverlight project hosted on a Linux server? And where is the documentation to show me how to access that?

     

    Thank You For you help.

    Amen Moja Ra
    Senior Software Developer
    Imagination Everywhere, Inc.
    www.imaginationeverywhere.com
    mra@imaginationeverywhere.com
  • vinCracker

    vinCracker

    Contributor

    4059 Points

    673 Posts

    Re: Re: I want to Upload a Silverlight Application to a Linux server. How can I attach a SQL Data...

    Jul 08, 2009 07:59 AM | LINK

    You can't directly access those database hosted on windows from silverlight app hosted on Linux. You have to have a webservice on windows host to expose methods which you will access from Silverlight app. And I don't think there is any detailed document covering this topic but you can find many small pieces of this puzzle. You can try this also.

  • Daní

    Daní

    Member

    28 Points

    23 Posts

    Re: I want to Upload a Silverlight Application to a Linux server. How can I attach a SQL Database?

    Jul 08, 2009 03:22 PM | LINK

    mojara2009

     Is there a way I can access sql data with my Silverlight Application on a Linux server? The server does not accept the web.config file it allows me to load the Silverlight application via the html page and xap file. So is there a way I can obtain sql data access, or do I need to use another method.

    I imagine that you have created a Silverlight solution with an ASP.Net Web project that hosts the silverlight application. Then, maybe you have added a Silverlight-enabled WCF service to the ASP.Net project where you have implemented the SQL CRUD methos and have referenced this service in the silvelight application. If this is your scenario, you must know that a Linux server can host a silverlight application (html and xap files) but cannot host an ASP.Net application. Silverlight is client side technology, that means that each time yo'ur accesing a silverlight application on a remote server, your browser downloads the xap file and the application is executed all time on the client browser. ASP.Net is server side technolgy, that means that the application is executed on the server and is running managed code. ASP.Net needs be hosted in an IIS. If you cannot host your applicastion in a IIS (windows server) you should develop the Web Service using another technology different than .Net (maybe java) and reference this WebService in your silverlight application. Hope this helps.
  • mojara2009

    mojara2009

    Member

    7 Points

    24 Posts

    Re: I want to Upload a Silverlight Application to a Linux server. How can I attach a SQL Database?

    Jul 08, 2009 04:27 PM | LINK

     Thank you. I have realized that the problem is that the web services that Visual Studio have rely on the web.config file. So what I am going to try is using Amazon Web Services. Visual Studio's tools can automatically generate the proxy code for a Microsoft .NET application to call Amazon's SOAP services.Do you think this will work?

    Amen Moja Ra
    Senior Software Developer
    Imagination Everywhere, Inc.
    www.imaginationeverywhere.com
    mra@imaginationeverywhere.com
  • Daní

    Daní

    Member

    28 Points

    23 Posts

    Re: I want to Upload a Silverlight Application to a Linux server. How can I attach a SQL Database?

    Jul 08, 2009 04:57 PM | LINK

    mojara2009

     Thank you. I have realized that the problem is that the web services that Visual Studio have rely on the web.config file. So what I am going to try is using Amazon Web Services. Visual Studio's tools can automatically generate the proxy code for a Microsoft .NET application to call Amazon's SOAP services.Do you think this will work?

    Well the problem is not only Web.config file, maybe the linux server cannot not map it in a MIME type, the problem is that ASP.Net web services must be hosted in a IIS. I don't know much about Amazon Web Service, but I cannot imagine how they can access your SQL Database.
  • mojara2009

    mojara2009

    Member

    7 Points

    24 Posts

    Re: I want to Upload a Silverlight Application to a Linux server. How can I attach a SQL Database?

    Jul 08, 2009 05:05 PM | LINK

     On the Amazon Web Services site. They specifically say how I can call their service from Silverlight. See I know I can host the actual database on my server but I just cannot access it. So the service will help me access it. And MSDN provides documentation on how to do that take a look at the following link:

      http://msdn.microsoft.com/en-us/library/cc197937(VS.95).aspx

    Am I wrong?

    Amen Moja Ra
    Senior Software Developer
    Imagination Everywhere, Inc.
    www.imaginationeverywhere.com
    mra@imaginationeverywhere.com
  • Daní

    Daní

    Member

    28 Points

    23 Posts

    Re: Re: I want to Upload a Silverlight Application to a Linux server. How can I attach a SQL Data...

    Jul 08, 2009 05:17 PM | LINK

    I'm not sure what do you mean. As I said before, I don't know much abow Amazon Web Services (AWS), I think they are a sort of Web Services on the cloud. What I mean is that if your SQL Database must be in your server I don't know how the WAS will be able to reach your database.
  • mojara2009

    mojara2009

    Member

    7 Points

    24 Posts

    Re: Re: I want to Upload a Silverlight Application to a Linux server. How can I attach a SQL Data...

    Jul 09, 2009 12:01 AM | LINK

     What I was saying that if I can make the AWS a part of my silverlight application I can access the SQL Database  Visual Studio's tools can automatically generate the proxy code for the  Microsoft Silverlight application to call Amazon's SOAP service

    Amen Moja Ra
    Senior Software Developer
    Imagination Everywhere, Inc.
    www.imaginationeverywhere.com
    mra@imaginationeverywhere.com