The solution of heat equation $$u_t = \kappa u_{xx}$$
with separation of variables is
$$u(x,t) = \sum_{n=1}^{\infty}b_n e^{-\kappa n^2 \pi^2 t}\sin n \pi x$$
I spare the details as are well known.
For obtaining $b_n$, we use the initial condition, $u(x,t)$, for example, $$ -100x = \sum_{n=1}^{\infty}b_n \sin n \pi x$$ for the initial condition of $u(0,t=0)=0, u(L,t=0)=100$
How can we obtain $b_n$ when the initial condition is zero, for example
IC: $u(x,0)=0$
BC1: $u(0,t)=0$
BC2: $u(L,t)=100$
or a bit more tricky
IC: $u(x,0)=0$
BC1: $u_x(0,t)=0$
BC2: $u(L,t)=100$
When applying the initial condition, the Fourier series is
$$ 0 = \sum_{n=1}^{\infty}b_n \sin n \pi x$$
How do we obtain $b_n$?
The problem isn't the the initial condition is zero, but rather your boundary conditions are not homogeneous. Therefore, you can't apply a series solution just yet.
Instead, try breaking up the solution into
$$ u(x,y) = w(x) + v(x,y) $$
where $w(x)$ is the steady-state solution, satisfying
$$ w_{xx} = 0 $$
with B.C.s: $w_x(0) = 0$, $w(L) = 100$. Solving this gives $w(x) = 100$.
Then, you can solve the residual problem
$$ v_t = \kappa v_{xx} $$
with B.C.s: $v_x(0,t) = v(L,t) = 0$
and I.C.: $v(x,0) = u(x,0) - w(x) = -100$
Now you can proceed as usual.