IIS smooth streaming does not play a video on asp.net MVC 4 with Razor - asp.net

I am trying to get a basic demo working but can't succeed, I've spent hours and hours on it..
I am building an iis smooth streaming player with no controls at first that auto plays the video, I am using "MMP"- Microsoft media platform which was formerly "SMF"- Silverlight media framework, the example I am using to build a smooth streaming player is here on the middle of this page: http://smf.codeplex.com/documentation
A brief explanation of the issue I am facing:
I am sure I got everything right in terms of the player itself, I got the .ism file, i can view its manifest if I browse to it with the browser, I can even get everything to work and play the video in an html file that is running straight from an IIS website.
another key note: I can also run any test silverlight application for example, the main form with a button and a few radio buttons and I do get this application to run and display. the problem happens only when I try the smooth streaming player, it gives a black and blank page for the whole page and right clicking shows "silverlight".
so the problem starts when I try to run it from a Silverlight application that is hosted in an asp.net MVC 4 (with Razor) application.
I have an asp.net MVC project in visual studio and then I add a silverlight application to it and choose to host it in the MVC application, then I follow the same routin as for the silverlight application player building and it even renders and plays the video on the visual studio's silverlight XAML design page. I build the whole solutio and then I get a "silverlightApplication1.xap" file in a "ClientBin" new folder on the MVC application and also a test html file and an test aspx file again in the MVC application.
if I make sure the linking is correct I can take this html file to another IIS website and run it from there and it works and plays! but if I try to run it straight from within the application (view in browser) for the html/aspx files it says that it's not running on the platform/fabric of the website and for the silverlight application itself it opens the same blank silvelight application with a black screen and also a URL of file:// and not http://localhost.. etc', so what I was trying to do for a long time is to make the silverlight application work as a view in the MVC application.
so I took a view and deleted everything in it and gave it a property of Layout=""; (nothing) and then I put the content of the test html file the SL application produced earlier, modified the value for the silverlightapplication path etc', when built and ran, the page comes up, even the application comes up as I see "Silverlight" on a right click of the mouse but the whole screen is just plain black again and it doesn't play the video.
I had the .ism file on anther location or a an entirely different location like another online website.
I also can't get to view the manifest when I run the MVC application it says its 404 but I am not sure if it's an MVC platform thing that it won't let me get to it or it's just not getting to it but the files are there and the URL's are correct both in the code and also in the URL i am putting in.
I have also came to the understanding that I might need to make sure the silverlight application is allowing cross domain traffic and it has a Client access policy like seen on this page: http://msdn.microsoft.com/en-us/library/cc838250(VS.95).aspx , so I've added two XML files to the root folder for these two issues. trying to figure out what's going on with firefox's web developer gives nothing as for what happens..
Please Help! Thanks! :)
Ray.

I don't know why and I have tried everything+making sure I get the manifest content if i browse to it.
it just worked with this URL for the ism file:
http://video3.smoothhd.com.edgesuite.net/ondemand/Big%20Buck%20Bunny%20Adaptive.ism/Manifest
there was no need for cross domain xml and Client access policy xml.

Related

Having Issues with setting up site/start page with Angular HelloWorld project in VS 2017

I know the VS Code is the tool most seen in Angular demos and I've tried them but I was going through a YouTube demo on using Visual Studio to develop a Hello World Angular app.I started out using NPM START to run the app then was following the instructions here to use the Visual Studio Start button to initiate the app.
The app was sometimes rerunning and sometimes not. I was thinking it had something to do with the startup folder but now I wish that I would have modified by startup page instead.
Here's what my folder structure looks like:
Anyways, I first I started messing with the application root URL. I tried changing it from
http://localhost:61539
to
http://localhost:61539/src
and some other values too. I confirmed that i wanted to create a virtual folder and played around entering multiple values. As a result, I noticed that my IISExpress icon in the tray started to show all of the URLS that I had entered
I wanted to try an undo these virtual folders that I created but I didn't know where they were stored. Finally, I saw that the last path that I specify is stored in the VS Project file but I don't know where all of the other sites are stored. I'd like to delete them. Is there some IIS Express config file?
The whole problem started when I was trying to get the initial the web page to come up and I was getting a "Forbidden" error. Now I think that it could possible be solve by setting my initial page to src/index.html, although the YouTube video didn't mention it.
Now, every time I hit the start button to run the web app, the following URL is displayed with an extra trailing slash after the html page name.
http://localhost:61539/src/index.html/
and I still get the forbidden error.
Question
So, how do I clean up my IIS Sites that I don't need and set my startup params so that the web page comes up and displays index.html?

