TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Anele Ngqandu
1.3k
429
28.2k
Uploading file using Ajax & Dramatic IIS
Nov 16 2018 3:22 AM
Hi Guys
Im doing a file upload, at first i was using fineuploader, then changed to simple ajax. The error i get is similar the "xhr:An unhandled exception was thrown by the Web Application." Now this works locally but doesn't work on the server, what am I missing on IIS configs? Kindly assist.
//Below is the JS
var
formData =
new
FormData();
var
file = $(
'#fileID'
)[0];
formData.append(
'file'
, file.files[0]);
$.ajax({
url:
'/api/document/uploads/'
,
type:
'POST'
,
data: formData,
contentType:
false
,
processData:
false
,
success:
function
(result) {
},
error:
function
(result) {
}
});
//Below is the api
[HttpPost]
[Route(
"api/document/uploads"
)]
public
async Task<
object
> UploadDoc()
{
}
Reply
Answers (
3
)
Como crear una CRUD usando angular 6 HTML, PHP, JS?
Invalid metadata token MemberRef(0x107b)