Click here to Skip to main content
15,881,559 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
When I call a specific function, I get the following error. My hosting is with 1&1ionos and I do not have IIS. The function uses Mediatoolkit.dll which is in the BIN folder. Please can anyone tell me what to do to fix this error?

ConvertFile(Server.MapPath("~/videos/example.MOV"), Server.MapPath("~/videos/test.mp4"), Options.VideoSize.Hd720)


Exception Details: System.UnauthorizedAccessException: Access to the path '\MediaToolkit' is denied.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET access to a file, right-click the file in File Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.


What I have tried:

I have tried allowing WRITE access to Mediatoolkit.dll and also the VIDEOS folder but no luck. Is it the dll file or VIDEOS folder which requires permissions?
Posted
Updated 7-Apr-20 11:25am

1 solution

It means the user account that runs the ASP.NET process doesn't have access to the \MediaToolkit folder. If the folder in question was in your web site's root folder, you wouldn't have the issue.
 
Share this answer
 
Comments
Member 13779417 7-Apr-20 17:29pm    
There is no folder named \MediToolkit it's just a dll in the bin folder.
#realJSOP 7-Apr-20 17:34pm    
Are you running your site on Apache/Linux?
Member 13779417 7-Apr-20 17:40pm    
I'm not sure.. I'm not great with this side of things. The site is hosted with 1&1 ionos, that's all I know. I just know how to play around with the front end code and vb.net. I upload everything through ftp, I don't really know how to use visual studio. The function that I'm stuck with here was written for me but when I try to call it from vb.net I get this error.
#realJSOP 7-Apr-20 17:43pm    
Well, call/email them and describe the problem. That's all I know. Well, that and you should hire a real developer. Just sayin...
Member 13779417 7-Apr-20 17:50pm    
I will call them tomorrow. Thank you for trying.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900