1
votes

I have a self - hosted Owin application that needs to access Azure blob storage, however, I get a security exception when trying to access the storage. I'm able to access the blob storage from a console application. I suspect the issue has to do with the process identity when I'm executing the code from Owin. With IIS sites, I can set the user account under which the application pool is running. How do i set the process Identity for an Owin/Katana ASP.NET Web Api application?

Edit: The inner exception is ... 'An attempt was made to access a socket in a way forbidden by its access permissions'

Edit: I get the same error message from an ASP.NET Web API application not hosted with Katana

1
What is the error message you're getting? May be show us some code.Gaurav Mantri
The security exception itself should be pasted above. Generally speaking, the process identity does not matter if you access Azure Blob Storage, as you should provide credentials in connection string instead of relying on process identity.Lex Li
I've edited the question, indicating the error messageuser2927726
edit it more - include full exception message and call stack for both immediate exception and inner exceptionastaykov
inclide as well the part of the code which causes this exceptionastaykov

1 Answers

0
votes

The issue was with the antivirus on the local system.