home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Talk
Exception is thrown when trying to connect to tv-server using .Net
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="dhanjel" data-source="post: 312153" data-attributes="member: 13960"><p>I'm trying to connect and access the tv-server remotely using this simple piece of code:</p><p>[code]</p><p>try</p><p> {</p><p> </p><p> String provider;</p><p> String connectionString;</p><p> RemoteControl.Instance.GetDatabaseConnectionString(out connectionString, out provider);</p><p> ProviderFactory.SetDefaultProviderConnectionString(connectionString);</p><p> }</p><p> catch (Exception ex)</p><p> {</p><p> MessageBox.Show("Failed to connect to host.\r\n\r\n" + ex.Message);</p><p> return;</p><p> }</p><p></p><p> IList channels = Channel.ListAll();</p><p> for (int i = 0; i < channels.Count; ++i)</p><p> {</p><p> comboBoxChannels.Items.Add(channels[i]);</p><p> }</p><p>[/code]</p><p></p><p>But it throws an error, any ideas what I might have missed?</p></blockquote><p></p>
[QUOTE="dhanjel, post: 312153, member: 13960"] I'm trying to connect and access the tv-server remotely using this simple piece of code: [code] try { String provider; String connectionString; RemoteControl.Instance.GetDatabaseConnectionString(out connectionString, out provider); ProviderFactory.SetDefaultProviderConnectionString(connectionString); } catch (Exception ex) { MessageBox.Show("Failed to connect to host.\r\n\r\n" + ex.Message); return; } IList channels = Channel.ListAll(); for (int i = 0; i < channels.Count; ++i) { comboBoxChannels.Items.Add(channels[i]); } [/code] But it throws an error, any ideas what I might have missed? [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Talk
Exception is thrown when trying to connect to tv-server using .Net
Contact us
RSS
Top
Bottom