0
votes

I have a asp.net application which is working from last 2-3 years, it has file uploading feature. Today when one of my user tries to upload 4 file in which 3 files uploaded successfully, while he got the error in the 4th one saying that the user don't have permission to upload file. I am surprised to know that why it didn't happened in the last 2 years and infact for the last 3 files that he has uploaded.

To add Error description:

System.UnauthorizedAccessException

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) that is used if the application is not impersonating. If the application is impersonating via , the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET write access to a file, right-click the file in 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.

1
It's all in KB, around 5-10 kb .txt file onlyZerotoinfinity

1 Answers

0
votes

I have done this by following :

[This solution I have found on net, I am posting it so that other can take benifit from it] I have enabled the simple file sharing... Still I have a doubt that why it didn't happend for the last 3 files

To enable the security tab you must disable simple file sharing. To do this, open any windows explorer window and choose Folder Options from the Tools dropdown menu. Then go to the View tab. Scroll to the bottom of the list and uncheck the Use Simple File Sharing checkbox and click the OK button.