I solved it:
I am using a DbContext from a class library (so no ASP.net MVC project). To auto-migrate the DB I specified the remote's IP address. As the remote site is using S1234567 names to specify its own SQL instance I got these errors.
Question
I'm using a CodeFirst database for my application and built my own RoleProvider. It uses a specific Uow which I inject using Ninject. On my local machine everything works fine. On the production website I always get a "The network path was not found" when Uow is used in the Provider for the first time. All consequent request work fine. When I uncomment the usage of Uow the problem is gone too. So there must be a problem with CodeFirst databases.
I assume that the DBConnection opening is triggered when I use Uow for the first time. The RoleProvider must have a small timeout constraint giving the DB not enough time to init.
Any ideas how to solve this?
Solution
I solved it:
I am using a DbContext from a class library (so no ASP.net MVC project). To auto-migrate the DB I specified the remote's IP address. As the remote site is using S1234567 names to specify its own SQL instance I got these errors.