コード例 #1
0
        public Service_1_0()
        {
            //log4net.Util.LogLog.InternalDebugging = true;

            ODws = new ODService(this.Context); //INFO we can extend this for other service types
            // aStandard = new StandardServices();

            try
            {
                useODForValues = Boolean.Parse(ConfigurationManager.AppSettings["UseODForValues"]);
            }
            catch (Exception e)
            {
                String error = "Missing or invalid value for UseODForValues. Must be true or false";
                log.Fatal(error);

                throw new SoapException("Invalid Server Configuration. " + error,
                                        new XmlQualifiedName(SoapExceptionGenerator.ServerError));
            }

            try
            {
                requireAuthToken = Boolean.Parse(ConfigurationManager.AppSettings["requireAuthToken"]);
            }
            catch (Exception e)
            {
                String error = "Missing or invalid value for requireAuthToken. Must be true or false";
                log.Fatal(error);
                throw new SoapException(error,
                                        new XmlQualifiedName(SoapExceptionGenerator.ServerError));
            }
        }
コード例 #2
0
ファイル: Service_1_0.cs プロジェクト: muguangyuze/USGS-NIDIS
        public Service_1_0()
        {
            //log4net.Util.LogLog.InternalDebugging = true;

            ODws = new ODService(this.Context); //INFO we can extend this for other service types
            // aStandard = new StandardServices();

            try
            {
                useODForValues = Boolean.Parse(ConfigurationManager.AppSettings["UseODForValues"]);
            }
            catch (Exception e)
            {
                String error = "Missing or invalid value for UseODForValues. Must be true or false";
                log.Fatal(error);

                throw new SoapException("Invalid Server Configuration. " + error,
                                        new XmlQualifiedName(SoapExceptionGenerator.ServerError));
            }

            try
            {
                requireAuthToken = Boolean.Parse(ConfigurationManager.AppSettings["requireAuthToken"]);
            }
            catch (Exception e)
            {
                String error = "Missing or invalid value for requireAuthToken. Must be true or false";
                log.Fatal(error);
                throw new SoapException(error,
                                        new XmlQualifiedName(SoapExceptionGenerator.ServerError));
            }
        }