Skip to content

huoxudong125/HQF.Tutorial.FileServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HQF.Tutorial.FileServer

How To Host The Server

The File Server two way host:

  1. IIS
  2. SelfHost using Owin

Using MulitPart to upload the files

Async

Update the files using asynchonizition

How Deal With The Big Files

var config = new HttpSelfHostConfiguration("http://localhost:8080");

//make the MaxReceivedMessageSize to MaxValue of int.
config.MaxReceivedMessageSize = int.MaxValue;

//Enable the Buffered TransferMode,make it possible to write and receive file at the same time.
config.TransferMode = TransferMode.Buffered;

config.Routes.MapHttpRoute(
    name: "DefaultApi",
    routeTemplate: "api/{controller}/{action}"
);

HttpSelfHostServer server = new HttpSelfHostServer(config);

server.OpenAsync().Wait();

Console.WriteLine("Server Started..");

Resources

HTML5 drag and drop asynchronous multi file upload with ASP.NET WebAPI
Troubleshooting HTTP 405 Errors after Publishing Web API 2 Applications
How to get PUT and DELETE verbs to work with WebAPI on IIS
IIS 7.5 + enable PUT and DELETE for RESTFul service, extensionless

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published