Return A File With Bad Headers?
Jul 16, 2010
I've build a MP4Handler. The Mp4 hander selects a correct file from a url.The system works if you work with 'normal' mp4 files.But the problem is the MP4 files are genrated by another program, so i think there's the problem.Right now i returned a test file, then it woks great!Do i return the other file, i get a 412 error if i use it in IE (he shows a 400 error because i deleted the 412 error in the IIS i thought maybe that solves the problem). In IE it doesn't work, but in firefox it works great!In my Fiddler result, the first movie (guid url) is from firefox, and works great. The second with the text/html result (selected row) is from IIS.How can i solve this problem?Or is this the problem?:This entity tag is not recognized by IIS. It only affects version 7.0 of the IIS software.From: http://www.pc-library.com/errors/error-code/412-0x19C/ As coding i use this as base: http://dotnetslackers.com/articles/aspnet/Range-Specific-Requests-in-ASP-NET.aspx I changed The GetRequestedFileInfo with:
public override FileInfo GetRequestedFileInfo(HttpContext context)
{
return new FileInfo(context.Request.PhysicalPath);
}
View 1 Replies
Similar Messages:
Sep 23, 2010
I am writing an ASP.NET application that generates CSV string and returns it using response.write. However, along with the CSV string, the output comes with other information I would like to get rid of (e.g. ASP.NET version, time-stamp) etc. How can I just get the CSV string and nothing else?
View 1 Replies
Mar 20, 2010
I have never work with a repeater and after a lot of research I got to the conclusion that this is the control I need to use for what I have to do. I need display data but I will need 2 headers and after some sort of amount of records the headers will repeat again. In this page you will find an example of what I'm trying to do http://ratings.fide.com/view_source.phtml?code=45276 I don't know if a repeater is the right control but i thin it is.
View 3 Replies
May 27, 2010
explain to me the concept of Request.Headers and Response.Headers in ASP.NET? Under what scenarios you use Request.Headers and Response.Headers?
View 1 Replies
Nov 13, 2010
How to return a script file in MVC3?
This is not working.
Function Index() As ActionResult
Return JavaScriptResult(Url.Content("~/scripts/testing.js"))
End Function
View 1 Replies
Nov 23, 2010
Possible Duplicate: How to create file and return it via FileResult in ASP.NET MVC?
ASP.NET MVC2: How to return a file from a controller? I want to do this so the user can download the file from server.
View 1 Replies
Sep 28, 2010
I've a problem while using ASP.
My situation is I want to convert every documents' contained words into database and upload those document to server.
For example: MS word, MS Power Point, MS Front Page and PDF files.
Those words needed to store into database and let others to search by content.
View 8 Replies
Apr 12, 2010
I have a VS 2008 web application that I need to capture the full file path (directories and file name) from the selected file. So user selects a file and then clicks on one of the buttons which transfers control to my code for processing. So how do I get the file path? I can get the file name, but not the path.
View 2 Replies
Sep 29, 2010
There is a lot of discussion about todays fix for ASP.NET to prevent an attack that can be used to get the encryption keys from an application. In one discussion I read that it could also be used to make the WebResource.axd handler return any file in the application by forging the request parameters to point to a known file location (where /web.config would be the most obvious choice).
View 1 Replies
Jun 22, 2011
I have three XML files that are auto-generated and placed into my wwwroot directory. From there, I need to be able to search through these XML files looking for a record by either first name or last name. So, I have three xml files: a_results.xml, b_results.xml, and c_results.xml.
I'm having trouble reading / scanning these files so I really need some hand holding here. Very novice ASP/asp.net programmer here. Basically, I want a "search page" where the user will enter their search criteria into a text box (either first or last name) and the page will search the first and last name fields in all three of my xml files and return the results in a table, including the resulting first and last names plus their extension number.here is an example of one of the xml files
Code:
<response method="switchvox.extensions.search">
<result>
<extensions page_number="1" total_pages="1" items_per_page="500" total_items="3">
<extension number="1111" status="1" can_dial_from_ivr="1" account_id="1446" display="John Smith" date_created="2009-12-23 11:57:36" type="sip"
[code]....
So, as an example... I go to the page - enter "test" into the search box and click "find". The page should search all three xml files for the word "test" in the first OR last name fields and then return ALL of the combined results in a table which shows first name, last name, location and extension number (all available in the XML file(s) as shown above).
View 2 Replies
May 26, 2010
I'm integrating jquery fullcalendar into my application.
Here is the code i'm using:
in index.aspx:
[Code].....
View 5 Replies
Jul 2, 2010
I'm having a very hard time wrapping my head around this problem (it might be the heat from the summer finally arriving).
Problem:
I want the user to press a button client side which performs javascript data preparing and at last send a JSON structure to (currently a asmx webservice on) the server. The JSON structure is several levels deep.
Server side I create a PDF file which I want to send back to the user.
Goal:
The user feeling is that she presses a button and expects a PDF to return to her - either in a new window or as a download (preferrable).
Tools:
The system consists of (client side) HTML, JavaScript and ExtJS and (server side) ASP.NET.
Normally I would use an ashx handler to return a file to the client, but can I send a JSON structure to the handler and still be able to parse it correctly server side?
I am searching for the pattern to use.
View 1 Replies
Mar 25, 2011
I'm using ASP.MVC 3 with SSRS 2008 R2. I have some reports which I want to render as PDF document. So I my controller, I've got this code
[Code]....
Problem is, that this code returns empty pdf. If I call PrintReport directly from view, then it works. But when I call ReportSwitcher, which calls PrintReport, then it returns empty file.
View 19 Replies
Sep 14, 2010
Got a problem with regards to the file upload control on database updates. The problem is in my CMS, when a user tries to update content for a page it will add null to the fields containing the image path. What I need is for the system to check if the uploader has no image and if hasn't it has to do nothing. It can't add empty strings or null values as this will remove the original image path. Although they still need to be able to do image updates if the uploader has a file(this bits not a problem).
Here is a snipet of code to demonstrate what I'm trying to achieve.
[Code]....
View 1 Replies
Jul 12, 2010
I am calling a file download action from javascript:
$elem.click(function() {
window.location.href = 'MyController/MyFileDownloadAction';
});
The controller returns a file:
[code]...
This action has a pretty high likelyhood of throwing an exception (or at least not being able to return the file).
Due to the nature of the application (which contains a lot of dynamic content), I can't really redirect to an error page in this situation. The current page needs to stay open somehow.
So I'm ideally looking for something like a javascript pop-up, but afaik this isn't going to be possible since I don't know any way to return a javacript instruction in a non-ajaxed controller call. If I display an error page I need to force it to open in a new window some how. Is there any possible solution to this problem?
View 1 Replies
Dec 20, 2010
I have a problem that currently we are use a sybase database and we want to create application that give me a output in excel report that's mean my data stored at sybase or mysql and we access it from this after it generate my report in excel form and give this output on excel format?
View 1 Replies
Nov 8, 2010
I have an update function in my data layer which is defined as:
public int UpdateRBTable(parameters ...) This calls a SQL Server Stored Procedure to perform an update function on the database.
The process does its job for updating the table. However, the stored procedure has a return value (which indicates how many rows were updated), but this return value is not returned to the application. The application always shows that a zero was returned from the stored procedure.
View 3 Replies
Jan 22, 2010
Can my WebMethod return an XmlDocument as return type?
When I try to consume the web service I'm still not getting XML. It appears as though a reference to the method is being returned rather than say a string containing XML.
<WebMethod()> _
Public Function CustomerSearch(ByVal lastName As String, ByVal firstName As String, ByVal companyName As String, ByVal city As String, ByVal state As String, ByVal email As String) As XmlDocument
' Create XML doc
Dim doc As XmlDocument = New XmlDocument()
' some more code
Return doc
End Function
View 4 Replies
Sep 28, 2010
how can i return 401 error from a method return ActionResult?
View 1 Replies
Dec 2, 2010
How can I assign a value to the methods return var BEFORE I return the final value?
Example:
public string Example()
{
[here I want to assign a value to the return var and continue this block until the end] = "TempStr"; [code].....
View 2 Replies
Aug 29, 2010
I have a cascading dropdown. After the dropdown is populated(it is in another file) i would like to return back to the original form where the control is placed. is there anyway of doing it
View 4 Replies
Apr 16, 2010
I'm using vs2010, Framework4 and the related AjaxControlToolkit v4.0.30210
Other controls works great such as the html editor, but the AsyncFileUpload return always "The file attached is invalid."
View 6 Replies
Oct 5, 2010
I have a service which reads an image stored in the database. I want to be able to read an image stored on the file system and return that back to the requestor.
View 4 Replies
Jun 8, 2010
How to get asp.net return drop down list to return value as int
I want to pass the value to a stored procedure as an integer. But the default appears to be as a string which is not what the store procedure is expecting.
Is there a good way to return the list values as ints?
I suspect I can you set the value on the change selection event, is there another way?
View 2 Replies
May 15, 2010
i have a question about web service and the method that can i use to return the results in xml format. MY SCENARIO IS THE FOLLOW: I have 2 projects: the first is my aspx site and the seconds is my web service. The web service make query to sql database and generate xml file contains the results, and it stored on the webservice's server. My client call web service, that generate xml file, and after my client read the xml file stored to server (by xml reader) and view the results.... Is it correct? For me no. i think that when i call my web service, exist a method that it return xml file instantly, like a stream or like a query. is it true? (i don't know) But the problem is that i don't know how soap works and i don't found any code example.
View 2 Replies