Search Support

Access denied issue while debugging a code by Firefox Devekoper Edition

  • 3 ответа
  • 1 имеет эту проблему
  • 5 просмотров
  • Последний ответ от jscher2000

more options

I'm new in Firefox Developer Edition. I have a web app which has been developed by asp.net mvc and c#. There is a code to upload a file to a network path by clients on an internal server. While debugging the code, it works without any issue on Chrome but on Firefox D.E. I got access denied error while accessing the network path. (I spent 2 hrs to figure it out that the issue is being caused by Firefox D.E)

Does anyone face this issue before? is there any solution to fix it?

All Replies (3)

more options

When you say you got an access denied error, do you mean the server sent a 403 response?

If you compare the requests in the respective Network panels of the Firefox and Chrome dev tools, can you see any differences between the requests (headers, parameters, cookies, etc.)?

Helpful?

more options

Thanks for your reply.

I'm using File.Create method from Microsoft .net framework to create or overwrite uploaded file in a path. (https://docs.microsoft.com/en-us/dotnet/api/system.io.file.create?view=netframework-4.7) While calling that method it returns: "Access to the path '\\\\somewhere' is denied." with no more details. (just in Firefox)

As the method's document, it would raise an error because of:

1:System.UnauthorizedAccessException: The caller does not have the required permission.-or- path specified a file that is read-only.

2:System.ArgumentException: path is a zero-length string, contains only white space, or contains one or more invalid characters as defined by System.IO.Path.InvalidPathChars.

3:System.ArgumentNullException: path is null.

4:System.IO.PathTooLongException:The specified path, file name, or both exceed the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters.

5:System.IO.DirectoryNotFoundException:The specified path is invalid (for example, it is on an unmapped drive).

6:System.IO.IOException: An I/O error occurred while creating the file.

7:System.NotSupportedException: path is in an invalid format.


So it seems the first one happens while creating the file and I catch the error and raise a custom error to the client (internal server error -500) then I do not have a real http statue code (because the method does not return any details)

Thanks,

Helpful?

more options

Okay, the problem is on the server side. Why would it work differently in different browsers? My guess is that some header or parameter doesn't match was your ASP.net code expects, so please compare the requests as I suggested before.

Helpful?

Задать вопрос

Для ответа на сообщения вы должны войти в свою учётную запись. Пожалуйста, задайте новый вопрос, если у вас ещё нет учётной записи.