Networks representing the spread of infectious diseases in populations have been widely studied. Here, we formulate an SEIR model using an edge-based approach on a static random network with arbitrary degree distribution. The corresponding basic reproduction number and final epidemic size are computed. The SEIR model is used to investigate the stochasticity of the SEIR dynamics. Assuming exposed, infection and recovery each happen at constant rates, stochastic simulations of the SEIR dynamics are performed applying continuous-time Gillespie's algorithm given a Poisson or a power law with exponential cut-off degree distributions. The resulting simulations match well with the numerical predictions of the SEIR model given the initial conditions. Final epidemic size remains unchanged when the initial infecteds are varied. On the other hand, varying the disease parameters of the SEIR model affects the time when the epidemic accelerates, the peak of the epidemic, and the final epidemic size. These results capture scenarios of an epidemic in a network implying control strategies in the disease transmissions.