|
I'm trying to play mp4 video just by starting an appropriate process
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.FileName = fullpath;
process.Start();
fullpath is a file path/name on the server.
When I run it while in development mode, it's working fine.
But when upload and run the site from the server, nothing happens. IIS is configure properly, mp4 MIME is there. I don't get any errors, just nothing happens. What could that be? Any ideas?
Regards
|
|
|
|
|
esb77 wrote: fullpath is a file path/name on the server. So you are trying to run it on the server.
|
|
|
|
|
It worked locally because the server where your code was running was also the client, and your code was probably running as the logged in user.
When the web server is remote the process is running on the server so the mp4 is playing on the server, assuming the code is running under an account that has access to the hardware like the speakers. When a tree falls in the woods and no-one is there, does it make a sound? When your code is playing an MP4 on the server and no-one is there to listen to it, is it playing at all? Who knows.
You're not going to get this code to work, if you want to play MP4s on the client you need the code to run on the client. Look into the html5 video element or flash players.
|
|
|
|
|
I have an old application (using ASP.NET 2.0) running well on several IIS version from 6 to 7.5, but have a strange behaviour on 8.0/8.5
The application uses the Microsoft Ajax library on the client side, and the code goes like this:
<html>
<head>
.. all the styles and scripts included here...
</head>
<body>
...the markup of the page goes here...
<script>
Sys.Application.add_load(function (sender, args) {
if (!args.get_isPartialLoad()) {
window.radopen('/Michlol3/GeneralPages/Agreement.aspx?guid=421b25ef-9815-4588-861a-08ecb17f7e5e', 'idAgreementWindow');
}
});
Sys.Application.initialize();
...more in-page script here...
</script>
</body>
<html>
From all IIS versions it looks the same and all content in place, but, when served from IIS 8.0/8.5 (2012 or 2012 R2 server) the window Agreement.aspx never opened...
This code is pure client-side and I can not understand how it related to the IIS version, but the only difference between the two tested environments is the version (of the OS and IIS)...
I'm aware that this is not a good question, and I'm not looking for a direct solution, but more for ideas of what to check more...Of course, if you had the same problem and got any solution - do not hesitate to share ...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
As far as I can see, the .NET 2.0 / 3.5 version of MicrosoftAjax.js is completely broken in Windows 8.1 / Server 2012. The functions registered via add_load or add_init are never called.
The only workaround I've found is to use a version from an older OS, or the Microsoft CDN:
https://ajax.microsoft.com/ajax/3.5/MicrosoftAjax.js[^]
<asp:scriptManager runat="server" ...>
<scripts>
<asp:scriptReference
name="MicrosoftAjax.js"
path="https://ajax.microsoft.com/ajax/3.5/MicrosoftAjax.js"
/>
</scripts>
</asp:scriptManager>
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
You saved the day!!!
I will ask Chris to let upvote an answer a million time...Meanwhile get a 5!!!
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
Hi,
Anybody having idea about video calling and text chat, Kindly share your ideas. Am using mod verto freeswitch webRTC concept.
Regards
Sri
|
|
|
|
|
Try a Google search, you may be pleasantly surprised.
|
|
|
|
|
How to link windows form module within Web application?
If it is possible using Web Services, than how i can use web service?
Pls anyone help me its urgent
|
|
|
|
|
|
Ok
|
|
|
|
|
using MVC for visual studio 2013, suddenly realized that there is some limitation when it comes to how controls are rendered.
there appears to be fierce debate on a design view and why its needed, but if there is a tool that does design view, where is it?
I would tend to use webforms and put everything in absolute position because it would never be resized and never used on mobile.
now? it has to be modern and mobile ready. mvc is new, i had not needed to know CSS in depth. Trying to place controls on a simple Create page? horizontal layout, labels on the left then input boxes on the right of that with mostly empty space, the labels word wrap. it would be nice to see where its defining the margins, it cannot be that hard to make some tool that at least gives a snapshot with design grid lines.
the original comments i am reading are from 2010 and 2011 where some say the design view is almost here? now its 2015, and others say its just too hard to make this kind of tool. or why do you need a designer anyway? whats wrong with counting pixels?
is there some good reason why the designer or some snapshot is not needed? guessing at where the controls will land is not a waste of time?
im grateful for any guidance on this
|
|
|
|
|
I've never used design view...when it doesn't crash VS it is slow and just doesn't work. I just have my browsers open and view the site in them as I make changes. It is hard to get working design pages because you can't emulate all browsers.
|
|
|
|
|
when i try with the browser? placing components is just a guess. make a change, refresh it moves a bit more, bit more then all the way to the edge of the wrong side. take back the value and it jumps to the wrong place.
hours trying to use the browser. i made a webform to use the design view, created the control, set it to absolute, etc copied the html into the MVC view page im working on? and it lands where ever it wants. inline style position absolute, size this/that. page does not place it where it seems it should go.
not trying to be negative but unless im missing something obvious its frustrating and seems to be arbitrary, dont know how others can put controls that way.
all i am asking for is some way to snapshot what the coordinates cause on the result. viewing on the browser? full 15 seconds until it displays, just to chase a control on the screen takes ALOT of time
|
|
|
|
|
The proper effective use of css is a skill, no doubt about it, a skill that takes a long time to master, or even get good at. These days most companies employ people just to do css so they can focus on that and ensure it works on all browsers. Luckily this means I haven't had to touch css is about 10 years
Your main problem might be the fact that you're thinking about web pages like windows forms, where things are positioned. Instead you need to think about html like a giant game of Tetris where the elements "flow", and find their place like throwing objects into a bucket. You need to think about margins and padding as a way of keeping things distant, with floats dictating if everything stacks on top of each other like a tower, or if they can fall beside each other.
|
|
|
|
|
thanks thats a good explanation. i used this in years past and didnt have to worry about mobile browsers or resizing much; fitting and floating... well i still wish to have a snapshot of what the browser will "think" about the resulting program like that mode in Word where you turn on the hidden characters.
i read about Microsoft folks saying in 2010 or 2011 how they will have a design view soon; i just cannot fathom why its so hard. i do think about things from win forms or labview styling. but your comment helped
|
|
|
|
|
Dear you have any video/coding which display how user can edit his respective records after his login ???????
|
|
|
|
|
More than a million... Try asking this question to Google.
You can simply search for the code based on your program, language and frameworks. Entity framework, SQL Server, file-based systems, they all have different mechanism for altering the data. You can search for the one you are using right now.
To allow the user to only update his records, you use an ID that tells the system which record to update and which records to leave as they are.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Hi all, in my database I have 5 tables called Books, Genres, Authors, BookAuthor, and BookGenre. Both BookAuthor and BookGenre are bridge tables are bridge tables so when I create Entities for my tables using Entity Framework entities for the both of them were not created.
Entities for Books, Genres, and Authors tables were created. I also have a stored proc called _RetreiveBookDetails that joins all 5 tables together which returns the author's firstname, author's lastname, book's title, and book's genre if the required parameters are supplied by the user.
During the Entity Creation process I selected all of the tables used in the join and also selected the stored proc. The Complex Type which was automatically created is called RetreiveBookDetails_Result.
I've tested my stored proc in SSMS and I know it works. The problem is I can not get any data when I execute the stored proc using DBContext and supplying my stored proc with the necessary parameters. Below is my code, please take a look to see where I may have made my mistakes, thanks in advance.
public static List<_RetreiveBookDetails_Result> GetBooks(BookAuthorObj ba)
{
List<_RetreiveBookDetails_Result> bookList = new List<_RetreiveBookDetails_Result>();
using (var baContext = new BookAuthorDBContext())
{
bookList = baContext._RetreiveBookDetails(ba.FirstName,ba.LastName,ba.Genre, ba.Title).ToList();
}
return bookList;
}
|
|
|
|
|
Hi all, I have a database with four tables and they have the following schemas
dbo.Authors dbo.BookAuthor dbo.Books
|------------------------| |------------------| |-------------------------|
|AuthorID not null int PK| |ID not null int PK| | BooKID not null int PK |
| | | | | |
|FirstName nvarchar(30) | | BookID int FK | | Title nvarchar(150) |
| | | | | |
|LastName nvarchar(30) | | AuthorID int FK | | Genre nvarchar(50) |
| | | | | |
|Contact nvarchar(50) | |------------------| |-------------------------|
|------------------------|
dbo.BookGenre
|------------------|
|ID not null int PK|
| |
|BookID int FK |
| |
|GenreID int FK |
|------------------|
If I join all of my tables together in a stored proc called sp_GetBookDetails which returns data from the columns Title, Genre, FirstName, and LastName, how do I map this stored proc to Entities?
The problem I ran into was that when I tried to map my stored proc to Entities in the Add Function Import popup, I can only choose a single table instead of all four tables that were involved in my joins.
How do I make use of my stored proc in this situation? Thanks in advance for your reply.
modified 29-May-15 15:05pm.
|
|
|
|
|
|
How can I handle Null and apply empty string if Null?
<%# IIf(Boolean.Parse(Eval("IsReferralRequired").ToString.Trim()), "Yes", "No")%>
|
|
|
|
|
|
Perhaps, simply by checking the value to be null or not.
if(variable == null) {
variable = String.Empty;
}
You can also set the String.Empty as the default value (value at the declaration stage), and then inside the script-based area you can alter the values.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
here is what I come up with however its replacing DBNull with 'No'. Instead I need to do an empty string. Please help
<%# IIf(IsDBNull(DataBinder.Eval(Container.DataItem, "IsReferralRequired")) OrElse String.IsNullOrEmpty(DataBinder.Eval(Container.DataItem, "IsReferralRequired")) OrElse (Convert.ToBoolean(Eval("IsReferralRequired")) = False), "No", "Yes")%>
|
|
|
|