.ASPX pages markups are opening in web browser

When I double click on .aspx pages in my web application project in VS2010, instead of showing the mark up in the ide the .aspx pages are opening in the web browser as shown below. The same is happening when I run my application it opens all the .aspx pages in the web browser along the application url i.e., http://localhost123456/default.aspx. I have to close all the other pages except the http://localhost123456/default.aspx to run/ test my application. Not sure what would cause this to happen. I am not able to find any solutions so far, any help is appreciated. I used the option View Markup (Rightclick on aspx page -> view Markup) to see the markup for now.
Update
As per Mike's answer I checked the options under Open with... and I do have a Internet Explorer (Default) set as shown in the following image. Not sure how did it got there.
Deleting the Internet Explorer (Default) option might be cumbersome if I have lot of .aspx pages , if there is a way to remove this option at once for all .aspx pages rather than right clicking on each and every .aspx and remove it that would be great.
As per #JB King suggestion I did checked the file properties and all the .aspx files are set with Opens with: Microsoft Visual Studio option as shown it the image below.
Right-click any .aspx file in the project, select Open With...
In the screen that pops up, select Web Form Editor, then click the Set as Default button.
Not sure how you got Internet Explorer as an option here, but if it is there, you can just delete it. It's not applicable for loading the aspx from disk. Rather, to see the rendered page in IE, you'd do View in Browser or Browse With... (in which you can set your default browser, as well).
Your address bar shows you're loading files directly from disk. This won't work. ASP.NET is not lilke static HTML. ASP.NET applications must be run from within a webserver. Install IIS and ensure ASP.NET is installed and configured, or use the Debugging Webserver (IIS Express) in Visual Studio.
If you look at the properties of the file, there should be a line of Opens with: that is where you want to have Visual Studio rather than Internet Explorer as the issue is with which programs are mapped to what file extension. Microsoft instructions if you want those as specific steps to do.

how to simulate a cross origin site on local machine?

I am trying to simulate a cross origin site. Meaning I shouldn't be able to make ajax request from site A to site B since the browser will not naturally allow me to do so because of their cross-origin policy.
What are the tools I can use in this regard? Or are there any hacks?
What I've tried so far: I've opened a visual studio solution. It has two asp.net web form projects. One web project (say A) simply hosts a form with a file input control and a submit button. The other project B has a simple aspx page, which contains an iframe which loads site A inside of it.
I ran project B, and, in the browser console window, I did something like this:
var ifr = document.getElementById('myiframe');
console.log(ifr.contentWindow.document.body.innerHTML);
The console window displays the markup of site A's page which is loaded in the client's iframe.
Clearly I've failed. But is there I way I can do it on one machine.
Well, a bit of digging shows that you can achieve this feat is by modifying your hosts file (C:\Windows\System32\drivers\etc\hosts) as mentioned in the post below:
How do i map http://localhost:8080 to http://mysites in iis7?

newbie question about css property set up in Web developer 2010 Express

I am relatively new in C# and ASP.NET MVC.
There is something unusual that happens and it could be a simple property setup...
I have a MVC Web app and a css file associated with it in my Content folder.
Now everytime I do some changes in the css file I don't see these changes when I run the app. It seems that whatever I do the app keeps on using the old file. I can see it when I do a View Source on the page.
I played a bit with the Copy to Output Directory property in Web Developer without any good results.
Am I really missing something here ?
Thanks
Either restart casini, the web server for asp.net, the icon down by the clock or try hitting F5 in the browser a bunch of times.
Try clearing the cache in your browser.

How can I create a hybrid Silverlight and aspx application

Here is my scenerio..
We have an ASP.Net 2.x web site. We want to migrate it to Silverlight full frame application. However, there is no way we can go away in a corner and redo every web page in SL right off the bat.
What I would like to do is build the chrome of the app (main page, dashboard, login, common system/config screens, main menu) in SL and be able to open existing .aspx pages in the main content SL frame.
From what I see there is no way to do this. I thought the Webbrowser control in SL4 would be the answer, but apparently that only works if your app is run out of browser.
So, what is my best recourse? It seems like I will have to create some type of .aspx page that hosts the .XAP and pass in the page I want it to load?
How would you gurus approach this?
I would actually go the opposite route actually. Intead of building the full dashboard, i would begin building the dashboard elements separately as much as you can. This will give you time to refactor your individual applications one by one until you're ready to integrate them all.
One method we considered on my team was to build our SL rendering engine to render our aspx into SL controls, but when we saw the scope of that we decided it would be easier just to begin developing everything in SL from scratch.

Resources