code for registering view service provider