.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

object (movie) not playing live - works on local

Posted By:      Posted Date: September 23, 2010    Points: 0   Category :ASP.Net

I have a small web app (using vb.net/asp.net) that I have created a control with an oject and I show a short video.  The video is a .mov file.  When I run the page on my local testing machine, it works just fine.  When I move the files to the server and test it, the movie just won't play.   There are no errors on the page or anything, the movie just won't play.  I know the path to the video is correct.  When I click play, it says 'Opening Media' for 1 or 2 seconds and then it goes back to the ready state.  I'm wondering why it works locally but not on the server.  Does the server need a media player?

Here's my control:

<object id="<%= ClientID %>_Player" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="<%= Me.Width %>" height="<%= Me.Height %>" style="margin:0px auto; z-index:10000">    
<param name="URL" value="<%= me.VideoUrl %>" />    
<param name="autoStart" value="false" />    
<param name="uimode" value="Full" />    
<%--<param name="autoplay" value="True" />--%>    
<embed id="<%= ClientID %>_Embed" type="application/x-mplayer2"

View Complete Post

More Related Resource Links

Can't connect to SQL 2005 Enterprise using Management Studio with Server Name (only (local) works

This is a test system, everything running locally & no domains. Win 2003 Ent. Server & SQL Server 2005 Enterprise. I can't log into SQL Server Management Studio using the server name & using either Windows Authentication or SQL login. If I change the name of the server in the drop-down list to "(local)", I connect just fine (both Windows & SQL security modes). Shared Memory, Named Pipes & TCP/IP enabled in both server & client. Remote connections allowed. I have IP adresses (both & external IP) in my hosts file pointing to the server name. Does SQL require a DNS server? This wouldn't be a problem except for the fact that I can't install SQL 2005 SP3 due to authentication failure since there's no way to enter (local) as the server name. SQL tools (management studio, SP install) seem to see the SQL server running but won't authenticate the user through any means other than setting server name to (local). This is driving me crazy!!!

uploading a file with wcf works fine with local drive, but only 4096 kb uploaded when I use unc stor

