I am currently using a component in which I need to load a path to a file.
Now my plan was originally to just use the URL to the file since they are hosted on the web, but sadly this component can only load file saved down locally.
So now I am thinking before I can load the file in this component I need to save down the file first,
So how would I go about this in .net
1) Call URL
2) Save down the file to a local folder
I am using a third party applet which enables a user to paste a screen shot into it and it posts the file data to an upload page. I am pretty new to asp.net (VB) and wondered if I could use a Generic Handler to read the post data and save the file to disk or just a normal web form to do this? All the examples I have received with the applet are in php of which i have had no experience coming from a Classic ASP background.
i have place some .txt files in my web application root directory. now i want to open a popup on button click with save button so that client can save this file on his/her PC. also can we auto set the path??? mean client jst press save button and file automatically stored his "D:\Foldersample.txt".
I am creating the user ,using asp.net + C#.there is the form (UI) who collects the information and send data to Business layer. now, while collecting the information from UI I want to also save the image of user, at file system in application domain.There is function in the business layer as SaveImage, which returns the path where it is saving. Scenario:1) Save image first and then save other information in DB.
I have a file uploader I would like to be able to have a folder added to the folder path on upload based on a textbox.text "MapPath("~/Uploads/" + Path.GetFileName(e.filename))"
I have Dim folder as String = textbox.text how do I add folder to MapPath("~/Uploads/"
it currently checks for .xml files how can I add more .doc .gif etc
Dim savePath As String = MapPath("~/Uploads/" + Path.GetFileName(e.filename)) 'Validation for file extension If Path.GetExtension(e.filename).Contains(".xml") Then Return End If
the problem is when i am click on the button progreesbar is coming but after the completion of geterating the file (file Generated) but the button is still disabled and progressbar image is still showing.
for save to the xml file i am using this code after the xml write successfully.
I'm having a virtual directory that holds videos of format MP4. My problem is that i'm not able to access some of the "mp4" file via http. But i can browse and play the file through the shared folder not via http. I added the MIME extension for MP4 also. Please find the event log as belowLogFaulting application w3wp.exe, version 7.0.6002.18005, time stamp 0x49e023cf, faulting module MSVCR80.dll, version 8.0.50727.4016, time stamp 0x49cc5361, exception code 0xc000000d, fault offset 0x00004e12, process id 0x2edc, application start time 0x01cb598243012abd.Also in fiddler i'm getting the log as ReadResponse() failed: The server did not return a response for this request.
I have a web application. I am using C#. I have existing methods in my API for various things but all only submit and return bool/int/strings.
All of my API methods have the directive System.ServiceModel.OperationContract
All the parameters are of System.Runtime.Serialization.DataMember
I would like to be able to receive a posted file over HTTP. All I've been finding is people attempting to save a HttpPostedFile after submitting it in a form.
EDIT: this will be called from an iPhone application. Not via the browser on the iPhone Basically, I would like to do this: [URL]
My application source code is under Driver H: in my Dev server.
The security settings under Driver C: (right click->properties->security tab) has access setup as "Everyone", but when I remove "Everyone" from C: and run my application, I am getting HTTP 404 - File not found. The app works fine if it has Everyone. I dont want to grant access to Everyone under C:.
How can I run my app which is setup under driver H: run without any issues by removing the Everyone Access in C drive.
I'd like to understand what happen under the hood when you do an web upload. I guess one of these: The file is loaded in memory by the browser, sent to the web server buffer memory, and then the app is notified to collect it. The file is being readed by the browser and at the same time sent to the web server, that can start to save the bytes progresively. I've tried to upload a very large file, and put a breakpoint on the frist line of the method receiving the upload. I've seen how the browser toke a lot of time loading... but the breakpoint was still not hit, and after a while the breakpoint is hit. I want to understand this, because in the worst scenario, if I allow big uploads, they could blow up the server memory at some point. What does happen if I upload a 2Gb file? (considering that the web server/app accepts that length) would it take 2Gb of server memory?
I'm trying to upload a file to an ASP 2.0 web service through HTTP 1.1 POST from a client-side application. If my web service function is declared as
<WebMethod()> Public Function UploadFile(ByVal file as Byte(), ByVal fileName as String) as String ...
The test form says the request should take this form:
POST address_of_service HTTP/1.1 Host: <host> Content-Type: application/x-www-form-urlencoded Content-Length: length file=string&file=string&fileName=string
How do I get my binary file data into that form? I've tried just converting the file data to a string and putting it in the body (file=<string_data_here>) but I get HTTP 500 errors back, complaining about not being able to convert it to System.Byte. I've got HTTP POST working fine elsewhere in my application with plain string parameters. Also, out of curiosity, why is it showing the file parameter twice?