# Initialize "UseSqlServerStorage" outside Startup and global.asax

**URL:** <https://discuss.hangfire.io/t/initialize-usesqlserverstorage-outside-startup-and-global-asax/941>\
**Category:** question\
**Created:** [May 6, 2015, 12:09pm UTC](https://discuss.hangfire.io/t/initialize-usesqlserverstorage-outside-startup-and-global-asax/941 "2015-05-06T12:09:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonayreyes](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/jonayreyes/32/263_2.png) [@jonayreyes](https://discuss.hangfire.io/u/jonayreyes)\
**Post date:** [May 6, 2015, 12:09pm UTC](https://discuss.hangfire.io/t/initialize-usesqlserverstorage-outside-startup-and-global-asax/941/1 "2015-05-06T12:09:07Z")

</div>

Hi!

I need to configure Hangfire after I receive a webapi request: that request’s payload carries the information to log into the SQLServer, so I cannot use Global.asax nor Startup class (they were fired long time ago!).

This implies that I cannot use “app.UseHangfireDashboard()” nor “app.UseHangfireServer()”, since it goes into the Configuration method on Startup class.

How can I achieve this “late” initialization? I’m currently calling Configuration.UseSqlServerStorage in my webapi controller

Thanks in advance!