Hello I'm writing a wcf service for uploading files to a server. It works fine when I try to upload the file to the servers local c:/ drive, but if I use a UNC path only 4096 kb is stored. It actually looks like part of the file is lost while storing it with writeStream.Write(buffer, 0, bytesRead);, because I wrote the bytesread to an sql table and the number of elements are always the same no matter how many times I upload the file, but the stored file is always different sizes, ranging from 1996 kb to 4092 kb.   I'm using IIS 7.5 on a windows 7 enterprise machine. My IIS is using a administrator account for the application pool, so it should not be a problem with permissions.   My wcf method uses Stream to upload the file in chunks    public void UploadFile(RemoteFileInfo request)         { //some methods to set the filepath                                   int chunkSize = 4096;                                 byte[] buffer = new byte[chunkSize];                                 Stream writeStream = new FileStream(filePath, FileMode.CreateNew, FileAccess.Write);  &

Does Sharepoint new Client Object Model works with SharePoint 2007


I am able to test this new Client OM successfully with SharePoint 2010.


Would it support SharePoint 2007 & SharePoint 2003?


How do you retrieve data from older SharePoint Server ?

Ronak Patel

Playing a movie inside a media element




The code below doesn't work for me.  The window displays fine but the movie file does not play inside the media element.  I'm new to WPF and found the snippet of code in the help files, but can't get it to work.

Any help would be greatly appreciated. 

<Window x:Class="PhotoTool.UploadStatus"
  Title="Upload Progress" Height="397" Width="596" Name="uploadStatus" WindowStyle="SingleBorderWindow" WindowStartupLocation="CenterOwner" Icon="pack://application:,,,/Resources/PhotoToolIcon.ico" ResizeMode="NoResize">
    <GroupBox Header="Summary" Height="171" Margin="6,6,6,0" Name="groupBoxSummary" VerticalAlignment="Top">
    <MediaElement Height="171" Margin="6,0,264,5" Name="mediaElement" VerticalAlignment="Bottom" LoadedBehavior="Play" UnloadedBehavior="Stop" Source="pack://application:,,,/Resources/zen apple.mov">
        <EventTrigger RoutedEvent=

How object.GetType() works?



What object.GetType method does to determine the actual type at runtime? I'vea method that takes an object[] array. The array holds entities of different types, e.g, Product and Order.

object[] items = new object[2];
items[0] = new Product();
items[1] = new Order();

Now I am calling this code:


It gives me the exact type information which is Product in this instance. Can anybody explain me how object.GetType resolves the exact type at runtime?

Getting Object required, but page function still works..


Want to clear the yellow exclamation point in the browser.. it builds fine, it works fine, but if you happen to look down in the bottom or your browser is setup to display these errors, you will get  an error message that reads

Object Required
Code: 0
Line: 13

When i view the source of the page here is what i have for those lines, then below that is how its written in the aspx page, what did i miss or do wrong?


<script type="text/javascript">
        function showsearchMenu(num) {
            for (var i = 0; i <= 4; i = i + 1) {
                if (i != num)
                    document.getElementById('searchNav' + i).style.display = "none";  --------------->>> This is line 13
                    document.getElementById('searchNav' + i).style.display = "block";
        function goSearchOption(theoption) {
            for (var i = 1; i <= 3; i = i + 1) {
                if (i != theoption)
                    document.getElementById('searchOption' + i).style.display = "none";
                    document.getElementById('searchOption' + i).style.display = "block";

InfoPath form works on dev but not live



I am trying to create my first InfoPath form which is using the UserProfileService and GetUserProfileByName to pull out the user's name and email address once they open the form.

IfI publish from InfoPath to our DEV server, the form works great. If I point the service at our LIVE server and publish it there, I get the dreaded "Error Accessing Datasource" message.

So I know that my form and service work okay in one environment but not in another. Could anyone help me troubleshoot this? There's obviously some settings different across our two servers but I don't really know where to start looking.



How Javascipt Object Model SP.Core.js works? what is under it?


Hi, when u use methods of Sharepoint Javascript API , what exactly happens?

Under it is a webservice? or simple http protocol that comunicates with Sharepoint?

And can it be used anonymously or only when logged in?  Do I must provide some credentials to use it?

App works well on local intranet, but having problema on external access


We developed an application using ASP.NET 3.5, that works fine on local intranet in our customer. However, we try to put it to receive external access an it is throwing an generic error from asp.net, asking to change the customErrors to "Off".
I'd already done that, but the real error doesn't appear. I've changed various configurations on IIS, but unsuccessfully. Do I have to restart IIS on changing web.config?
Anyone have any sugestion? &nbs

Trying to instantiate an object of a given type - works if the type has no dependencies, fails if it


In order to instantiate an object of a given type, I'm using the following code


public void LoadAssembly(string pathToAssembly, string assemblyTypeName)
      Console.WriteLine("INFO - Found the Assembly file " + pathToAssembly);
      string fullPath = null;
        fullPath = Path.GetFullPath(pathToAssembly);
        Console.WriteLine("Full path to assembly is " + fullPath);
        Assembly asm = Assembly.LoadFile(fullPath);
        if (asm == null)
          Console.WriteLine("ERROR - Failed to load Assembly: " + fullPath);
        foreach (var item in asm.GetTypes())
          Console.WriteLine("INFO - Found Type: " + item.FullName);
        Type type = asm.GetType(assemblyTypeName);

Disposing DbConnection variable of an object used as a local instance



I have a class with a property of type DbConnection.
That class is instanciate inside a method as a local variable.
Do I need to dispose the DbConnection property value when disposing the entire object?


MSCaptcha works fine on local but not on server!


 MSCaptcha works fine on my local computer but when I place it on hosting server the image is not displayed.

Whoever knows how to fix this, please tell me?

URL Rewriting works on localhost, not on inetput wwwroot or on live server


Hi guys,

I'm making a website and i have made a url rewriting module which works on my Visual Studio localhost area, but not on the Internet on a server or on my local machines inetpub wwwroot area. Any ideas what I need to tweak in IIS to fix it?

I'm on a windows 7 machine writing in VB.Net, using IIS 7.


Heres some of my code (which does work on localhost when i start the VS2008 debugger)

This is my web.config insert

			<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="UrlRewriteModule" type="theLibrary.rewrite"/>

Here is my rewriter itself, a bit scrappy but it works!


Imports System.Web
Imports System

Public Class rewrite
    Implements IHttpModule

    Public Sub Dispose() Implements IHttpModule.Dispose

    End Sub

    Public Sub Init(ByVal application As System.Web.HttpApplication) Implements IHttpModule.Init
        AddHandler application.BeginRequest, AddressOf Me.application_BeginRequest
        AddHandler application.BeginRequest, AddressOf Me.application_EndRequest
    End Sub
    Private Sub application_BeginRequest(ByVal sender As Object, By

"'xxxxx\Administrator'user does not have permission to access the 'Local' object, or the object



I am trying to run the DMX query

select [bikebuyer],
from [TK448 Ch 009 Prediction]
natural prediction join
(select 'm' as [gender],
0 as [number of cars owned]) as t

for my  [TK448 Ch 009 Prediction] model but it's throwing me the error "'xxxxx\Administrator'user does not have permission to access the 'Local' object, or the object does not exist" though it has the Admin permission.

The full query what I am trying to achieve is.

--select * from [predictioncluster].cases
select top 1000
[bike buyer],
predictprobability([bike buyer],1) as dtpredictprobability,
t.numbercarsowned from [predictioncluster]
prediction join
'select [lastname],
from [dbo].[prospectivebuyer]') as t
on[gender] = t.[gender] and [number cars owned]
= t.[numbercarsowned]
where [bike buyer] = 1
order by predictprobability([bike buyer],1)desc

but the same error. Also I am getting the error "The end of the input was reached". If any one could help me out with this issue.



TreeSelector : playing with generics and type inference

create a generic way to define a selection starting from a tree of objects, the most simpler way as possible.

Let's start with the beginning...
Here is a very simple little interface defining a node of the tree, basically, a value and the references to the child nodes.

Playing with Linq grouping: GroupByMany?

One of its features is grouping. Many people understand grouping like it is defined in Sql. Linq is implementing grouping quite the same way. Let's discover this syntax and how to make consecutive groups easier.

Thinking about new C# method prototypes: object as dictionary

I recently had to write a small Flickr API. I know many .Net API for Flickr already exist but I needed one for a Silverlight application. Whatever, it's only about building some querystrings so I did it by myself. It's been an opportunity to think again about a classical question: how to pass parameters to a method ?

Imagine you have a generic method to call some Flickr functions.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend