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
Quality Assurance
Bugreports
Archive
No connection could be made because the target machine actively refused it
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="Snoopy87" data-source="post: 1119685" data-attributes="member: 128461"><p>Hi <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p></p><p>It's not my PC. It's a clean Windows 7 installation. No additional security software is installed.</p><p></p><p>This is my code:</p><p></p><p>[CODE=C#] </p><p> string initUrl = string.Format("http://{0}:{3}/MPExtended/StreamingService/json/InitStream?type=12&provider=0&itemId={1}&clientDescription=Test&identifier={2}", settings.IP, settings.Channel, identifier, settings.Port);</p><p> </p><p> string activeTvCards = string.Format("http://{0}:{1}/MPExtended/TVAccessService/json/GetActiveCards", settings.IP, settings.Port);</p><p> </p><p></p><p> try</p><p> {</p><p> var wr = System.Net.HttpWebRequest.Create(initUrl);</p><p> </p><p> var r = wr.GetResponse();</p><p></p><p> wr = System.Net.HttpWebRequest.Create(activeTvCards);</p><p> </p><p> r = wr.GetResponse();</p><p></p><p> string jsonString = string.Empty;</p><p> using (var stream = new StreamReader(r.GetResponseStream()))</p><p> {</p><p> jsonString = stream.ReadToEnd();</p><p> }</p><p> var jsonObject = Newtonsoft.Json.Linq.JArray.Parse(jsonString);</p><p> var streamingUrl = jsonObject.Where(j => j["ChannelId"].ToString() == settings.Channel.ToString() && j["User"]["Name"].ToString() == "mpextended-" + identifier).Select(u => u["RTSPUrl"].ToString()).FirstOrDefault();</p><p></p><p></p><p> mediaElement.Source = new Uri(streamingUrl);</p><p> mediaElement.Play();</p><p> }</p><p> catch</p><p> {</p><p> Stop();</p><p> throw;</p><p> }</p><p>[/CODE]</p><p></p><p>And after a few minutes I call:</p><p></p><p>[CODE=C#] </p><p> mediaElement.Stop();</p><p> mediaElement.Source = null;</p><p> mediaElement.Close();</p><p> </p><p> string endUrl = string.Format("[URL]http://{0}:{2}/MPExtended/StreamingService/json/FinishStream?identifier={1[/URL]}", settings.IP, identifier, settings.Port);</p><p> var wr = System.Net.HttpWebRequest.Create(endUrl);</p><p> </p><p> wr.GetResponse();</p><p>[/CODE]</p><p></p><p>Then after a few minutes I call the first code (with a new MediaElement), and so on...</p><p></p><p>This is working great for hours without any issues. But on that machine (which was set up new a few times, and also we tried different tv cards) after some time it is not working anymore and MPExtended is logging the above error and TVService is not running anymore. No other application is running and no user is interacting with the PC.</p><p></p><p>Best regards,</p><p>Sascha</p></blockquote><p></p>
[QUOTE="Snoopy87, post: 1119685, member: 128461"] Hi :-) It's not my PC. It's a clean Windows 7 installation. No additional security software is installed. This is my code: [CODE=C#] string initUrl = string.Format("http://{0}:{3}/MPExtended/StreamingService/json/InitStream?type=12&provider=0&itemId={1}&clientDescription=Test&identifier={2}", settings.IP, settings.Channel, identifier, settings.Port); string activeTvCards = string.Format("http://{0}:{1}/MPExtended/TVAccessService/json/GetActiveCards", settings.IP, settings.Port); try { var wr = System.Net.HttpWebRequest.Create(initUrl); var r = wr.GetResponse(); wr = System.Net.HttpWebRequest.Create(activeTvCards); r = wr.GetResponse(); string jsonString = string.Empty; using (var stream = new StreamReader(r.GetResponseStream())) { jsonString = stream.ReadToEnd(); } var jsonObject = Newtonsoft.Json.Linq.JArray.Parse(jsonString); var streamingUrl = jsonObject.Where(j => j["ChannelId"].ToString() == settings.Channel.ToString() && j["User"]["Name"].ToString() == "mpextended-" + identifier).Select(u => u["RTSPUrl"].ToString()).FirstOrDefault(); mediaElement.Source = new Uri(streamingUrl); mediaElement.Play(); } catch { Stop(); throw; } [/CODE] And after a few minutes I call: [CODE=C#] mediaElement.Stop(); mediaElement.Source = null; mediaElement.Close(); string endUrl = string.Format("[URL]http://{0}:{2}/MPExtended/StreamingService/json/FinishStream?identifier={1[/URL]}", settings.IP, identifier, settings.Port); var wr = System.Net.HttpWebRequest.Create(endUrl); wr.GetResponse(); [/CODE] Then after a few minutes I call the first code (with a new MediaElement), and so on... This is working great for hours without any issues. But on that machine (which was set up new a few times, and also we tried different tv cards) after some time it is not working anymore and MPExtended is logging the above error and TVService is not running anymore. No other application is running and no user is interacting with the PC. Best regards, Sascha [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Quality Assurance
Bugreports
Archive
No connection could be made because the target machine actively refused it
Contact us
RSS
Top
Bottom