Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6024045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:05:51+00:00 2026-05-23T04:05:51+00:00

I am developing an ASP.NET MVC3 application with c# and Razor. I created a

  • 0

I am developing an ASP.NET MVC3 application with c# and Razor. I created a page where the user can play video files which are located in the application directory tree.

When I tested the application locally it was working correctly, when I deployed it in MS Server 2008 with IIS 7.5 everything worked fine except the video streaming.

The page does not even display the player and this let me think that the application cannot find the Javascript file needed to load the player. I tried all the types of URL encoding, I set different types of permission but that did not solve the problem. Hereby I post the code of the View:

 @model System.String

@{
    ViewBag.Title = "Play";
}

<h2>Playing Topic Video</h2>

<div id='player'>This div will be replaced by the JW Player.</div>

<script type='text/javascript' src='@Url.Content("/FLV Player/jwplayer.js")'></script>

<script type='text/javascript'>

   var filepath = @Html.Raw(Json.Encode(Model));

   jwplayer('player').setup({
   'flashplayer':'@Url.Content("/FLV Player/player.swf")',
   'width': '400',
   'height': '300',
   'file': filepath
   });
</script>

Where Model is a string representing the path of the video file. May anybody help me with this issue?

Thanks

Francesco

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:05:51+00:00Added an answer on May 23, 2026 at 4:05 am

    Instead of:

    @Url.Content("/FLV Player/player.swf")
    

    You should:

    @Url.Content("~/FLV Player/player.swf")
    

    Notice the ~. This is what you are missing in both your urls. Always put a ~ in the beginning when you are using the Url.Content helper. It will represent the virtual directory name.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing an asp.net mvc application in which I keep user credentials in
I am developing an asp.net application with Windows authentication. User.Identity.Name seems to return the
I'm developing an ASP.NET MVC multi site application (can host multiple sites from the
I have been developing an application in asp.net mvc3. We have used models to
I developing ASP.NET application using a Swedish version of Windows XP and Visual studio
We are developing large ASP.NET applications with lot of dynmically created pages containing ASCX
I am developing an ASP.NET MVC application and I want to use OpenId. What
I'm developing a new ASP .NET website which is effectively a subset of the
Please recommend books for developing ASP.NET User and Custom Controls
I am developing asp.net mobile application. I am using LINQ to XML to query

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.