private static void Validate(HttpListenerContext context)
{
string serverAE = UriHelper.GetServerAE(context);
if (String.IsNullOrEmpty(serverAE))
{
throw new HttpException((int)HttpStatusCode.BadRequest,
String.Format("Partition AE Title is required after {0}", ImageStreamingServerSettings.Default.Path));
}
ServerPartition partition = ServerPartitionMonitor.Instance.GetPartition(serverAE);
if (partition == null)
{
throw new HttpException((int)HttpStatusCode.BadRequest, String.Format("Partition AE {0} is invalid", serverAE));
}
string requestType = context.Request.QueryString["requestType"] ?? "";
if (String.IsNullOrEmpty(requestType))
{
throw new WADOException(HttpStatusCode.BadRequest, "RequestType parameter is missing");
}
}