Servicii disponibile:
Serv0:	 ping: <html>

    <head>

        <title>Compilation Error</title>

        <style>

         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 

         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}

         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}

         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }

         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }

         pre {font-family:"Lucida Console";font-size: .9em}

         .marker {font-weight: bold; color: black;text-decoration: none;}

         .version {color: gray;}

         .error {margin-bottom: 10px;}

         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

        </style>

    </head>



    <body bgcolor="white">



            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>



            <h2> <i>Compilation Error</i> </h2></span>



            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">



            <b> Description: </b>An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

            <br><br>



            <b> Compiler Error Message: </b>CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)<br><br>

<b>Source Error:</b><br><br>

            <table width=100% bgcolor="#ffffcc">

               <tr><td>

                              </td></tr>

               <tr>

                  <td>

                      <code><pre>



Line 123:    ArrayList stiva = new ArrayList();

Line 124:    ArrayList operanzi = new ArrayList();

<font color=red>Line 125:    StringBuilder sb = new StringBuilder(infix);

</font>Line 126:    for ( i=sb.Length-1; i&gt;=0; i--) {

Line 127:      c = sb[i];</pre></code>



                  </td>

               </tr>

            </table>



            <br>



            <b>Source File:</b> \\172.30.0.5\iis\~florin\ServiceRs.ashx

            &nbsp;&nbsp; <b>Line:</b>  125

            <br><br>

<br><div class="expandable" onclick="OnToggleTOCLevel1('compilerOutputDiv')">Show Detailed Compiler Output:</div>

<div id="compilerOutputDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



C:\WINDOWS\SysWOW64\inetsrv&gt; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe&quot; /t:library /utf8output /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll&quot; /R:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\MySql.Data\5.2.5.0__c5687fc88969c44d\MySql.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll&quot; /out:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.dll&quot; /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701  &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.0.cs&quot; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.1.cs&quot;





Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.3053

for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727

Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.



\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,5): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,28): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(127,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(130,32): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(138,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(140,16): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(143,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(146,50): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(192,14): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(195,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

</pre></code>



                  </td>

               </tr>

            </table>



            



</div>

<br><div class="expandable" onclick="OnToggleTOCLevel1('dynamicCodeDiv')">Show Complete Compilation Source:</div>

<div id="dynamicCodeDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



Line 1:    #pragma checksum &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot; &quot;{406ea660-64cf-4c82-b6f0-42d48172a799}&quot; &quot;1CFD175703181AB6B3BAC827D91F8797&quot;
Line 2:    
Line 3:    #line 1 &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot;
Line 4:    
Line 5:    using System;
Line 6:    using System.Net;
Line 7:    using System.Web;
Line 8:    using System.Collections;
Line 9:    using System.Collections.Specialized;
Line 10:   using System.IO;
Line 11:   public class ServiceRs : IHttpHandler {
Line 12:     public bool IsReusable { get { return false; } }
Line 13:     public void ProcessRequest(HttpContext ctx) {
Line 14:       String[] apel = {&quot;/ping&quot;, &quot;/add/&quot;, &quot;/subtract/&quot;, &quot;/multiply/&quot;, &quot;/divide/&quot;, &quot;/mod/&quot;, &quot;/intPow/&quot;, &quot;/toFpp&quot;}; 
Line 15:       String url = ctx.Request.RawUrl.ToString().ToLower();
Line 16:       int i=0, p=-1, a=0, b=0;
Line 17:       for (i=0; i&lt;apel.Length; i++) {
Line 18:         p = url.IndexOf(apel[i]);
Line 19:         if (p &gt; 0) break;
Line 20:       }
Line 21:       switch (i) {
Line 22:         case 0: 
Line 23:           if (ctx.Request.HttpMethod != &quot;GET&quot;) break;
Line 24:           ctx.Response.Write(ping()); 
Line 25:           break;
Line 26:         case 1: 
Line 27:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 28:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 29:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 30:           ctx.Response.Write(add(a, b).ToString() + &quot; method DELETE&quot;);
Line 31:           break;
Line 32:         case 2: 
Line 33:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 34:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 35:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 36:           ctx.Response.Write(subtract(a, b).ToString() + &quot; method DELETE&quot;);
Line 37:           break;
Line 38:         case 3: 
Line 39:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 40:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 41:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 42:           ctx.Response.Write(multiply(a, b).ToString() + &quot; method DELETE&quot;);
Line 43:           break;
Line 44:         case 4: 
Line 45:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 46:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 47:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 48:           ctx.Response.Write(divide(a, b).ToString() + &quot; method DELETE&quot;);
Line 49:           break;
Line 50:         case 5: 
Line 51:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 52:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 53:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 54:           ctx.Response.Write(mod(a, b).ToString() + &quot; method DELETE&quot;);
Line 55:           break;
Line 56:         case 6: 
Line 57:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 58:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 59:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 60:           ctx.Response.Write(intPow(a, b).ToString() + &quot; method DELETE&quot;);
Line 61:           break;
Line 62:         case 7:
Line 63:           if (ctx.Request.HttpMethod != &quot;POST&quot;) break;
Line 64:           Stream body = ctx.Request.InputStream;
Line 65:           a = Convert.ToInt32(body.Length);
Line 66:           byte[] bBody = new byte[a];
Line 67:           body.Read(bBody, 0, a);
Line 68:           String infix = System.Text.Encoding.ASCII.GetString(bBody);
Line 69:           ctx.Response.Write(toFpp(infix).ToString() + &quot; method PUT&quot;); 
Line 70:           break;
Line 71:        default: break;
Line 72:       }
Line 73:     }
Line 74:     private static String tip = &quot;RESTful&quot;;
Line 75:     private static String pathServ = &quot;Service.ashx&quot;;
Line 76:     private static int port = 80;
Line 77:     public static String ping() {
Line 78:      String host = Dns.GetHostName();
Line 79:       return &quot;C# &quot; + tip + &quot; &quot; + pathServ + &quot;: &quot;+host +
Line 80:         &quot; (&quot; + Dns.GetHostAddresses(host)[0] + &quot;:&quot; + port + &quot;) &quot; + DateTime.Now;
Line 81:     }
Line 82:     public int add(int a, int b) {
Line 83:       return a+b;
Line 84:     }
Line 85:     public int subtract(int a, int b) {
Line 86:       return a-b;
Line 87:     }
Line 88:     public int multiply(int a, int b) {
Line 89:       return a*b;
Line 90:     }
Line 91:     public int divide(int a, int b) {
Line 92:      try {
Line 93:         return a/b;
Line 94:       } catch (Exception e) {
Line 95:         throw new Exception(&quot;divide: Impartire la zero&quot; + e);
Line 96:       }
Line 97:      }
Line 98:     public int mod(int a, int b) {
Line 99:       try {
Line 100:        return a%b;
Line 101:      } catch (Exception e) {
Line 102:        throw new Exception(&quot;mod: Impartire la zero&quot; + e);
Line 103:      }
Line 104:    }
Line 105:    public int intPow(int a, int b) {
Line 106:      int p=1;
Line 107:      try {
Line 108:        for (int i=1; i&lt;= b; i++, p *= a);
Line 109:        return p;
Line 110:      } catch (Exception e) {
Line 111:        throw new Exception(&quot;intPow: depasire&quot; + e);
Line 112:      }
Line 113:    }
Line 114:    public String toFpp(String infix) {
Line 115:      infix = infix.Trim();
Line 116:      int i, p, varf =-1;
Line 117:      char c, u;
Line 118:      String s, d, r;
Line 119:      String postfix = &quot;&quot;;
Line 120:      String eval = &quot;&quot;;
Line 121:      String apeluri = &quot;&quot;;
Line 122:      String operatori = &quot;+-*/%^&quot;;
Line 123:      String priority = &quot;112223&quot;;
Line 124:      String albe = &quot; \t\n\r&quot;;
Line 125:      String alfabet = &quot;0123456789&quot;+operatori+albe+&quot;()&quot;;
Line 126:      ArrayList stiva = new ArrayList();
Line 127:      ArrayList operanzi = new ArrayList();
Line 128:      StringBuilder sb = new StringBuilder(infix);
Line 129:      for ( i=sb.Length-1; i&gt;=0; i--) {
Line 130:        c = sb[i];
Line 131:        if (alfabet.IndexOf(c) == -1) return infix+&quot;\nERROR caracter interzis!\n&quot;;
Line 132:        if (albe.IndexOf(c) &gt;= 0) sb.Remove(i, 1);
Line 133:        if (i &lt; sb.Length-1) u = sb[i+1]; else u = ' ';
Line 134:        if (c == '(')
Line 135:          if (u == '+')
Line 136:            sb.Remove(i+1, 1);
Line 137:          else if (u == '-')
Line 138:            sb.Insert(i+1, '0');
Line 139:      } // Control alfabet, sters toate spatiile albe, rezolvat + si - unar
Line 140:      if (sb.Length &gt; 0)
Line 141:        if (sb[0] == '+')
Line 142:          sb.Remove(0, 1);
Line 143:        else if (sb[0] == '-')
Line 144:          sb.Insert(0, '0');
Line 145:      for ( ; sb.Length &gt;0; ) {
Line 146:        c = sb[0];
Line 147:        i = operatori.IndexOf(c);
Line 148:        if (char.IsDigit(c)) { // operand
Line 149:          for ( i=0; i &lt; sb.Length &amp;&amp; char.IsDigit(sb[i]); i++) ;
Line 150:          postfix += &quot;#&quot;+sb.ToString().Substring(0,i)+&quot;|&quot;;
Line 151:          eval += &quot;#&quot;;
Line 152:          sb.Remove(0,i-1);
Line 153:        } else if (i != -1) { // operatori
Line 154:          for ( ; ; ) {
Line 155:            if (varf &lt; 0) break;
Line 156:            p = operatori.IndexOf(stiva[varf].ToString());
Line 157:            if (p &lt; 0 || priority[p] &lt; priority[i]) break;
Line 158:            p = eval.Length;
Line 159:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 160:            postfix += stiva[varf];
Line 161:            eval = eval.Substring(0, p-1);
Line 162:            stiva.RemoveAt(varf);
Line 163:            varf--;
Line 164:          }
Line 165:          stiva.Add(c);
Line 166:          varf++;
Line 167:        } else if (c == '(') { // pune ( in stiva
Line 168:          stiva.Add(c);
Line 169:          varf++;
Line 170:        } else if (c == ')') { // extrage din stiva pana la ( si genereaza corespunzator
Line 171:          for ( ;  ;  ) {
Line 172:            if (varf &lt; 0) return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 173:            c = (char)stiva[varf];
Line 174:            stiva.RemoveAt(varf);
Line 175:            varf--;
Line 176:            if (c == '(') break;
Line 177:            p = eval.Length;
Line 178:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 179:            postfix += c;
Line 180:            eval = eval.Substring(0, p-1);
Line 181:          }
Line 182:        }
Line 183:        sb.Remove(0, 1);
Line 184:      }
Line 185:      for ( ; varf &gt;= 0;  ) { // golestre stiva de ultimii operatori si genereaza
Line 186:        if ((char)stiva[varf] == '(') return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 187:        p = eval.Length;
Line 188:        if (p &lt; 2) return infix+&quot;ERROR operatori fara operanzi\n&quot;;
Line 189:        eval = eval.Substring(0, p-1);
Line 190:        postfix += stiva[varf];
Line 191:        stiva.RemoveAt(varf);
Line 192:        varf--;
Line 193:      }
Line 194:      if (eval.Length != 1) return infix+&quot;\nERROR prea multi operanzi\n&quot;;
Line 195:      sb = new StringBuilder(postfix);
Line 196:      p = 0;
Line 197:      for ( ; sb.Length &gt;0; ) { // construieste succesiunea de apeluri
Line 198:        c = sb[0];
Line 199:        if (c == '#') {
Line 200:          i = sb.ToString().IndexOf(&quot;|&quot;);
Line 201:          operanzi.Add(&quot;\&quot;&quot;+sb.ToString().Substring(1,i-1)+&quot;\&quot;&quot;);
Line 202:          sb.Remove(0,i+1);
Line 203:        } else {
Line 204:          sb.Remove(0, 1);
Line 205:          varf = operanzi.Count-1;
Line 206:          d = (String)operanzi[varf];
Line 207:          s = (String)operanzi[varf-1];
Line 208:          if (s[0] == '\&quot;' &amp;&amp; d[0] == '\&quot;') r = &quot;&quot;+(p++);
Line 209:          else if (s[0] == '\&quot;') r = d;
Line 210:          else r = s;
Line 211:          operanzi[varf-1] = r;
Line 212:          operanzi.RemoveAt(varf);
Line 213:          apeluri += r+&quot;=&quot;+s+c+d+&quot;\n&quot;;
Line 214:        }
Line 215:      }
Line 216:      apeluri += operanzi[0]+&quot;\n&quot;;
Line 217:      return apeluri+postfix+&quot;\n&quot;+infix;
Line 218:    } 
Line 219:  }
Line 220:  
Line 221:  
Line 222:  #line default
Line 223:  #line hidden
Line 224:  </pre></code>



                  </td>

               </tr>

            </table>



            



</div>



    <script type="text/javascript">

    function OnToggleTOCLevel1(level2ID)

    {

      var elemLevel2 = document.getElementById(level2ID);

      if (elemLevel2.style.display == 'none')

      {

        elemLevel2.style.display = '';

      }

      else {

        elemLevel2.style.display = 'none';

      }

    }

    </script>

                          <br><br>



            <hr width=100% size=1 color=silver>



            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3614



            </font>



    </body>

</html>

<!-- 

[HttpCompileException]: \\172.30.0.5\iis\~florin\ServiceRs.ashx(125): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

   at System.Web.Compilation.AssemblyBuilder.Compile()

   at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()

   at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.UI.SimpleHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)

   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)

   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

--><!-- 

This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using &lt;customErrors mode="Off"/&gt;. Consider using &lt;customErrors mode="On"/&gt; or &lt;customErrors mode="RemoteOnly"/&gt; in production environments.-->

Evaluari de expresii:

Serv0:	toFpp:
<html>

    <head>

        <title>Compilation Error</title>

        <style>

         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 

         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}

         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}

         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }

         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }

         pre {font-family:"Lucida Console";font-size: .9em}

         .marker {font-weight: bold; color: black;text-decoration: none;}

         .version {color: gray;}

         .error {margin-bottom: 10px;}

         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

        </style>

    </head>



    <body bgcolor="white">



            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>



            <h2> <i>Compilation Error</i> </h2></span>



            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">



            <b> Description: </b>An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

            <br><br>



            <b> Compiler Error Message: </b>CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)<br><br>

<b>Source Error:</b><br><br>

            <table width=100% bgcolor="#ffffcc">

               <tr><td>

                              </td></tr>

               <tr>

                  <td>

                      <code><pre>



Line 123:    ArrayList stiva = new ArrayList();

Line 124:    ArrayList operanzi = new ArrayList();

<font color=red>Line 125:    StringBuilder sb = new StringBuilder(infix);

</font>Line 126:    for ( i=sb.Length-1; i&gt;=0; i--) {

Line 127:      c = sb[i];</pre></code>



                  </td>

               </tr>

            </table>



            <br>



            <b>Source File:</b> \\172.30.0.5\iis\~florin\ServiceRs.ashx

            &nbsp;&nbsp; <b>Line:</b>  125

            <br><br>

<br><div class="expandable" onclick="OnToggleTOCLevel1('compilerOutputDiv')">Show Detailed Compiler Output:</div>

<div id="compilerOutputDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



C:\WINDOWS\SysWOW64\inetsrv&gt; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe&quot; /t:library /utf8output /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll&quot; /R:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\MySql.Data\5.2.5.0__c5687fc88969c44d\MySql.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll&quot; /out:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.dll&quot; /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701  &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.0.cs&quot; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.1.cs&quot;





Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.3053

for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727

Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.



\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,5): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,28): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(127,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(130,32): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(138,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(140,16): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(143,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(146,50): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(192,14): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(195,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

</pre></code>



                  </td>

               </tr>

            </table>



            



</div>

<br><div class="expandable" onclick="OnToggleTOCLevel1('dynamicCodeDiv')">Show Complete Compilation Source:</div>

<div id="dynamicCodeDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



Line 1:    #pragma checksum &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot; &quot;{406ea660-64cf-4c82-b6f0-42d48172a799}&quot; &quot;1CFD175703181AB6B3BAC827D91F8797&quot;
Line 2:    
Line 3:    #line 1 &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot;
Line 4:    
Line 5:    using System;
Line 6:    using System.Net;
Line 7:    using System.Web;
Line 8:    using System.Collections;
Line 9:    using System.Collections.Specialized;
Line 10:   using System.IO;
Line 11:   public class ServiceRs : IHttpHandler {
Line 12:     public bool IsReusable { get { return false; } }
Line 13:     public void ProcessRequest(HttpContext ctx) {
Line 14:       String[] apel = {&quot;/ping&quot;, &quot;/add/&quot;, &quot;/subtract/&quot;, &quot;/multiply/&quot;, &quot;/divide/&quot;, &quot;/mod/&quot;, &quot;/intPow/&quot;, &quot;/toFpp&quot;}; 
Line 15:       String url = ctx.Request.RawUrl.ToString().ToLower();
Line 16:       int i=0, p=-1, a=0, b=0;
Line 17:       for (i=0; i&lt;apel.Length; i++) {
Line 18:         p = url.IndexOf(apel[i]);
Line 19:         if (p &gt; 0) break;
Line 20:       }
Line 21:       switch (i) {
Line 22:         case 0: 
Line 23:           if (ctx.Request.HttpMethod != &quot;GET&quot;) break;
Line 24:           ctx.Response.Write(ping()); 
Line 25:           break;
Line 26:         case 1: 
Line 27:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 28:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 29:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 30:           ctx.Response.Write(add(a, b).ToString() + &quot; method DELETE&quot;);
Line 31:           break;
Line 32:         case 2: 
Line 33:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 34:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 35:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 36:           ctx.Response.Write(subtract(a, b).ToString() + &quot; method DELETE&quot;);
Line 37:           break;
Line 38:         case 3: 
Line 39:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 40:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 41:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 42:           ctx.Response.Write(multiply(a, b).ToString() + &quot; method DELETE&quot;);
Line 43:           break;
Line 44:         case 4: 
Line 45:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 46:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 47:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 48:           ctx.Response.Write(divide(a, b).ToString() + &quot; method DELETE&quot;);
Line 49:           break;
Line 50:         case 5: 
Line 51:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 52:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 53:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 54:           ctx.Response.Write(mod(a, b).ToString() + &quot; method DELETE&quot;);
Line 55:           break;
Line 56:         case 6: 
Line 57:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 58:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 59:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 60:           ctx.Response.Write(intPow(a, b).ToString() + &quot; method DELETE&quot;);
Line 61:           break;
Line 62:         case 7:
Line 63:           if (ctx.Request.HttpMethod != &quot;POST&quot;) break;
Line 64:           Stream body = ctx.Request.InputStream;
Line 65:           a = Convert.ToInt32(body.Length);
Line 66:           byte[] bBody = new byte[a];
Line 67:           body.Read(bBody, 0, a);
Line 68:           String infix = System.Text.Encoding.ASCII.GetString(bBody);
Line 69:           ctx.Response.Write(toFpp(infix).ToString() + &quot; method PUT&quot;); 
Line 70:           break;
Line 71:        default: break;
Line 72:       }
Line 73:     }
Line 74:     private static String tip = &quot;RESTful&quot;;
Line 75:     private static String pathServ = &quot;Service.ashx&quot;;
Line 76:     private static int port = 80;
Line 77:     public static String ping() {
Line 78:      String host = Dns.GetHostName();
Line 79:       return &quot;C# &quot; + tip + &quot; &quot; + pathServ + &quot;: &quot;+host +
Line 80:         &quot; (&quot; + Dns.GetHostAddresses(host)[0] + &quot;:&quot; + port + &quot;) &quot; + DateTime.Now;
Line 81:     }
Line 82:     public int add(int a, int b) {
Line 83:       return a+b;
Line 84:     }
Line 85:     public int subtract(int a, int b) {
Line 86:       return a-b;
Line 87:     }
Line 88:     public int multiply(int a, int b) {
Line 89:       return a*b;
Line 90:     }
Line 91:     public int divide(int a, int b) {
Line 92:      try {
Line 93:         return a/b;
Line 94:       } catch (Exception e) {
Line 95:         throw new Exception(&quot;divide: Impartire la zero&quot; + e);
Line 96:       }
Line 97:      }
Line 98:     public int mod(int a, int b) {
Line 99:       try {
Line 100:        return a%b;
Line 101:      } catch (Exception e) {
Line 102:        throw new Exception(&quot;mod: Impartire la zero&quot; + e);
Line 103:      }
Line 104:    }
Line 105:    public int intPow(int a, int b) {
Line 106:      int p=1;
Line 107:      try {
Line 108:        for (int i=1; i&lt;= b; i++, p *= a);
Line 109:        return p;
Line 110:      } catch (Exception e) {
Line 111:        throw new Exception(&quot;intPow: depasire&quot; + e);
Line 112:      }
Line 113:    }
Line 114:    public String toFpp(String infix) {
Line 115:      infix = infix.Trim();
Line 116:      int i, p, varf =-1;
Line 117:      char c, u;
Line 118:      String s, d, r;
Line 119:      String postfix = &quot;&quot;;
Line 120:      String eval = &quot;&quot;;
Line 121:      String apeluri = &quot;&quot;;
Line 122:      String operatori = &quot;+-*/%^&quot;;
Line 123:      String priority = &quot;112223&quot;;
Line 124:      String albe = &quot; \t\n\r&quot;;
Line 125:      String alfabet = &quot;0123456789&quot;+operatori+albe+&quot;()&quot;;
Line 126:      ArrayList stiva = new ArrayList();
Line 127:      ArrayList operanzi = new ArrayList();
Line 128:      StringBuilder sb = new StringBuilder(infix);
Line 129:      for ( i=sb.Length-1; i&gt;=0; i--) {
Line 130:        c = sb[i];
Line 131:        if (alfabet.IndexOf(c) == -1) return infix+&quot;\nERROR caracter interzis!\n&quot;;
Line 132:        if (albe.IndexOf(c) &gt;= 0) sb.Remove(i, 1);
Line 133:        if (i &lt; sb.Length-1) u = sb[i+1]; else u = ' ';
Line 134:        if (c == '(')
Line 135:          if (u == '+')
Line 136:            sb.Remove(i+1, 1);
Line 137:          else if (u == '-')
Line 138:            sb.Insert(i+1, '0');
Line 139:      } // Control alfabet, sters toate spatiile albe, rezolvat + si - unar
Line 140:      if (sb.Length &gt; 0)
Line 141:        if (sb[0] == '+')
Line 142:          sb.Remove(0, 1);
Line 143:        else if (sb[0] == '-')
Line 144:          sb.Insert(0, '0');
Line 145:      for ( ; sb.Length &gt;0; ) {
Line 146:        c = sb[0];
Line 147:        i = operatori.IndexOf(c);
Line 148:        if (char.IsDigit(c)) { // operand
Line 149:          for ( i=0; i &lt; sb.Length &amp;&amp; char.IsDigit(sb[i]); i++) ;
Line 150:          postfix += &quot;#&quot;+sb.ToString().Substring(0,i)+&quot;|&quot;;
Line 151:          eval += &quot;#&quot;;
Line 152:          sb.Remove(0,i-1);
Line 153:        } else if (i != -1) { // operatori
Line 154:          for ( ; ; ) {
Line 155:            if (varf &lt; 0) break;
Line 156:            p = operatori.IndexOf(stiva[varf].ToString());
Line 157:            if (p &lt; 0 || priority[p] &lt; priority[i]) break;
Line 158:            p = eval.Length;
Line 159:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 160:            postfix += stiva[varf];
Line 161:            eval = eval.Substring(0, p-1);
Line 162:            stiva.RemoveAt(varf);
Line 163:            varf--;
Line 164:          }
Line 165:          stiva.Add(c);
Line 166:          varf++;
Line 167:        } else if (c == '(') { // pune ( in stiva
Line 168:          stiva.Add(c);
Line 169:          varf++;
Line 170:        } else if (c == ')') { // extrage din stiva pana la ( si genereaza corespunzator
Line 171:          for ( ;  ;  ) {
Line 172:            if (varf &lt; 0) return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 173:            c = (char)stiva[varf];
Line 174:            stiva.RemoveAt(varf);
Line 175:            varf--;
Line 176:            if (c == '(') break;
Line 177:            p = eval.Length;
Line 178:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 179:            postfix += c;
Line 180:            eval = eval.Substring(0, p-1);
Line 181:          }
Line 182:        }
Line 183:        sb.Remove(0, 1);
Line 184:      }
Line 185:      for ( ; varf &gt;= 0;  ) { // golestre stiva de ultimii operatori si genereaza
Line 186:        if ((char)stiva[varf] == '(') return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 187:        p = eval.Length;
Line 188:        if (p &lt; 2) return infix+&quot;ERROR operatori fara operanzi\n&quot;;
Line 189:        eval = eval.Substring(0, p-1);
Line 190:        postfix += stiva[varf];
Line 191:        stiva.RemoveAt(varf);
Line 192:        varf--;
Line 193:      }
Line 194:      if (eval.Length != 1) return infix+&quot;\nERROR prea multi operanzi\n&quot;;
Line 195:      sb = new StringBuilder(postfix);
Line 196:      p = 0;
Line 197:      for ( ; sb.Length &gt;0; ) { // construieste succesiunea de apeluri
Line 198:        c = sb[0];
Line 199:        if (c == '#') {
Line 200:          i = sb.ToString().IndexOf(&quot;|&quot;);
Line 201:          operanzi.Add(&quot;\&quot;&quot;+sb.ToString().Substring(1,i-1)+&quot;\&quot;&quot;);
Line 202:          sb.Remove(0,i+1);
Line 203:        } else {
Line 204:          sb.Remove(0, 1);
Line 205:          varf = operanzi.Count-1;
Line 206:          d = (String)operanzi[varf];
Line 207:          s = (String)operanzi[varf-1];
Line 208:          if (s[0] == '\&quot;' &amp;&amp; d[0] == '\&quot;') r = &quot;&quot;+(p++);
Line 209:          else if (s[0] == '\&quot;') r = d;
Line 210:          else r = s;
Line 211:          operanzi[varf-1] = r;
Line 212:          operanzi.RemoveAt(varf);
Line 213:          apeluri += r+&quot;=&quot;+s+c+d+&quot;\n&quot;;
Line 214:        }
Line 215:      }
Line 216:      apeluri += operanzi[0]+&quot;\n&quot;;
Line 217:      return apeluri+postfix+&quot;\n&quot;+infix;
Line 218:    } 
Line 219:  }
Line 220:  
Line 221:  
Line 222:  #line default
Line 223:  #line hidden
Line 224:  </pre></code>



                  </td>

               </tr>

            </table>



            



</div>



    <script type="text/javascript">

    function OnToggleTOCLevel1(level2ID)

    {

      var elemLevel2 = document.getElementById(level2ID);

      if (elemLevel2.style.display == 'none')

      {

        elemLevel2.style.display = '';

      }

      else {

        elemLevel2.style.display = 'none';

      }

    }

    </script>

                          <br><br>



            <hr width=100% size=1 color=silver>



            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3614



            </font>



    </body>

</html>

<!-- 

[HttpCompileException]: \\172.30.0.5\iis\~florin\ServiceRs.ashx(125): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

   at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.UI.SimpleHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)

   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)

   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

--><!-- 

This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using &lt;customErrors mode="Off"/&gt;. Consider using &lt;customErrors mode="On"/&gt; or &lt;customErrors mode="RemoteOnly"/&gt; in production environments.-->

Serv0:	toFpp:
<html>

    <head>

        <title>Compilation Error</title>

        <style>

         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 

         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}

         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}

         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }

         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }

         pre {font-family:"Lucida Console";font-size: .9em}

         .marker {font-weight: bold; color: black;text-decoration: none;}

         .version {color: gray;}

         .error {margin-bottom: 10px;}

         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

        </style>

    </head>



    <body bgcolor="white">



            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>



            <h2> <i>Compilation Error</i> </h2></span>



            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">



            <b> Description: </b>An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

            <br><br>



            <b> Compiler Error Message: </b>CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)<br><br>

<b>Source Error:</b><br><br>

            <table width=100% bgcolor="#ffffcc">

               <tr><td>

                              </td></tr>

               <tr>

                  <td>

                      <code><pre>



Line 123:    ArrayList stiva = new ArrayList();

Line 124:    ArrayList operanzi = new ArrayList();

<font color=red>Line 125:    StringBuilder sb = new StringBuilder(infix);

</font>Line 126:    for ( i=sb.Length-1; i&gt;=0; i--) {

Line 127:      c = sb[i];</pre></code>



                  </td>

               </tr>

            </table>



            <br>



            <b>Source File:</b> \\172.30.0.5\iis\~florin\ServiceRs.ashx

            &nbsp;&nbsp; <b>Line:</b>  125

            <br><br>

<br><div class="expandable" onclick="OnToggleTOCLevel1('compilerOutputDiv')">Show Detailed Compiler Output:</div>

<div id="compilerOutputDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



C:\WINDOWS\SysWOW64\inetsrv&gt; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe&quot; /t:library /utf8output /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll&quot; /R:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\MySql.Data\5.2.5.0__c5687fc88969c44d\MySql.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll&quot; /out:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.dll&quot; /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701  &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.0.cs&quot; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.1.cs&quot;





Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.3053

for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727

Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.



\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,5): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,28): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(127,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(130,32): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(138,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(140,16): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(143,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(146,50): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(192,14): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(195,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

</pre></code>



                  </td>

               </tr>

            </table>



            



</div>

<br><div class="expandable" onclick="OnToggleTOCLevel1('dynamicCodeDiv')">Show Complete Compilation Source:</div>

<div id="dynamicCodeDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



Line 1:    #pragma checksum &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot; &quot;{406ea660-64cf-4c82-b6f0-42d48172a799}&quot; &quot;1CFD175703181AB6B3BAC827D91F8797&quot;
Line 2:    
Line 3:    #line 1 &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot;
Line 4:    
Line 5:    using System;
Line 6:    using System.Net;
Line 7:    using System.Web;
Line 8:    using System.Collections;
Line 9:    using System.Collections.Specialized;
Line 10:   using System.IO;
Line 11:   public class ServiceRs : IHttpHandler {
Line 12:     public bool IsReusable { get { return false; } }
Line 13:     public void ProcessRequest(HttpContext ctx) {
Line 14:       String[] apel = {&quot;/ping&quot;, &quot;/add/&quot;, &quot;/subtract/&quot;, &quot;/multiply/&quot;, &quot;/divide/&quot;, &quot;/mod/&quot;, &quot;/intPow/&quot;, &quot;/toFpp&quot;}; 
Line 15:       String url = ctx.Request.RawUrl.ToString().ToLower();
Line 16:       int i=0, p=-1, a=0, b=0;
Line 17:       for (i=0; i&lt;apel.Length; i++) {
Line 18:         p = url.IndexOf(apel[i]);
Line 19:         if (p &gt; 0) break;
Line 20:       }
Line 21:       switch (i) {
Line 22:         case 0: 
Line 23:           if (ctx.Request.HttpMethod != &quot;GET&quot;) break;
Line 24:           ctx.Response.Write(ping()); 
Line 25:           break;
Line 26:         case 1: 
Line 27:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 28:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 29:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 30:           ctx.Response.Write(add(a, b).ToString() + &quot; method DELETE&quot;);
Line 31:           break;
Line 32:         case 2: 
Line 33:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 34:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 35:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 36:           ctx.Response.Write(subtract(a, b).ToString() + &quot; method DELETE&quot;);
Line 37:           break;
Line 38:         case 3: 
Line 39:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 40:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 41:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 42:           ctx.Response.Write(multiply(a, b).ToString() + &quot; method DELETE&quot;);
Line 43:           break;
Line 44:         case 4: 
Line 45:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 46:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 47:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 48:           ctx.Response.Write(divide(a, b).ToString() + &quot; method DELETE&quot;);
Line 49:           break;
Line 50:         case 5: 
Line 51:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 52:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 53:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 54:           ctx.Response.Write(mod(a, b).ToString() + &quot; method DELETE&quot;);
Line 55:           break;
Line 56:         case 6: 
Line 57:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 58:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 59:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 60:           ctx.Response.Write(intPow(a, b).ToString() + &quot; method DELETE&quot;);
Line 61:           break;
Line 62:         case 7:
Line 63:           if (ctx.Request.HttpMethod != &quot;POST&quot;) break;
Line 64:           Stream body = ctx.Request.InputStream;
Line 65:           a = Convert.ToInt32(body.Length);
Line 66:           byte[] bBody = new byte[a];
Line 67:           body.Read(bBody, 0, a);
Line 68:           String infix = System.Text.Encoding.ASCII.GetString(bBody);
Line 69:           ctx.Response.Write(toFpp(infix).ToString() + &quot; method PUT&quot;); 
Line 70:           break;
Line 71:        default: break;
Line 72:       }
Line 73:     }
Line 74:     private static String tip = &quot;RESTful&quot;;
Line 75:     private static String pathServ = &quot;Service.ashx&quot;;
Line 76:     private static int port = 80;
Line 77:     public static String ping() {
Line 78:      String host = Dns.GetHostName();
Line 79:       return &quot;C# &quot; + tip + &quot; &quot; + pathServ + &quot;: &quot;+host +
Line 80:         &quot; (&quot; + Dns.GetHostAddresses(host)[0] + &quot;:&quot; + port + &quot;) &quot; + DateTime.Now;
Line 81:     }
Line 82:     public int add(int a, int b) {
Line 83:       return a+b;
Line 84:     }
Line 85:     public int subtract(int a, int b) {
Line 86:       return a-b;
Line 87:     }
Line 88:     public int multiply(int a, int b) {
Line 89:       return a*b;
Line 90:     }
Line 91:     public int divide(int a, int b) {
Line 92:      try {
Line 93:         return a/b;
Line 94:       } catch (Exception e) {
Line 95:         throw new Exception(&quot;divide: Impartire la zero&quot; + e);
Line 96:       }
Line 97:      }
Line 98:     public int mod(int a, int b) {
Line 99:       try {
Line 100:        return a%b;
Line 101:      } catch (Exception e) {
Line 102:        throw new Exception(&quot;mod: Impartire la zero&quot; + e);
Line 103:      }
Line 104:    }
Line 105:    public int intPow(int a, int b) {
Line 106:      int p=1;
Line 107:      try {
Line 108:        for (int i=1; i&lt;= b; i++, p *= a);
Line 109:        return p;
Line 110:      } catch (Exception e) {
Line 111:        throw new Exception(&quot;intPow: depasire&quot; + e);
Line 112:      }
Line 113:    }
Line 114:    public String toFpp(String infix) {
Line 115:      infix = infix.Trim();
Line 116:      int i, p, varf =-1;
Line 117:      char c, u;
Line 118:      String s, d, r;
Line 119:      String postfix = &quot;&quot;;
Line 120:      String eval = &quot;&quot;;
Line 121:      String apeluri = &quot;&quot;;
Line 122:      String operatori = &quot;+-*/%^&quot;;
Line 123:      String priority = &quot;112223&quot;;
Line 124:      String albe = &quot; \t\n\r&quot;;
Line 125:      String alfabet = &quot;0123456789&quot;+operatori+albe+&quot;()&quot;;
Line 126:      ArrayList stiva = new ArrayList();
Line 127:      ArrayList operanzi = new ArrayList();
Line 128:      StringBuilder sb = new StringBuilder(infix);
Line 129:      for ( i=sb.Length-1; i&gt;=0; i--) {
Line 130:        c = sb[i];
Line 131:        if (alfabet.IndexOf(c) == -1) return infix+&quot;\nERROR caracter interzis!\n&quot;;
Line 132:        if (albe.IndexOf(c) &gt;= 0) sb.Remove(i, 1);
Line 133:        if (i &lt; sb.Length-1) u = sb[i+1]; else u = ' ';
Line 134:        if (c == '(')
Line 135:          if (u == '+')
Line 136:            sb.Remove(i+1, 1);
Line 137:          else if (u == '-')
Line 138:            sb.Insert(i+1, '0');
Line 139:      } // Control alfabet, sters toate spatiile albe, rezolvat + si - unar
Line 140:      if (sb.Length &gt; 0)
Line 141:        if (sb[0] == '+')
Line 142:          sb.Remove(0, 1);
Line 143:        else if (sb[0] == '-')
Line 144:          sb.Insert(0, '0');
Line 145:      for ( ; sb.Length &gt;0; ) {
Line 146:        c = sb[0];
Line 147:        i = operatori.IndexOf(c);
Line 148:        if (char.IsDigit(c)) { // operand
Line 149:          for ( i=0; i &lt; sb.Length &amp;&amp; char.IsDigit(sb[i]); i++) ;
Line 150:          postfix += &quot;#&quot;+sb.ToString().Substring(0,i)+&quot;|&quot;;
Line 151:          eval += &quot;#&quot;;
Line 152:          sb.Remove(0,i-1);
Line 153:        } else if (i != -1) { // operatori
Line 154:          for ( ; ; ) {
Line 155:            if (varf &lt; 0) break;
Line 156:            p = operatori.IndexOf(stiva[varf].ToString());
Line 157:            if (p &lt; 0 || priority[p] &lt; priority[i]) break;
Line 158:            p = eval.Length;
Line 159:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 160:            postfix += stiva[varf];
Line 161:            eval = eval.Substring(0, p-1);
Line 162:            stiva.RemoveAt(varf);
Line 163:            varf--;
Line 164:          }
Line 165:          stiva.Add(c);
Line 166:          varf++;
Line 167:        } else if (c == '(') { // pune ( in stiva
Line 168:          stiva.Add(c);
Line 169:          varf++;
Line 170:        } else if (c == ')') { // extrage din stiva pana la ( si genereaza corespunzator
Line 171:          for ( ;  ;  ) {
Line 172:            if (varf &lt; 0) return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 173:            c = (char)stiva[varf];
Line 174:            stiva.RemoveAt(varf);
Line 175:            varf--;
Line 176:            if (c == '(') break;
Line 177:            p = eval.Length;
Line 178:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 179:            postfix += c;
Line 180:            eval = eval.Substring(0, p-1);
Line 181:          }
Line 182:        }
Line 183:        sb.Remove(0, 1);
Line 184:      }
Line 185:      for ( ; varf &gt;= 0;  ) { // golestre stiva de ultimii operatori si genereaza
Line 186:        if ((char)stiva[varf] == '(') return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 187:        p = eval.Length;
Line 188:        if (p &lt; 2) return infix+&quot;ERROR operatori fara operanzi\n&quot;;
Line 189:        eval = eval.Substring(0, p-1);
Line 190:        postfix += stiva[varf];
Line 191:        stiva.RemoveAt(varf);
Line 192:        varf--;
Line 193:      }
Line 194:      if (eval.Length != 1) return infix+&quot;\nERROR prea multi operanzi\n&quot;;
Line 195:      sb = new StringBuilder(postfix);
Line 196:      p = 0;
Line 197:      for ( ; sb.Length &gt;0; ) { // construieste succesiunea de apeluri
Line 198:        c = sb[0];
Line 199:        if (c == '#') {
Line 200:          i = sb.ToString().IndexOf(&quot;|&quot;);
Line 201:          operanzi.Add(&quot;\&quot;&quot;+sb.ToString().Substring(1,i-1)+&quot;\&quot;&quot;);
Line 202:          sb.Remove(0,i+1);
Line 203:        } else {
Line 204:          sb.Remove(0, 1);
Line 205:          varf = operanzi.Count-1;
Line 206:          d = (String)operanzi[varf];
Line 207:          s = (String)operanzi[varf-1];
Line 208:          if (s[0] == '\&quot;' &amp;&amp; d[0] == '\&quot;') r = &quot;&quot;+(p++);
Line 209:          else if (s[0] == '\&quot;') r = d;
Line 210:          else r = s;
Line 211:          operanzi[varf-1] = r;
Line 212:          operanzi.RemoveAt(varf);
Line 213:          apeluri += r+&quot;=&quot;+s+c+d+&quot;\n&quot;;
Line 214:        }
Line 215:      }
Line 216:      apeluri += operanzi[0]+&quot;\n&quot;;
Line 217:      return apeluri+postfix+&quot;\n&quot;+infix;
Line 218:    } 
Line 219:  }
Line 220:  
Line 221:  
Line 222:  #line default
Line 223:  #line hidden
Line 224:  </pre></code>



                  </td>

               </tr>

            </table>



            



</div>



    <script type="text/javascript">

    function OnToggleTOCLevel1(level2ID)

    {

      var elemLevel2 = document.getElementById(level2ID);

      if (elemLevel2.style.display == 'none')

      {

        elemLevel2.style.display = '';

      }

      else {

        elemLevel2.style.display = 'none';

      }

    }

    </script>

                          <br><br>



            <hr width=100% size=1 color=silver>



            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3614



            </font>



    </body>

</html>

<!-- 

[HttpCompileException]: \\172.30.0.5\iis\~florin\ServiceRs.ashx(125): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

   at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.UI.SimpleHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)

   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)

   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

--><!-- 

This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using &lt;customErrors mode="Off"/&gt;. Consider using &lt;customErrors mode="On"/&gt; or &lt;customErrors mode="RemoteOnly"/&gt; in production environments.-->

Serv0:	toFpp:
<html>

    <head>

        <title>Compilation Error</title>

        <style>

         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 

         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}

         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}

         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }

         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }

         pre {font-family:"Lucida Console";font-size: .9em}

         .marker {font-weight: bold; color: black;text-decoration: none;}

         .version {color: gray;}

         .error {margin-bottom: 10px;}

         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

        </style>

    </head>



    <body bgcolor="white">



            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>



            <h2> <i>Compilation Error</i> </h2></span>



            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">



            <b> Description: </b>An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

            <br><br>



            <b> Compiler Error Message: </b>CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)<br><br>

<b>Source Error:</b><br><br>

            <table width=100% bgcolor="#ffffcc">

               <tr><td>

                              </td></tr>

               <tr>

                  <td>

                      <code><pre>



Line 123:    ArrayList stiva = new ArrayList();

Line 124:    ArrayList operanzi = new ArrayList();

<font color=red>Line 125:    StringBuilder sb = new StringBuilder(infix);

</font>Line 126:    for ( i=sb.Length-1; i&gt;=0; i--) {

Line 127:      c = sb[i];</pre></code>



                  </td>

               </tr>

            </table>



            <br>



            <b>Source File:</b> \\172.30.0.5\iis\~florin\ServiceRs.ashx

            &nbsp;&nbsp; <b>Line:</b>  125

            <br><br>

<br><div class="expandable" onclick="OnToggleTOCLevel1('compilerOutputDiv')">Show Detailed Compiler Output:</div>

<div id="compilerOutputDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



C:\WINDOWS\SysWOW64\inetsrv&gt; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe&quot; /t:library /utf8output /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll&quot; /R:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\MySql.Data\5.2.5.0__c5687fc88969c44d\MySql.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll&quot; /out:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.dll&quot; /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701  &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.0.cs&quot; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.1.cs&quot;





Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.3053

for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727

Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.



\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,5): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,28): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(127,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(130,32): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(138,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(140,16): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(143,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(146,50): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(192,14): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(195,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

</pre></code>



                  </td>

               </tr>

            </table>



            



</div>

<br><div class="expandable" onclick="OnToggleTOCLevel1('dynamicCodeDiv')">Show Complete Compilation Source:</div>

<div id="dynamicCodeDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



Line 1:    #pragma checksum &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot; &quot;{406ea660-64cf-4c82-b6f0-42d48172a799}&quot; &quot;1CFD175703181AB6B3BAC827D91F8797&quot;
Line 2:    
Line 3:    #line 1 &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot;
Line 4:    
Line 5:    using System;
Line 6:    using System.Net;
Line 7:    using System.Web;
Line 8:    using System.Collections;
Line 9:    using System.Collections.Specialized;
Line 10:   using System.IO;
Line 11:   public class ServiceRs : IHttpHandler {
Line 12:     public bool IsReusable { get { return false; } }
Line 13:     public void ProcessRequest(HttpContext ctx) {
Line 14:       String[] apel = {&quot;/ping&quot;, &quot;/add/&quot;, &quot;/subtract/&quot;, &quot;/multiply/&quot;, &quot;/divide/&quot;, &quot;/mod/&quot;, &quot;/intPow/&quot;, &quot;/toFpp&quot;}; 
Line 15:       String url = ctx.Request.RawUrl.ToString().ToLower();
Line 16:       int i=0, p=-1, a=0, b=0;
Line 17:       for (i=0; i&lt;apel.Length; i++) {
Line 18:         p = url.IndexOf(apel[i]);
Line 19:         if (p &gt; 0) break;
Line 20:       }
Line 21:       switch (i) {
Line 22:         case 0: 
Line 23:           if (ctx.Request.HttpMethod != &quot;GET&quot;) break;
Line 24:           ctx.Response.Write(ping()); 
Line 25:           break;
Line 26:         case 1: 
Line 27:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 28:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 29:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 30:           ctx.Response.Write(add(a, b).ToString() + &quot; method DELETE&quot;);
Line 31:           break;
Line 32:         case 2: 
Line 33:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 34:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 35:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 36:           ctx.Response.Write(subtract(a, b).ToString() + &quot; method DELETE&quot;);
Line 37:           break;
Line 38:         case 3: 
Line 39:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 40:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 41:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 42:           ctx.Response.Write(multiply(a, b).ToString() + &quot; method DELETE&quot;);
Line 43:           break;
Line 44:         case 4: 
Line 45:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 46:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 47:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 48:           ctx.Response.Write(divide(a, b).ToString() + &quot; method DELETE&quot;);
Line 49:           break;
Line 50:         case 5: 
Line 51:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 52:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 53:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 54:           ctx.Response.Write(mod(a, b).ToString() + &quot; method DELETE&quot;);
Line 55:           break;
Line 56:         case 6: 
Line 57:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 58:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 59:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 60:           ctx.Response.Write(intPow(a, b).ToString() + &quot; method DELETE&quot;);
Line 61:           break;
Line 62:         case 7:
Line 63:           if (ctx.Request.HttpMethod != &quot;POST&quot;) break;
Line 64:           Stream body = ctx.Request.InputStream;
Line 65:           a = Convert.ToInt32(body.Length);
Line 66:           byte[] bBody = new byte[a];
Line 67:           body.Read(bBody, 0, a);
Line 68:           String infix = System.Text.Encoding.ASCII.GetString(bBody);
Line 69:           ctx.Response.Write(toFpp(infix).ToString() + &quot; method PUT&quot;); 
Line 70:           break;
Line 71:        default: break;
Line 72:       }
Line 73:     }
Line 74:     private static String tip = &quot;RESTful&quot;;
Line 75:     private static String pathServ = &quot;Service.ashx&quot;;
Line 76:     private static int port = 80;
Line 77:     public static String ping() {
Line 78:      String host = Dns.GetHostName();
Line 79:       return &quot;C# &quot; + tip + &quot; &quot; + pathServ + &quot;: &quot;+host +
Line 80:         &quot; (&quot; + Dns.GetHostAddresses(host)[0] + &quot;:&quot; + port + &quot;) &quot; + DateTime.Now;
Line 81:     }
Line 82:     public int add(int a, int b) {
Line 83:       return a+b;
Line 84:     }
Line 85:     public int subtract(int a, int b) {
Line 86:       return a-b;
Line 87:     }
Line 88:     public int multiply(int a, int b) {
Line 89:       return a*b;
Line 90:     }
Line 91:     public int divide(int a, int b) {
Line 92:      try {
Line 93:         return a/b;
Line 94:       } catch (Exception e) {
Line 95:         throw new Exception(&quot;divide: Impartire la zero&quot; + e);
Line 96:       }
Line 97:      }
Line 98:     public int mod(int a, int b) {
Line 99:       try {
Line 100:        return a%b;
Line 101:      } catch (Exception e) {
Line 102:        throw new Exception(&quot;mod: Impartire la zero&quot; + e);
Line 103:      }
Line 104:    }
Line 105:    public int intPow(int a, int b) {
Line 106:      int p=1;
Line 107:      try {
Line 108:        for (int i=1; i&lt;= b; i++, p *= a);
Line 109:        return p;
Line 110:      } catch (Exception e) {
Line 111:        throw new Exception(&quot;intPow: depasire&quot; + e);
Line 112:      }
Line 113:    }
Line 114:    public String toFpp(String infix) {
Line 115:      infix = infix.Trim();
Line 116:      int i, p, varf =-1;
Line 117:      char c, u;
Line 118:      String s, d, r;
Line 119:      String postfix = &quot;&quot;;
Line 120:      String eval = &quot;&quot;;
Line 121:      String apeluri = &quot;&quot;;
Line 122:      String operatori = &quot;+-*/%^&quot;;
Line 123:      String priority = &quot;112223&quot;;
Line 124:      String albe = &quot; \t\n\r&quot;;
Line 125:      String alfabet = &quot;0123456789&quot;+operatori+albe+&quot;()&quot;;
Line 126:      ArrayList stiva = new ArrayList();
Line 127:      ArrayList operanzi = new ArrayList();
Line 128:      StringBuilder sb = new StringBuilder(infix);
Line 129:      for ( i=sb.Length-1; i&gt;=0; i--) {
Line 130:        c = sb[i];
Line 131:        if (alfabet.IndexOf(c) == -1) return infix+&quot;\nERROR caracter interzis!\n&quot;;
Line 132:        if (albe.IndexOf(c) &gt;= 0) sb.Remove(i, 1);
Line 133:        if (i &lt; sb.Length-1) u = sb[i+1]; else u = ' ';
Line 134:        if (c == '(')
Line 135:          if (u == '+')
Line 136:            sb.Remove(i+1, 1);
Line 137:          else if (u == '-')
Line 138:            sb.Insert(i+1, '0');
Line 139:      } // Control alfabet, sters toate spatiile albe, rezolvat + si - unar
Line 140:      if (sb.Length &gt; 0)
Line 141:        if (sb[0] == '+')
Line 142:          sb.Remove(0, 1);
Line 143:        else if (sb[0] == '-')
Line 144:          sb.Insert(0, '0');
Line 145:      for ( ; sb.Length &gt;0; ) {
Line 146:        c = sb[0];
Line 147:        i = operatori.IndexOf(c);
Line 148:        if (char.IsDigit(c)) { // operand
Line 149:          for ( i=0; i &lt; sb.Length &amp;&amp; char.IsDigit(sb[i]); i++) ;
Line 150:          postfix += &quot;#&quot;+sb.ToString().Substring(0,i)+&quot;|&quot;;
Line 151:          eval += &quot;#&quot;;
Line 152:          sb.Remove(0,i-1);
Line 153:        } else if (i != -1) { // operatori
Line 154:          for ( ; ; ) {
Line 155:            if (varf &lt; 0) break;
Line 156:            p = operatori.IndexOf(stiva[varf].ToString());
Line 157:            if (p &lt; 0 || priority[p] &lt; priority[i]) break;
Line 158:            p = eval.Length;
Line 159:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 160:            postfix += stiva[varf];
Line 161:            eval = eval.Substring(0, p-1);
Line 162:            stiva.RemoveAt(varf);
Line 163:            varf--;
Line 164:          }
Line 165:          stiva.Add(c);
Line 166:          varf++;
Line 167:        } else if (c == '(') { // pune ( in stiva
Line 168:          stiva.Add(c);
Line 169:          varf++;
Line 170:        } else if (c == ')') { // extrage din stiva pana la ( si genereaza corespunzator
Line 171:          for ( ;  ;  ) {
Line 172:            if (varf &lt; 0) return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 173:            c = (char)stiva[varf];
Line 174:            stiva.RemoveAt(varf);
Line 175:            varf--;
Line 176:            if (c == '(') break;
Line 177:            p = eval.Length;
Line 178:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 179:            postfix += c;
Line 180:            eval = eval.Substring(0, p-1);
Line 181:          }
Line 182:        }
Line 183:        sb.Remove(0, 1);
Line 184:      }
Line 185:      for ( ; varf &gt;= 0;  ) { // golestre stiva de ultimii operatori si genereaza
Line 186:        if ((char)stiva[varf] == '(') return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 187:        p = eval.Length;
Line 188:        if (p &lt; 2) return infix+&quot;ERROR operatori fara operanzi\n&quot;;
Line 189:        eval = eval.Substring(0, p-1);
Line 190:        postfix += stiva[varf];
Line 191:        stiva.RemoveAt(varf);
Line 192:        varf--;
Line 193:      }
Line 194:      if (eval.Length != 1) return infix+&quot;\nERROR prea multi operanzi\n&quot;;
Line 195:      sb = new StringBuilder(postfix);
Line 196:      p = 0;
Line 197:      for ( ; sb.Length &gt;0; ) { // construieste succesiunea de apeluri
Line 198:        c = sb[0];
Line 199:        if (c == '#') {
Line 200:          i = sb.ToString().IndexOf(&quot;|&quot;);
Line 201:          operanzi.Add(&quot;\&quot;&quot;+sb.ToString().Substring(1,i-1)+&quot;\&quot;&quot;);
Line 202:          sb.Remove(0,i+1);
Line 203:        } else {
Line 204:          sb.Remove(0, 1);
Line 205:          varf = operanzi.Count-1;
Line 206:          d = (String)operanzi[varf];
Line 207:          s = (String)operanzi[varf-1];
Line 208:          if (s[0] == '\&quot;' &amp;&amp; d[0] == '\&quot;') r = &quot;&quot;+(p++);
Line 209:          else if (s[0] == '\&quot;') r = d;
Line 210:          else r = s;
Line 211:          operanzi[varf-1] = r;
Line 212:          operanzi.RemoveAt(varf);
Line 213:          apeluri += r+&quot;=&quot;+s+c+d+&quot;\n&quot;;
Line 214:        }
Line 215:      }
Line 216:      apeluri += operanzi[0]+&quot;\n&quot;;
Line 217:      return apeluri+postfix+&quot;\n&quot;+infix;
Line 218:    } 
Line 219:  }
Line 220:  
Line 221:  
Line 222:  #line default
Line 223:  #line hidden
Line 224:  </pre></code>



                  </td>

               </tr>

            </table>



            



</div>



    <script type="text/javascript">

    function OnToggleTOCLevel1(level2ID)

    {

      var elemLevel2 = document.getElementById(level2ID);

      if (elemLevel2.style.display == 'none')

      {

        elemLevel2.style.display = '';

      }

      else {

        elemLevel2.style.display = 'none';

      }

    }

    </script>

                          <br><br>



            <hr width=100% size=1 color=silver>



            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3614



            </font>



    </body>

</html>

<!-- 

[HttpCompileException]: \\172.30.0.5\iis\~florin\ServiceRs.ashx(125): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

   at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.UI.SimpleHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)

   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)

   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

--><!-- 

This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using &lt;customErrors mode="Off"/&gt;. Consider using &lt;customErrors mode="On"/&gt; or &lt;customErrors mode="RemoteOnly"/&gt; in production environments.-->

Serv0:	toFpp:
<html>

    <head>

        <title>Compilation Error</title>

        <style>

         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 

         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}

         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}

         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }

         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }

         pre {font-family:"Lucida Console";font-size: .9em}

         .marker {font-weight: bold; color: black;text-decoration: none;}

         .version {color: gray;}

         .error {margin-bottom: 10px;}

         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

        </style>

    </head>



    <body bgcolor="white">



            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>



            <h2> <i>Compilation Error</i> </h2></span>



            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">



            <b> Description: </b>An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

            <br><br>



            <b> Compiler Error Message: </b>CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)<br><br>

<b>Source Error:</b><br><br>

            <table width=100% bgcolor="#ffffcc">

               <tr><td>

                              </td></tr>

               <tr>

                  <td>

                      <code><pre>



Line 123:    ArrayList stiva = new ArrayList();

Line 124:    ArrayList operanzi = new ArrayList();

<font color=red>Line 125:    StringBuilder sb = new StringBuilder(infix);

</font>Line 126:    for ( i=sb.Length-1; i&gt;=0; i--) {

Line 127:      c = sb[i];</pre></code>



                  </td>

               </tr>

            </table>



            <br>



            <b>Source File:</b> \\172.30.0.5\iis\~florin\ServiceRs.ashx

            &nbsp;&nbsp; <b>Line:</b>  125

            <br><br>

<br><div class="expandable" onclick="OnToggleTOCLevel1('compilerOutputDiv')">Show Detailed Compiler Output:</div>

<div id="compilerOutputDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



C:\WINDOWS\SysWOW64\inetsrv&gt; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe&quot; /t:library /utf8output /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll&quot; /R:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\MySql.Data\5.2.5.0__c5687fc88969c44d\MySql.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll&quot; /out:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.dll&quot; /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701  &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.0.cs&quot; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.1.cs&quot;





Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.3053

for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727

Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.



\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,5): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,28): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(127,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(130,32): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(138,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(140,16): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(143,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(146,50): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(192,14): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(195,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

</pre></code>



                  </td>

               </tr>

            </table>



            



</div>

<br><div class="expandable" onclick="OnToggleTOCLevel1('dynamicCodeDiv')">Show Complete Compilation Source:</div>

<div id="dynamicCodeDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



Line 1:    #pragma checksum &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot; &quot;{406ea660-64cf-4c82-b6f0-42d48172a799}&quot; &quot;1CFD175703181AB6B3BAC827D91F8797&quot;
Line 2:    
Line 3:    #line 1 &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot;
Line 4:    
Line 5:    using System;
Line 6:    using System.Net;
Line 7:    using System.Web;
Line 8:    using System.Collections;
Line 9:    using System.Collections.Specialized;
Line 10:   using System.IO;
Line 11:   public class ServiceRs : IHttpHandler {
Line 12:     public bool IsReusable { get { return false; } }
Line 13:     public void ProcessRequest(HttpContext ctx) {
Line 14:       String[] apel = {&quot;/ping&quot;, &quot;/add/&quot;, &quot;/subtract/&quot;, &quot;/multiply/&quot;, &quot;/divide/&quot;, &quot;/mod/&quot;, &quot;/intPow/&quot;, &quot;/toFpp&quot;}; 
Line 15:       String url = ctx.Request.RawUrl.ToString().ToLower();
Line 16:       int i=0, p=-1, a=0, b=0;
Line 17:       for (i=0; i&lt;apel.Length; i++) {
Line 18:         p = url.IndexOf(apel[i]);
Line 19:         if (p &gt; 0) break;
Line 20:       }
Line 21:       switch (i) {
Line 22:         case 0: 
Line 23:           if (ctx.Request.HttpMethod != &quot;GET&quot;) break;
Line 24:           ctx.Response.Write(ping()); 
Line 25:           break;
Line 26:         case 1: 
Line 27:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 28:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 29:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 30:           ctx.Response.Write(add(a, b).ToString() + &quot; method DELETE&quot;);
Line 31:           break;
Line 32:         case 2: 
Line 33:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 34:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 35:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 36:           ctx.Response.Write(subtract(a, b).ToString() + &quot; method DELETE&quot;);
Line 37:           break;
Line 38:         case 3: 
Line 39:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 40:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 41:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 42:           ctx.Response.Write(multiply(a, b).ToString() + &quot; method DELETE&quot;);
Line 43:           break;
Line 44:         case 4: 
Line 45:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 46:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 47:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 48:           ctx.Response.Write(divide(a, b).ToString() + &quot; method DELETE&quot;);
Line 49:           break;
Line 50:         case 5: 
Line 51:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 52:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 53:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 54:           ctx.Response.Write(mod(a, b).ToString() + &quot; method DELETE&quot;);
Line 55:           break;
Line 56:         case 6: 
Line 57:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 58:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 59:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 60:           ctx.Response.Write(intPow(a, b).ToString() + &quot; method DELETE&quot;);
Line 61:           break;
Line 62:         case 7:
Line 63:           if (ctx.Request.HttpMethod != &quot;POST&quot;) break;
Line 64:           Stream body = ctx.Request.InputStream;
Line 65:           a = Convert.ToInt32(body.Length);
Line 66:           byte[] bBody = new byte[a];
Line 67:           body.Read(bBody, 0, a);
Line 68:           String infix = System.Text.Encoding.ASCII.GetString(bBody);
Line 69:           ctx.Response.Write(toFpp(infix).ToString() + &quot; method PUT&quot;); 
Line 70:           break;
Line 71:        default: break;
Line 72:       }
Line 73:     }
Line 74:     private static String tip = &quot;RESTful&quot;;
Line 75:     private static String pathServ = &quot;Service.ashx&quot;;
Line 76:     private static int port = 80;
Line 77:     public static String ping() {
Line 78:      String host = Dns.GetHostName();
Line 79:       return &quot;C# &quot; + tip + &quot; &quot; + pathServ + &quot;: &quot;+host +
Line 80:         &quot; (&quot; + Dns.GetHostAddresses(host)[0] + &quot;:&quot; + port + &quot;) &quot; + DateTime.Now;
Line 81:     }
Line 82:     public int add(int a, int b) {
Line 83:       return a+b;
Line 84:     }
Line 85:     public int subtract(int a, int b) {
Line 86:       return a-b;
Line 87:     }
Line 88:     public int multiply(int a, int b) {
Line 89:       return a*b;
Line 90:     }
Line 91:     public int divide(int a, int b) {
Line 92:      try {
Line 93:         return a/b;
Line 94:       } catch (Exception e) {
Line 95:         throw new Exception(&quot;divide: Impartire la zero&quot; + e);
Line 96:       }
Line 97:      }
Line 98:     public int mod(int a, int b) {
Line 99:       try {
Line 100:        return a%b;
Line 101:      } catch (Exception e) {
Line 102:        throw new Exception(&quot;mod: Impartire la zero&quot; + e);
Line 103:      }
Line 104:    }
Line 105:    public int intPow(int a, int b) {
Line 106:      int p=1;
Line 107:      try {
Line 108:        for (int i=1; i&lt;= b; i++, p *= a);
Line 109:        return p;
Line 110:      } catch (Exception e) {
Line 111:        throw new Exception(&quot;intPow: depasire&quot; + e);
Line 112:      }
Line 113:    }
Line 114:    public String toFpp(String infix) {
Line 115:      infix = infix.Trim();
Line 116:      int i, p, varf =-1;
Line 117:      char c, u;
Line 118:      String s, d, r;
Line 119:      String postfix = &quot;&quot;;
Line 120:      String eval = &quot;&quot;;
Line 121:      String apeluri = &quot;&quot;;
Line 122:      String operatori = &quot;+-*/%^&quot;;
Line 123:      String priority = &quot;112223&quot;;
Line 124:      String albe = &quot; \t\n\r&quot;;
Line 125:      String alfabet = &quot;0123456789&quot;+operatori+albe+&quot;()&quot;;
Line 126:      ArrayList stiva = new ArrayList();
Line 127:      ArrayList operanzi = new ArrayList();
Line 128:      StringBuilder sb = new StringBuilder(infix);
Line 129:      for ( i=sb.Length-1; i&gt;=0; i--) {
Line 130:        c = sb[i];
Line 131:        if (alfabet.IndexOf(c) == -1) return infix+&quot;\nERROR caracter interzis!\n&quot;;
Line 132:        if (albe.IndexOf(c) &gt;= 0) sb.Remove(i, 1);
Line 133:        if (i &lt; sb.Length-1) u = sb[i+1]; else u = ' ';
Line 134:        if (c == '(')
Line 135:          if (u == '+')
Line 136:            sb.Remove(i+1, 1);
Line 137:          else if (u == '-')
Line 138:            sb.Insert(i+1, '0');
Line 139:      } // Control alfabet, sters toate spatiile albe, rezolvat + si - unar
Line 140:      if (sb.Length &gt; 0)
Line 141:        if (sb[0] == '+')
Line 142:          sb.Remove(0, 1);
Line 143:        else if (sb[0] == '-')
Line 144:          sb.Insert(0, '0');
Line 145:      for ( ; sb.Length &gt;0; ) {
Line 146:        c = sb[0];
Line 147:        i = operatori.IndexOf(c);
Line 148:        if (char.IsDigit(c)) { // operand
Line 149:          for ( i=0; i &lt; sb.Length &amp;&amp; char.IsDigit(sb[i]); i++) ;
Line 150:          postfix += &quot;#&quot;+sb.ToString().Substring(0,i)+&quot;|&quot;;
Line 151:          eval += &quot;#&quot;;
Line 152:          sb.Remove(0,i-1);
Line 153:        } else if (i != -1) { // operatori
Line 154:          for ( ; ; ) {
Line 155:            if (varf &lt; 0) break;
Line 156:            p = operatori.IndexOf(stiva[varf].ToString());
Line 157:            if (p &lt; 0 || priority[p] &lt; priority[i]) break;
Line 158:            p = eval.Length;
Line 159:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 160:            postfix += stiva[varf];
Line 161:            eval = eval.Substring(0, p-1);
Line 162:            stiva.RemoveAt(varf);
Line 163:            varf--;
Line 164:          }
Line 165:          stiva.Add(c);
Line 166:          varf++;
Line 167:        } else if (c == '(') { // pune ( in stiva
Line 168:          stiva.Add(c);
Line 169:          varf++;
Line 170:        } else if (c == ')') { // extrage din stiva pana la ( si genereaza corespunzator
Line 171:          for ( ;  ;  ) {
Line 172:            if (varf &lt; 0) return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 173:            c = (char)stiva[varf];
Line 174:            stiva.RemoveAt(varf);
Line 175:            varf--;
Line 176:            if (c == '(') break;
Line 177:            p = eval.Length;
Line 178:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 179:            postfix += c;
Line 180:            eval = eval.Substring(0, p-1);
Line 181:          }
Line 182:        }
Line 183:        sb.Remove(0, 1);
Line 184:      }
Line 185:      for ( ; varf &gt;= 0;  ) { // golestre stiva de ultimii operatori si genereaza
Line 186:        if ((char)stiva[varf] == '(') return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 187:        p = eval.Length;
Line 188:        if (p &lt; 2) return infix+&quot;ERROR operatori fara operanzi\n&quot;;
Line 189:        eval = eval.Substring(0, p-1);
Line 190:        postfix += stiva[varf];
Line 191:        stiva.RemoveAt(varf);
Line 192:        varf--;
Line 193:      }
Line 194:      if (eval.Length != 1) return infix+&quot;\nERROR prea multi operanzi\n&quot;;
Line 195:      sb = new StringBuilder(postfix);
Line 196:      p = 0;
Line 197:      for ( ; sb.Length &gt;0; ) { // construieste succesiunea de apeluri
Line 198:        c = sb[0];
Line 199:        if (c == '#') {
Line 200:          i = sb.ToString().IndexOf(&quot;|&quot;);
Line 201:          operanzi.Add(&quot;\&quot;&quot;+sb.ToString().Substring(1,i-1)+&quot;\&quot;&quot;);
Line 202:          sb.Remove(0,i+1);
Line 203:        } else {
Line 204:          sb.Remove(0, 1);
Line 205:          varf = operanzi.Count-1;
Line 206:          d = (String)operanzi[varf];
Line 207:          s = (String)operanzi[varf-1];
Line 208:          if (s[0] == '\&quot;' &amp;&amp; d[0] == '\&quot;') r = &quot;&quot;+(p++);
Line 209:          else if (s[0] == '\&quot;') r = d;
Line 210:          else r = s;
Line 211:          operanzi[varf-1] = r;
Line 212:          operanzi.RemoveAt(varf);
Line 213:          apeluri += r+&quot;=&quot;+s+c+d+&quot;\n&quot;;
Line 214:        }
Line 215:      }
Line 216:      apeluri += operanzi[0]+&quot;\n&quot;;
Line 217:      return apeluri+postfix+&quot;\n&quot;+infix;
Line 218:    } 
Line 219:  }
Line 220:  
Line 221:  
Line 222:  #line default
Line 223:  #line hidden
Line 224:  </pre></code>



                  </td>

               </tr>

            </table>



            



</div>



    <script type="text/javascript">

    function OnToggleTOCLevel1(level2ID)

    {

      var elemLevel2 = document.getElementById(level2ID);

      if (elemLevel2.style.display == 'none')

      {

        elemLevel2.style.display = '';

      }

      else {

        elemLevel2.style.display = 'none';

      }

    }

    </script>

                          <br><br>



            <hr width=100% size=1 color=silver>



            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3614



            </font>



    </body>

</html>

<!-- 

[HttpCompileException]: \\172.30.0.5\iis\~florin\ServiceRs.ashx(125): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

   at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.UI.SimpleHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)

   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)

   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

--><!-- 

This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using &lt;customErrors mode="Off"/&gt;. Consider using &lt;customErrors mode="On"/&gt; or &lt;customErrors mode="RemoteOnly"/&gt; in production environments.-->

Serv0:	toFpp:
<html>

    <head>

        <title>Compilation Error</title>

        <style>

         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 

         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}

         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}

         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }

         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }

         pre {font-family:"Lucida Console";font-size: .9em}

         .marker {font-weight: bold; color: black;text-decoration: none;}

         .version {color: gray;}

         .error {margin-bottom: 10px;}

         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

        </style>

    </head>



    <body bgcolor="white">



            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>



            <h2> <i>Compilation Error</i> </h2></span>



            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">



            <b> Description: </b>An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

            <br><br>



            <b> Compiler Error Message: </b>CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)<br><br>

<b>Source Error:</b><br><br>

            <table width=100% bgcolor="#ffffcc">

               <tr><td>

                              </td></tr>

               <tr>

                  <td>

                      <code><pre>



Line 123:    ArrayList stiva = new ArrayList();

Line 124:    ArrayList operanzi = new ArrayList();

<font color=red>Line 125:    StringBuilder sb = new StringBuilder(infix);

</font>Line 126:    for ( i=sb.Length-1; i&gt;=0; i--) {

Line 127:      c = sb[i];</pre></code>



                  </td>

               </tr>

            </table>



            <br>



            <b>Source File:</b> \\172.30.0.5\iis\~florin\ServiceRs.ashx

            &nbsp;&nbsp; <b>Line:</b>  125

            <br><br>

<br><div class="expandable" onclick="OnToggleTOCLevel1('compilerOutputDiv')">Show Detailed Compiler Output:</div>

<div id="compilerOutputDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



C:\WINDOWS\SysWOW64\inetsrv&gt; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe&quot; /t:library /utf8output /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll&quot; /R:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\MySql.Data\5.2.5.0__c5687fc88969c44d\MySql.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll&quot; /out:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.dll&quot; /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701  &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.0.cs&quot; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.1.cs&quot;





Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.3053

for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727

Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.



\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,5): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,28): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(127,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(130,32): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(138,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(140,16): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(143,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(146,50): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(192,14): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(195,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

</pre></code>



                  </td>

               </tr>

            </table>



            



</div>

<br><div class="expandable" onclick="OnToggleTOCLevel1('dynamicCodeDiv')">Show Complete Compilation Source:</div>

<div id="dynamicCodeDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



Line 1:    #pragma checksum &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot; &quot;{406ea660-64cf-4c82-b6f0-42d48172a799}&quot; &quot;1CFD175703181AB6B3BAC827D91F8797&quot;
Line 2:    
Line 3:    #line 1 &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot;
Line 4:    
Line 5:    using System;
Line 6:    using System.Net;
Line 7:    using System.Web;
Line 8:    using System.Collections;
Line 9:    using System.Collections.Specialized;
Line 10:   using System.IO;
Line 11:   public class ServiceRs : IHttpHandler {
Line 12:     public bool IsReusable { get { return false; } }
Line 13:     public void ProcessRequest(HttpContext ctx) {
Line 14:       String[] apel = {&quot;/ping&quot;, &quot;/add/&quot;, &quot;/subtract/&quot;, &quot;/multiply/&quot;, &quot;/divide/&quot;, &quot;/mod/&quot;, &quot;/intPow/&quot;, &quot;/toFpp&quot;}; 
Line 15:       String url = ctx.Request.RawUrl.ToString().ToLower();
Line 16:       int i=0, p=-1, a=0, b=0;
Line 17:       for (i=0; i&lt;apel.Length; i++) {
Line 18:         p = url.IndexOf(apel[i]);
Line 19:         if (p &gt; 0) break;
Line 20:       }
Line 21:       switch (i) {
Line 22:         case 0: 
Line 23:           if (ctx.Request.HttpMethod != &quot;GET&quot;) break;
Line 24:           ctx.Response.Write(ping()); 
Line 25:           break;
Line 26:         case 1: 
Line 27:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 28:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 29:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 30:           ctx.Response.Write(add(a, b).ToString() + &quot; method DELETE&quot;);
Line 31:           break;
Line 32:         case 2: 
Line 33:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 34:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 35:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 36:           ctx.Response.Write(subtract(a, b).ToString() + &quot; method DELETE&quot;);
Line 37:           break;
Line 38:         case 3: 
Line 39:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 40:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 41:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 42:           ctx.Response.Write(multiply(a, b).ToString() + &quot; method DELETE&quot;);
Line 43:           break;
Line 44:         case 4: 
Line 45:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 46:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 47:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 48:           ctx.Response.Write(divide(a, b).ToString() + &quot; method DELETE&quot;);
Line 49:           break;
Line 50:         case 5: 
Line 51:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 52:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 53:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 54:           ctx.Response.Write(mod(a, b).ToString() + &quot; method DELETE&quot;);
Line 55:           break;
Line 56:         case 6: 
Line 57:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 58:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 59:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 60:           ctx.Response.Write(intPow(a, b).ToString() + &quot; method DELETE&quot;);
Line 61:           break;
Line 62:         case 7:
Line 63:           if (ctx.Request.HttpMethod != &quot;POST&quot;) break;
Line 64:           Stream body = ctx.Request.InputStream;
Line 65:           a = Convert.ToInt32(body.Length);
Line 66:           byte[] bBody = new byte[a];
Line 67:           body.Read(bBody, 0, a);
Line 68:           String infix = System.Text.Encoding.ASCII.GetString(bBody);
Line 69:           ctx.Response.Write(toFpp(infix).ToString() + &quot; method PUT&quot;); 
Line 70:           break;
Line 71:        default: break;
Line 72:       }
Line 73:     }
Line 74:     private static String tip = &quot;RESTful&quot;;
Line 75:     private static String pathServ = &quot;Service.ashx&quot;;
Line 76:     private static int port = 80;
Line 77:     public static String ping() {
Line 78:      String host = Dns.GetHostName();
Line 79:       return &quot;C# &quot; + tip + &quot; &quot; + pathServ + &quot;: &quot;+host +
Line 80:         &quot; (&quot; + Dns.GetHostAddresses(host)[0] + &quot;:&quot; + port + &quot;) &quot; + DateTime.Now;
Line 81:     }
Line 82:     public int add(int a, int b) {
Line 83:       return a+b;
Line 84:     }
Line 85:     public int subtract(int a, int b) {
Line 86:       return a-b;
Line 87:     }
Line 88:     public int multiply(int a, int b) {
Line 89:       return a*b;
Line 90:     }
Line 91:     public int divide(int a, int b) {
Line 92:      try {
Line 93:         return a/b;
Line 94:       } catch (Exception e) {
Line 95:         throw new Exception(&quot;divide: Impartire la zero&quot; + e);
Line 96:       }
Line 97:      }
Line 98:     public int mod(int a, int b) {
Line 99:       try {
Line 100:        return a%b;
Line 101:      } catch (Exception e) {
Line 102:        throw new Exception(&quot;mod: Impartire la zero&quot; + e);
Line 103:      }
Line 104:    }
Line 105:    public int intPow(int a, int b) {
Line 106:      int p=1;
Line 107:      try {
Line 108:        for (int i=1; i&lt;= b; i++, p *= a);
Line 109:        return p;
Line 110:      } catch (Exception e) {
Line 111:        throw new Exception(&quot;intPow: depasire&quot; + e);
Line 112:      }
Line 113:    }
Line 114:    public String toFpp(String infix) {
Line 115:      infix = infix.Trim();
Line 116:      int i, p, varf =-1;
Line 117:      char c, u;
Line 118:      String s, d, r;
Line 119:      String postfix = &quot;&quot;;
Line 120:      String eval = &quot;&quot;;
Line 121:      String apeluri = &quot;&quot;;
Line 122:      String operatori = &quot;+-*/%^&quot;;
Line 123:      String priority = &quot;112223&quot;;
Line 124:      String albe = &quot; \t\n\r&quot;;
Line 125:      String alfabet = &quot;0123456789&quot;+operatori+albe+&quot;()&quot;;
Line 126:      ArrayList stiva = new ArrayList();
Line 127:      ArrayList operanzi = new ArrayList();
Line 128:      StringBuilder sb = new StringBuilder(infix);
Line 129:      for ( i=sb.Length-1; i&gt;=0; i--) {
Line 130:        c = sb[i];
Line 131:        if (alfabet.IndexOf(c) == -1) return infix+&quot;\nERROR caracter interzis!\n&quot;;
Line 132:        if (albe.IndexOf(c) &gt;= 0) sb.Remove(i, 1);
Line 133:        if (i &lt; sb.Length-1) u = sb[i+1]; else u = ' ';
Line 134:        if (c == '(')
Line 135:          if (u == '+')
Line 136:            sb.Remove(i+1, 1);
Line 137:          else if (u == '-')
Line 138:            sb.Insert(i+1, '0');
Line 139:      } // Control alfabet, sters toate spatiile albe, rezolvat + si - unar
Line 140:      if (sb.Length &gt; 0)
Line 141:        if (sb[0] == '+')
Line 142:          sb.Remove(0, 1);
Line 143:        else if (sb[0] == '-')
Line 144:          sb.Insert(0, '0');
Line 145:      for ( ; sb.Length &gt;0; ) {
Line 146:        c = sb[0];
Line 147:        i = operatori.IndexOf(c);
Line 148:        if (char.IsDigit(c)) { // operand
Line 149:          for ( i=0; i &lt; sb.Length &amp;&amp; char.IsDigit(sb[i]); i++) ;
Line 150:          postfix += &quot;#&quot;+sb.ToString().Substring(0,i)+&quot;|&quot;;
Line 151:          eval += &quot;#&quot;;
Line 152:          sb.Remove(0,i-1);
Line 153:        } else if (i != -1) { // operatori
Line 154:          for ( ; ; ) {
Line 155:            if (varf &lt; 0) break;
Line 156:            p = operatori.IndexOf(stiva[varf].ToString());
Line 157:            if (p &lt; 0 || priority[p] &lt; priority[i]) break;
Line 158:            p = eval.Length;
Line 159:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 160:            postfix += stiva[varf];
Line 161:            eval = eval.Substring(0, p-1);
Line 162:            stiva.RemoveAt(varf);
Line 163:            varf--;
Line 164:          }
Line 165:          stiva.Add(c);
Line 166:          varf++;
Line 167:        } else if (c == '(') { // pune ( in stiva
Line 168:          stiva.Add(c);
Line 169:          varf++;
Line 170:        } else if (c == ')') { // extrage din stiva pana la ( si genereaza corespunzator
Line 171:          for ( ;  ;  ) {
Line 172:            if (varf &lt; 0) return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 173:            c = (char)stiva[varf];
Line 174:            stiva.RemoveAt(varf);
Line 175:            varf--;
Line 176:            if (c == '(') break;
Line 177:            p = eval.Length;
Line 178:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 179:            postfix += c;
Line 180:            eval = eval.Substring(0, p-1);
Line 181:          }
Line 182:        }
Line 183:        sb.Remove(0, 1);
Line 184:      }
Line 185:      for ( ; varf &gt;= 0;  ) { // golestre stiva de ultimii operatori si genereaza
Line 186:        if ((char)stiva[varf] == '(') return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 187:        p = eval.Length;
Line 188:        if (p &lt; 2) return infix+&quot;ERROR operatori fara operanzi\n&quot;;
Line 189:        eval = eval.Substring(0, p-1);
Line 190:        postfix += stiva[varf];
Line 191:        stiva.RemoveAt(varf);
Line 192:        varf--;
Line 193:      }
Line 194:      if (eval.Length != 1) return infix+&quot;\nERROR prea multi operanzi\n&quot;;
Line 195:      sb = new StringBuilder(postfix);
Line 196:      p = 0;
Line 197:      for ( ; sb.Length &gt;0; ) { // construieste succesiunea de apeluri
Line 198:        c = sb[0];
Line 199:        if (c == '#') {
Line 200:          i = sb.ToString().IndexOf(&quot;|&quot;);
Line 201:          operanzi.Add(&quot;\&quot;&quot;+sb.ToString().Substring(1,i-1)+&quot;\&quot;&quot;);
Line 202:          sb.Remove(0,i+1);
Line 203:        } else {
Line 204:          sb.Remove(0, 1);
Line 205:          varf = operanzi.Count-1;
Line 206:          d = (String)operanzi[varf];
Line 207:          s = (String)operanzi[varf-1];
Line 208:          if (s[0] == '\&quot;' &amp;&amp; d[0] == '\&quot;') r = &quot;&quot;+(p++);
Line 209:          else if (s[0] == '\&quot;') r = d;
Line 210:          else r = s;
Line 211:          operanzi[varf-1] = r;
Line 212:          operanzi.RemoveAt(varf);
Line 213:          apeluri += r+&quot;=&quot;+s+c+d+&quot;\n&quot;;
Line 214:        }
Line 215:      }
Line 216:      apeluri += operanzi[0]+&quot;\n&quot;;
Line 217:      return apeluri+postfix+&quot;\n&quot;+infix;
Line 218:    } 
Line 219:  }
Line 220:  
Line 221:  
Line 222:  #line default
Line 223:  #line hidden
Line 224:  </pre></code>



                  </td>

               </tr>

            </table>



            



</div>



    <script type="text/javascript">

    function OnToggleTOCLevel1(level2ID)

    {

      var elemLevel2 = document.getElementById(level2ID);

      if (elemLevel2.style.display == 'none')

      {

        elemLevel2.style.display = '';

      }

      else {

        elemLevel2.style.display = 'none';

      }

    }

    </script>

                          <br><br>



            <hr width=100% size=1 color=silver>



            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3614



            </font>



    </body>

</html>

<!-- 

[HttpCompileException]: \\172.30.0.5\iis\~florin\ServiceRs.ashx(125): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

   at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.UI.SimpleHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)

   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)

   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

--><!-- 

This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using &lt;customErrors mode="Off"/&gt;. Consider using &lt;customErrors mode="On"/&gt; or &lt;customErrors mode="RemoteOnly"/&gt; in production environments.-->

Serv0:	toFpp:
<html>

    <head>

        <title>Compilation Error</title>

        <style>

         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 

         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}

         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}

         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }

         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }

         pre {font-family:"Lucida Console";font-size: .9em}

         .marker {font-weight: bold; color: black;text-decoration: none;}

         .version {color: gray;}

         .error {margin-bottom: 10px;}

         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

        </style>

    </head>



    <body bgcolor="white">



            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>



            <h2> <i>Compilation Error</i> </h2></span>



            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">



            <b> Description: </b>An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

            <br><br>



            <b> Compiler Error Message: </b>CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)<br><br>

<b>Source Error:</b><br><br>

            <table width=100% bgcolor="#ffffcc">

               <tr><td>

                              </td></tr>

               <tr>

                  <td>

                      <code><pre>



Line 123:    ArrayList stiva = new ArrayList();

Line 124:    ArrayList operanzi = new ArrayList();

<font color=red>Line 125:    StringBuilder sb = new StringBuilder(infix);

</font>Line 126:    for ( i=sb.Length-1; i&gt;=0; i--) {

Line 127:      c = sb[i];</pre></code>



                  </td>

               </tr>

            </table>



            <br>



            <b>Source File:</b> \\172.30.0.5\iis\~florin\ServiceRs.ashx

            &nbsp;&nbsp; <b>Line:</b>  125

            <br><br>

<br><div class="expandable" onclick="OnToggleTOCLevel1('compilerOutputDiv')">Show Detailed Compiler Output:</div>

<div id="compilerOutputDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



C:\WINDOWS\SysWOW64\inetsrv&gt; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe&quot; /t:library /utf8output /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll&quot; /R:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\MySql.Data\5.2.5.0__c5687fc88969c44d\MySql.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll&quot; /out:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.dll&quot; /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701  &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.0.cs&quot; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.1.cs&quot;





Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.3053

for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727

Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.



\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,5): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,28): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(127,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(130,32): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(138,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(140,16): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(143,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(146,50): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(192,14): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(195,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

</pre></code>



                  </td>

               </tr>

            </table>



            



</div>

<br><div class="expandable" onclick="OnToggleTOCLevel1('dynamicCodeDiv')">Show Complete Compilation Source:</div>

<div id="dynamicCodeDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



Line 1:    #pragma checksum &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot; &quot;{406ea660-64cf-4c82-b6f0-42d48172a799}&quot; &quot;1CFD175703181AB6B3BAC827D91F8797&quot;
Line 2:    
Line 3:    #line 1 &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot;
Line 4:    
Line 5:    using System;
Line 6:    using System.Net;
Line 7:    using System.Web;
Line 8:    using System.Collections;
Line 9:    using System.Collections.Specialized;
Line 10:   using System.IO;
Line 11:   public class ServiceRs : IHttpHandler {
Line 12:     public bool IsReusable { get { return false; } }
Line 13:     public void ProcessRequest(HttpContext ctx) {
Line 14:       String[] apel = {&quot;/ping&quot;, &quot;/add/&quot;, &quot;/subtract/&quot;, &quot;/multiply/&quot;, &quot;/divide/&quot;, &quot;/mod/&quot;, &quot;/intPow/&quot;, &quot;/toFpp&quot;}; 
Line 15:       String url = ctx.Request.RawUrl.ToString().ToLower();
Line 16:       int i=0, p=-1, a=0, b=0;
Line 17:       for (i=0; i&lt;apel.Length; i++) {
Line 18:         p = url.IndexOf(apel[i]);
Line 19:         if (p &gt; 0) break;
Line 20:       }
Line 21:       switch (i) {
Line 22:         case 0: 
Line 23:           if (ctx.Request.HttpMethod != &quot;GET&quot;) break;
Line 24:           ctx.Response.Write(ping()); 
Line 25:           break;
Line 26:         case 1: 
Line 27:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 28:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 29:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 30:           ctx.Response.Write(add(a, b).ToString() + &quot; method DELETE&quot;);
Line 31:           break;
Line 32:         case 2: 
Line 33:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 34:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 35:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 36:           ctx.Response.Write(subtract(a, b).ToString() + &quot; method DELETE&quot;);
Line 37:           break;
Line 38:         case 3: 
Line 39:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 40:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 41:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 42:           ctx.Response.Write(multiply(a, b).ToString() + &quot; method DELETE&quot;);
Line 43:           break;
Line 44:         case 4: 
Line 45:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 46:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 47:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 48:           ctx.Response.Write(divide(a, b).ToString() + &quot; method DELETE&quot;);
Line 49:           break;
Line 50:         case 5: 
Line 51:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 52:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 53:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 54:           ctx.Response.Write(mod(a, b).ToString() + &quot; method DELETE&quot;);
Line 55:           break;
Line 56:         case 6: 
Line 57:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 58:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 59:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 60:           ctx.Response.Write(intPow(a, b).ToString() + &quot; method DELETE&quot;);
Line 61:           break;
Line 62:         case 7:
Line 63:           if (ctx.Request.HttpMethod != &quot;POST&quot;) break;
Line 64:           Stream body = ctx.Request.InputStream;
Line 65:           a = Convert.ToInt32(body.Length);
Line 66:           byte[] bBody = new byte[a];
Line 67:           body.Read(bBody, 0, a);
Line 68:           String infix = System.Text.Encoding.ASCII.GetString(bBody);
Line 69:           ctx.Response.Write(toFpp(infix).ToString() + &quot; method PUT&quot;); 
Line 70:           break;
Line 71:        default: break;
Line 72:       }
Line 73:     }
Line 74:     private static String tip = &quot;RESTful&quot;;
Line 75:     private static String pathServ = &quot;Service.ashx&quot;;
Line 76:     private static int port = 80;
Line 77:     public static String ping() {
Line 78:      String host = Dns.GetHostName();
Line 79:       return &quot;C# &quot; + tip + &quot; &quot; + pathServ + &quot;: &quot;+host +
Line 80:         &quot; (&quot; + Dns.GetHostAddresses(host)[0] + &quot;:&quot; + port + &quot;) &quot; + DateTime.Now;
Line 81:     }
Line 82:     public int add(int a, int b) {
Line 83:       return a+b;
Line 84:     }
Line 85:     public int subtract(int a, int b) {
Line 86:       return a-b;
Line 87:     }
Line 88:     public int multiply(int a, int b) {
Line 89:       return a*b;
Line 90:     }
Line 91:     public int divide(int a, int b) {
Line 92:      try {
Line 93:         return a/b;
Line 94:       } catch (Exception e) {
Line 95:         throw new Exception(&quot;divide: Impartire la zero&quot; + e);
Line 96:       }
Line 97:      }
Line 98:     public int mod(int a, int b) {
Line 99:       try {
Line 100:        return a%b;
Line 101:      } catch (Exception e) {
Line 102:        throw new Exception(&quot;mod: Impartire la zero&quot; + e);
Line 103:      }
Line 104:    }
Line 105:    public int intPow(int a, int b) {
Line 106:      int p=1;
Line 107:      try {
Line 108:        for (int i=1; i&lt;= b; i++, p *= a);
Line 109:        return p;
Line 110:      } catch (Exception e) {
Line 111:        throw new Exception(&quot;intPow: depasire&quot; + e);
Line 112:      }
Line 113:    }
Line 114:    public String toFpp(String infix) {
Line 115:      infix = infix.Trim();
Line 116:      int i, p, varf =-1;
Line 117:      char c, u;
Line 118:      String s, d, r;
Line 119:      String postfix = &quot;&quot;;
Line 120:      String eval = &quot;&quot;;
Line 121:      String apeluri = &quot;&quot;;
Line 122:      String operatori = &quot;+-*/%^&quot;;
Line 123:      String priority = &quot;112223&quot;;
Line 124:      String albe = &quot; \t\n\r&quot;;
Line 125:      String alfabet = &quot;0123456789&quot;+operatori+albe+&quot;()&quot;;
Line 126:      ArrayList stiva = new ArrayList();
Line 127:      ArrayList operanzi = new ArrayList();
Line 128:      StringBuilder sb = new StringBuilder(infix);
Line 129:      for ( i=sb.Length-1; i&gt;=0; i--) {
Line 130:        c = sb[i];
Line 131:        if (alfabet.IndexOf(c) == -1) return infix+&quot;\nERROR caracter interzis!\n&quot;;
Line 132:        if (albe.IndexOf(c) &gt;= 0) sb.Remove(i, 1);
Line 133:        if (i &lt; sb.Length-1) u = sb[i+1]; else u = ' ';
Line 134:        if (c == '(')
Line 135:          if (u == '+')
Line 136:            sb.Remove(i+1, 1);
Line 137:          else if (u == '-')
Line 138:            sb.Insert(i+1, '0');
Line 139:      } // Control alfabet, sters toate spatiile albe, rezolvat + si - unar
Line 140:      if (sb.Length &gt; 0)
Line 141:        if (sb[0] == '+')
Line 142:          sb.Remove(0, 1);
Line 143:        else if (sb[0] == '-')
Line 144:          sb.Insert(0, '0');
Line 145:      for ( ; sb.Length &gt;0; ) {
Line 146:        c = sb[0];
Line 147:        i = operatori.IndexOf(c);
Line 148:        if (char.IsDigit(c)) { // operand
Line 149:          for ( i=0; i &lt; sb.Length &amp;&amp; char.IsDigit(sb[i]); i++) ;
Line 150:          postfix += &quot;#&quot;+sb.ToString().Substring(0,i)+&quot;|&quot;;
Line 151:          eval += &quot;#&quot;;
Line 152:          sb.Remove(0,i-1);
Line 153:        } else if (i != -1) { // operatori
Line 154:          for ( ; ; ) {
Line 155:            if (varf &lt; 0) break;
Line 156:            p = operatori.IndexOf(stiva[varf].ToString());
Line 157:            if (p &lt; 0 || priority[p] &lt; priority[i]) break;
Line 158:            p = eval.Length;
Line 159:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 160:            postfix += stiva[varf];
Line 161:            eval = eval.Substring(0, p-1);
Line 162:            stiva.RemoveAt(varf);
Line 163:            varf--;
Line 164:          }
Line 165:          stiva.Add(c);
Line 166:          varf++;
Line 167:        } else if (c == '(') { // pune ( in stiva
Line 168:          stiva.Add(c);
Line 169:          varf++;
Line 170:        } else if (c == ')') { // extrage din stiva pana la ( si genereaza corespunzator
Line 171:          for ( ;  ;  ) {
Line 172:            if (varf &lt; 0) return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 173:            c = (char)stiva[varf];
Line 174:            stiva.RemoveAt(varf);
Line 175:            varf--;
Line 176:            if (c == '(') break;
Line 177:            p = eval.Length;
Line 178:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 179:            postfix += c;
Line 180:            eval = eval.Substring(0, p-1);
Line 181:          }
Line 182:        }
Line 183:        sb.Remove(0, 1);
Line 184:      }
Line 185:      for ( ; varf &gt;= 0;  ) { // golestre stiva de ultimii operatori si genereaza
Line 186:        if ((char)stiva[varf] == '(') return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 187:        p = eval.Length;
Line 188:        if (p &lt; 2) return infix+&quot;ERROR operatori fara operanzi\n&quot;;
Line 189:        eval = eval.Substring(0, p-1);
Line 190:        postfix += stiva[varf];
Line 191:        stiva.RemoveAt(varf);
Line 192:        varf--;
Line 193:      }
Line 194:      if (eval.Length != 1) return infix+&quot;\nERROR prea multi operanzi\n&quot;;
Line 195:      sb = new StringBuilder(postfix);
Line 196:      p = 0;
Line 197:      for ( ; sb.Length &gt;0; ) { // construieste succesiunea de apeluri
Line 198:        c = sb[0];
Line 199:        if (c == '#') {
Line 200:          i = sb.ToString().IndexOf(&quot;|&quot;);
Line 201:          operanzi.Add(&quot;\&quot;&quot;+sb.ToString().Substring(1,i-1)+&quot;\&quot;&quot;);
Line 202:          sb.Remove(0,i+1);
Line 203:        } else {
Line 204:          sb.Remove(0, 1);
Line 205:          varf = operanzi.Count-1;
Line 206:          d = (String)operanzi[varf];
Line 207:          s = (String)operanzi[varf-1];
Line 208:          if (s[0] == '\&quot;' &amp;&amp; d[0] == '\&quot;') r = &quot;&quot;+(p++);
Line 209:          else if (s[0] == '\&quot;') r = d;
Line 210:          else r = s;
Line 211:          operanzi[varf-1] = r;
Line 212:          operanzi.RemoveAt(varf);
Line 213:          apeluri += r+&quot;=&quot;+s+c+d+&quot;\n&quot;;
Line 214:        }
Line 215:      }
Line 216:      apeluri += operanzi[0]+&quot;\n&quot;;
Line 217:      return apeluri+postfix+&quot;\n&quot;+infix;
Line 218:    } 
Line 219:  }
Line 220:  
Line 221:  
Line 222:  #line default
Line 223:  #line hidden
Line 224:  </pre></code>



                  </td>

               </tr>

            </table>



            



</div>



    <script type="text/javascript">

    function OnToggleTOCLevel1(level2ID)

    {

      var elemLevel2 = document.getElementById(level2ID);

      if (elemLevel2.style.display == 'none')

      {

        elemLevel2.style.display = '';

      }

      else {

        elemLevel2.style.display = 'none';

      }

    }

    </script>

                          <br><br>



            <hr width=100% size=1 color=silver>



            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3614



            </font>



    </body>

</html>

<!-- 

[HttpCompileException]: \\172.30.0.5\iis\~florin\ServiceRs.ashx(125): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

   at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.UI.SimpleHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)

   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)

   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

--><!-- 

This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using &lt;customErrors mode="Off"/&gt;. Consider using &lt;customErrors mode="On"/&gt; or &lt;customErrors mode="RemoteOnly"/&gt; in production environments.-->

Serv0:	toFpp:
<html>

    <head>

        <title>Compilation Error</title>

        <style>

         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 

         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}

         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}

         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }

         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }

         pre {font-family:"Lucida Console";font-size: .9em}

         .marker {font-weight: bold; color: black;text-decoration: none;}

         .version {color: gray;}

         .error {margin-bottom: 10px;}

         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

        </style>

    </head>



    <body bgcolor="white">



            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>



            <h2> <i>Compilation Error</i> </h2></span>



            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">



            <b> Description: </b>An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

            <br><br>



            <b> Compiler Error Message: </b>CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)<br><br>

<b>Source Error:</b><br><br>

            <table width=100% bgcolor="#ffffcc">

               <tr><td>

                              </td></tr>

               <tr>

                  <td>

                      <code><pre>



Line 123:    ArrayList stiva = new ArrayList();

Line 124:    ArrayList operanzi = new ArrayList();

<font color=red>Line 125:    StringBuilder sb = new StringBuilder(infix);

</font>Line 126:    for ( i=sb.Length-1; i&gt;=0; i--) {

Line 127:      c = sb[i];</pre></code>



                  </td>

               </tr>

            </table>



            <br>



            <b>Source File:</b> \\172.30.0.5\iis\~florin\ServiceRs.ashx

            &nbsp;&nbsp; <b>Line:</b>  125

            <br><br>

<br><div class="expandable" onclick="OnToggleTOCLevel1('compilerOutputDiv')">Show Detailed Compiler Output:</div>

<div id="compilerOutputDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



C:\WINDOWS\SysWOW64\inetsrv&gt; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe&quot; /t:library /utf8output /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll&quot; /R:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\MySql.Data\5.2.5.0__c5687fc88969c44d\MySql.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll&quot; /out:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.dll&quot; /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701  &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.0.cs&quot; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.1.cs&quot;





Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.3053

for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727

Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.



\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,5): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,28): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(127,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(130,32): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(138,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(140,16): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(143,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(146,50): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(192,14): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(195,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

</pre></code>



                  </td>

               </tr>

            </table>



            



</div>

<br><div class="expandable" onclick="OnToggleTOCLevel1('dynamicCodeDiv')">Show Complete Compilation Source:</div>

<div id="dynamicCodeDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



Line 1:    #pragma checksum &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot; &quot;{406ea660-64cf-4c82-b6f0-42d48172a799}&quot; &quot;1CFD175703181AB6B3BAC827D91F8797&quot;
Line 2:    
Line 3:    #line 1 &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot;
Line 4:    
Line 5:    using System;
Line 6:    using System.Net;
Line 7:    using System.Web;
Line 8:    using System.Collections;
Line 9:    using System.Collections.Specialized;
Line 10:   using System.IO;
Line 11:   public class ServiceRs : IHttpHandler {
Line 12:     public bool IsReusable { get { return false; } }
Line 13:     public void ProcessRequest(HttpContext ctx) {
Line 14:       String[] apel = {&quot;/ping&quot;, &quot;/add/&quot;, &quot;/subtract/&quot;, &quot;/multiply/&quot;, &quot;/divide/&quot;, &quot;/mod/&quot;, &quot;/intPow/&quot;, &quot;/toFpp&quot;}; 
Line 15:       String url = ctx.Request.RawUrl.ToString().ToLower();
Line 16:       int i=0, p=-1, a=0, b=0;
Line 17:       for (i=0; i&lt;apel.Length; i++) {
Line 18:         p = url.IndexOf(apel[i]);
Line 19:         if (p &gt; 0) break;
Line 20:       }
Line 21:       switch (i) {
Line 22:         case 0: 
Line 23:           if (ctx.Request.HttpMethod != &quot;GET&quot;) break;
Line 24:           ctx.Response.Write(ping()); 
Line 25:           break;
Line 26:         case 1: 
Line 27:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 28:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 29:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 30:           ctx.Response.Write(add(a, b).ToString() + &quot; method DELETE&quot;);
Line 31:           break;
Line 32:         case 2: 
Line 33:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 34:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 35:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 36:           ctx.Response.Write(subtract(a, b).ToString() + &quot; method DELETE&quot;);
Line 37:           break;
Line 38:         case 3: 
Line 39:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 40:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 41:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 42:           ctx.Response.Write(multiply(a, b).ToString() + &quot; method DELETE&quot;);
Line 43:           break;
Line 44:         case 4: 
Line 45:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 46:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 47:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 48:           ctx.Response.Write(divide(a, b).ToString() + &quot; method DELETE&quot;);
Line 49:           break;
Line 50:         case 5: 
Line 51:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 52:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 53:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 54:           ctx.Response.Write(mod(a, b).ToString() + &quot; method DELETE&quot;);
Line 55:           break;
Line 56:         case 6: 
Line 57:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 58:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 59:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 60:           ctx.Response.Write(intPow(a, b).ToString() + &quot; method DELETE&quot;);
Line 61:           break;
Line 62:         case 7:
Line 63:           if (ctx.Request.HttpMethod != &quot;POST&quot;) break;
Line 64:           Stream body = ctx.Request.InputStream;
Line 65:           a = Convert.ToInt32(body.Length);
Line 66:           byte[] bBody = new byte[a];
Line 67:           body.Read(bBody, 0, a);
Line 68:           String infix = System.Text.Encoding.ASCII.GetString(bBody);
Line 69:           ctx.Response.Write(toFpp(infix).ToString() + &quot; method PUT&quot;); 
Line 70:           break;
Line 71:        default: break;
Line 72:       }
Line 73:     }
Line 74:     private static String tip = &quot;RESTful&quot;;
Line 75:     private static String pathServ = &quot;Service.ashx&quot;;
Line 76:     private static int port = 80;
Line 77:     public static String ping() {
Line 78:      String host = Dns.GetHostName();
Line 79:       return &quot;C# &quot; + tip + &quot; &quot; + pathServ + &quot;: &quot;+host +
Line 80:         &quot; (&quot; + Dns.GetHostAddresses(host)[0] + &quot;:&quot; + port + &quot;) &quot; + DateTime.Now;
Line 81:     }
Line 82:     public int add(int a, int b) {
Line 83:       return a+b;
Line 84:     }
Line 85:     public int subtract(int a, int b) {
Line 86:       return a-b;
Line 87:     }
Line 88:     public int multiply(int a, int b) {
Line 89:       return a*b;
Line 90:     }
Line 91:     public int divide(int a, int b) {
Line 92:      try {
Line 93:         return a/b;
Line 94:       } catch (Exception e) {
Line 95:         throw new Exception(&quot;divide: Impartire la zero&quot; + e);
Line 96:       }
Line 97:      }
Line 98:     public int mod(int a, int b) {
Line 99:       try {
Line 100:        return a%b;
Line 101:      } catch (Exception e) {
Line 102:        throw new Exception(&quot;mod: Impartire la zero&quot; + e);
Line 103:      }
Line 104:    }
Line 105:    public int intPow(int a, int b) {
Line 106:      int p=1;
Line 107:      try {
Line 108:        for (int i=1; i&lt;= b; i++, p *= a);
Line 109:        return p;
Line 110:      } catch (Exception e) {
Line 111:        throw new Exception(&quot;intPow: depasire&quot; + e);
Line 112:      }
Line 113:    }
Line 114:    public String toFpp(String infix) {
Line 115:      infix = infix.Trim();
Line 116:      int i, p, varf =-1;
Line 117:      char c, u;
Line 118:      String s, d, r;
Line 119:      String postfix = &quot;&quot;;
Line 120:      String eval = &quot;&quot;;
Line 121:      String apeluri = &quot;&quot;;
Line 122:      String operatori = &quot;+-*/%^&quot;;
Line 123:      String priority = &quot;112223&quot;;
Line 124:      String albe = &quot; \t\n\r&quot;;
Line 125:      String alfabet = &quot;0123456789&quot;+operatori+albe+&quot;()&quot;;
Line 126:      ArrayList stiva = new ArrayList();
Line 127:      ArrayList operanzi = new ArrayList();
Line 128:      StringBuilder sb = new StringBuilder(infix);
Line 129:      for ( i=sb.Length-1; i&gt;=0; i--) {
Line 130:        c = sb[i];
Line 131:        if (alfabet.IndexOf(c) == -1) return infix+&quot;\nERROR caracter interzis!\n&quot;;
Line 132:        if (albe.IndexOf(c) &gt;= 0) sb.Remove(i, 1);
Line 133:        if (i &lt; sb.Length-1) u = sb[i+1]; else u = ' ';
Line 134:        if (c == '(')
Line 135:          if (u == '+')
Line 136:            sb.Remove(i+1, 1);
Line 137:          else if (u == '-')
Line 138:            sb.Insert(i+1, '0');
Line 139:      } // Control alfabet, sters toate spatiile albe, rezolvat + si - unar
Line 140:      if (sb.Length &gt; 0)
Line 141:        if (sb[0] == '+')
Line 142:          sb.Remove(0, 1);
Line 143:        else if (sb[0] == '-')
Line 144:          sb.Insert(0, '0');
Line 145:      for ( ; sb.Length &gt;0; ) {
Line 146:        c = sb[0];
Line 147:        i = operatori.IndexOf(c);
Line 148:        if (char.IsDigit(c)) { // operand
Line 149:          for ( i=0; i &lt; sb.Length &amp;&amp; char.IsDigit(sb[i]); i++) ;
Line 150:          postfix += &quot;#&quot;+sb.ToString().Substring(0,i)+&quot;|&quot;;
Line 151:          eval += &quot;#&quot;;
Line 152:          sb.Remove(0,i-1);
Line 153:        } else if (i != -1) { // operatori
Line 154:          for ( ; ; ) {
Line 155:            if (varf &lt; 0) break;
Line 156:            p = operatori.IndexOf(stiva[varf].ToString());
Line 157:            if (p &lt; 0 || priority[p] &lt; priority[i]) break;
Line 158:            p = eval.Length;
Line 159:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 160:            postfix += stiva[varf];
Line 161:            eval = eval.Substring(0, p-1);
Line 162:            stiva.RemoveAt(varf);
Line 163:            varf--;
Line 164:          }
Line 165:          stiva.Add(c);
Line 166:          varf++;
Line 167:        } else if (c == '(') { // pune ( in stiva
Line 168:          stiva.Add(c);
Line 169:          varf++;
Line 170:        } else if (c == ')') { // extrage din stiva pana la ( si genereaza corespunzator
Line 171:          for ( ;  ;  ) {
Line 172:            if (varf &lt; 0) return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 173:            c = (char)stiva[varf];
Line 174:            stiva.RemoveAt(varf);
Line 175:            varf--;
Line 176:            if (c == '(') break;
Line 177:            p = eval.Length;
Line 178:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 179:            postfix += c;
Line 180:            eval = eval.Substring(0, p-1);
Line 181:          }
Line 182:        }
Line 183:        sb.Remove(0, 1);
Line 184:      }
Line 185:      for ( ; varf &gt;= 0;  ) { // golestre stiva de ultimii operatori si genereaza
Line 186:        if ((char)stiva[varf] == '(') return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 187:        p = eval.Length;
Line 188:        if (p &lt; 2) return infix+&quot;ERROR operatori fara operanzi\n&quot;;
Line 189:        eval = eval.Substring(0, p-1);
Line 190:        postfix += stiva[varf];
Line 191:        stiva.RemoveAt(varf);
Line 192:        varf--;
Line 193:      }
Line 194:      if (eval.Length != 1) return infix+&quot;\nERROR prea multi operanzi\n&quot;;
Line 195:      sb = new StringBuilder(postfix);
Line 196:      p = 0;
Line 197:      for ( ; sb.Length &gt;0; ) { // construieste succesiunea de apeluri
Line 198:        c = sb[0];
Line 199:        if (c == '#') {
Line 200:          i = sb.ToString().IndexOf(&quot;|&quot;);
Line 201:          operanzi.Add(&quot;\&quot;&quot;+sb.ToString().Substring(1,i-1)+&quot;\&quot;&quot;);
Line 202:          sb.Remove(0,i+1);
Line 203:        } else {
Line 204:          sb.Remove(0, 1);
Line 205:          varf = operanzi.Count-1;
Line 206:          d = (String)operanzi[varf];
Line 207:          s = (String)operanzi[varf-1];
Line 208:          if (s[0] == '\&quot;' &amp;&amp; d[0] == '\&quot;') r = &quot;&quot;+(p++);
Line 209:          else if (s[0] == '\&quot;') r = d;
Line 210:          else r = s;
Line 211:          operanzi[varf-1] = r;
Line 212:          operanzi.RemoveAt(varf);
Line 213:          apeluri += r+&quot;=&quot;+s+c+d+&quot;\n&quot;;
Line 214:        }
Line 215:      }
Line 216:      apeluri += operanzi[0]+&quot;\n&quot;;
Line 217:      return apeluri+postfix+&quot;\n&quot;+infix;
Line 218:    } 
Line 219:  }
Line 220:  
Line 221:  
Line 222:  #line default
Line 223:  #line hidden
Line 224:  </pre></code>



                  </td>

               </tr>

            </table>



            



</div>



    <script type="text/javascript">

    function OnToggleTOCLevel1(level2ID)

    {

      var elemLevel2 = document.getElementById(level2ID);

      if (elemLevel2.style.display == 'none')

      {

        elemLevel2.style.display = '';

      }

      else {

        elemLevel2.style.display = 'none';

      }

    }

    </script>

                          <br><br>



            <hr width=100% size=1 color=silver>



            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3614



            </font>



    </body>

</html>

<!-- 

[HttpCompileException]: \\172.30.0.5\iis\~florin\ServiceRs.ashx(125): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

   at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.UI.SimpleHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)

   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)

   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

--><!-- 

This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using &lt;customErrors mode="Off"/&gt;. Consider using &lt;customErrors mode="On"/&gt; or &lt;customErrors mode="RemoteOnly"/&gt; in production environments.-->

Serv0:	toFpp:
<html>

    <head>

        <title>Compilation Error</title>

        <style>

         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 

         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}

         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}

         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }

         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }

         pre {font-family:"Lucida Console";font-size: .9em}

         .marker {font-weight: bold; color: black;text-decoration: none;}

         .version {color: gray;}

         .error {margin-bottom: 10px;}

         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

        </style>

    </head>



    <body bgcolor="white">



            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>



            <h2> <i>Compilation Error</i> </h2></span>



            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">



            <b> Description: </b>An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

            <br><br>



            <b> Compiler Error Message: </b>CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)<br><br>

<b>Source Error:</b><br><br>

            <table width=100% bgcolor="#ffffcc">

               <tr><td>

                              </td></tr>

               <tr>

                  <td>

                      <code><pre>



Line 123:    ArrayList stiva = new ArrayList();

Line 124:    ArrayList operanzi = new ArrayList();

<font color=red>Line 125:    StringBuilder sb = new StringBuilder(infix);

</font>Line 126:    for ( i=sb.Length-1; i&gt;=0; i--) {

Line 127:      c = sb[i];</pre></code>



                  </td>

               </tr>

            </table>



            <br>



            <b>Source File:</b> \\172.30.0.5\iis\~florin\ServiceRs.ashx

            &nbsp;&nbsp; <b>Line:</b>  125

            <br><br>

<br><div class="expandable" onclick="OnToggleTOCLevel1('compilerOutputDiv')">Show Detailed Compiler Output:</div>

<div id="compilerOutputDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



C:\WINDOWS\SysWOW64\inetsrv&gt; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe&quot; /t:library /utf8output /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll&quot; /R:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\MySql.Data\5.2.5.0__c5687fc88969c44d\MySql.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll&quot; /out:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.dll&quot; /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701  &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.0.cs&quot; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.1.cs&quot;





Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.3053

for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727

Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.



\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,5): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,28): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(127,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(130,32): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(138,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(140,16): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(143,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(146,50): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(192,14): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(195,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

</pre></code>



                  </td>

               </tr>

            </table>



            



</div>

<br><div class="expandable" onclick="OnToggleTOCLevel1('dynamicCodeDiv')">Show Complete Compilation Source:</div>

<div id="dynamicCodeDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



Line 1:    #pragma checksum &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot; &quot;{406ea660-64cf-4c82-b6f0-42d48172a799}&quot; &quot;1CFD175703181AB6B3BAC827D91F8797&quot;
Line 2:    
Line 3:    #line 1 &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot;
Line 4:    
Line 5:    using System;
Line 6:    using System.Net;
Line 7:    using System.Web;
Line 8:    using System.Collections;
Line 9:    using System.Collections.Specialized;
Line 10:   using System.IO;
Line 11:   public class ServiceRs : IHttpHandler {
Line 12:     public bool IsReusable { get { return false; } }
Line 13:     public void ProcessRequest(HttpContext ctx) {
Line 14:       String[] apel = {&quot;/ping&quot;, &quot;/add/&quot;, &quot;/subtract/&quot;, &quot;/multiply/&quot;, &quot;/divide/&quot;, &quot;/mod/&quot;, &quot;/intPow/&quot;, &quot;/toFpp&quot;}; 
Line 15:       String url = ctx.Request.RawUrl.ToString().ToLower();
Line 16:       int i=0, p=-1, a=0, b=0;
Line 17:       for (i=0; i&lt;apel.Length; i++) {
Line 18:         p = url.IndexOf(apel[i]);
Line 19:         if (p &gt; 0) break;
Line 20:       }
Line 21:       switch (i) {
Line 22:         case 0: 
Line 23:           if (ctx.Request.HttpMethod != &quot;GET&quot;) break;
Line 24:           ctx.Response.Write(ping()); 
Line 25:           break;
Line 26:         case 1: 
Line 27:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 28:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 29:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 30:           ctx.Response.Write(add(a, b).ToString() + &quot; method DELETE&quot;);
Line 31:           break;
Line 32:         case 2: 
Line 33:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 34:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 35:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 36:           ctx.Response.Write(subtract(a, b).ToString() + &quot; method DELETE&quot;);
Line 37:           break;
Line 38:         case 3: 
Line 39:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 40:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 41:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 42:           ctx.Response.Write(multiply(a, b).ToString() + &quot; method DELETE&quot;);
Line 43:           break;
Line 44:         case 4: 
Line 45:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 46:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 47:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 48:           ctx.Response.Write(divide(a, b).ToString() + &quot; method DELETE&quot;);
Line 49:           break;
Line 50:         case 5: 
Line 51:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 52:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 53:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 54:           ctx.Response.Write(mod(a, b).ToString() + &quot; method DELETE&quot;);
Line 55:           break;
Line 56:         case 6: 
Line 57:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 58:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 59:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 60:           ctx.Response.Write(intPow(a, b).ToString() + &quot; method DELETE&quot;);
Line 61:           break;
Line 62:         case 7:
Line 63:           if (ctx.Request.HttpMethod != &quot;POST&quot;) break;
Line 64:           Stream body = ctx.Request.InputStream;
Line 65:           a = Convert.ToInt32(body.Length);
Line 66:           byte[] bBody = new byte[a];
Line 67:           body.Read(bBody, 0, a);
Line 68:           String infix = System.Text.Encoding.ASCII.GetString(bBody);
Line 69:           ctx.Response.Write(toFpp(infix).ToString() + &quot; method PUT&quot;); 
Line 70:           break;
Line 71:        default: break;
Line 72:       }
Line 73:     }
Line 74:     private static String tip = &quot;RESTful&quot;;
Line 75:     private static String pathServ = &quot;Service.ashx&quot;;
Line 76:     private static int port = 80;
Line 77:     public static String ping() {
Line 78:      String host = Dns.GetHostName();
Line 79:       return &quot;C# &quot; + tip + &quot; &quot; + pathServ + &quot;: &quot;+host +
Line 80:         &quot; (&quot; + Dns.GetHostAddresses(host)[0] + &quot;:&quot; + port + &quot;) &quot; + DateTime.Now;
Line 81:     }
Line 82:     public int add(int a, int b) {
Line 83:       return a+b;
Line 84:     }
Line 85:     public int subtract(int a, int b) {
Line 86:       return a-b;
Line 87:     }
Line 88:     public int multiply(int a, int b) {
Line 89:       return a*b;
Line 90:     }
Line 91:     public int divide(int a, int b) {
Line 92:      try {
Line 93:         return a/b;
Line 94:       } catch (Exception e) {
Line 95:         throw new Exception(&quot;divide: Impartire la zero&quot; + e);
Line 96:       }
Line 97:      }
Line 98:     public int mod(int a, int b) {
Line 99:       try {
Line 100:        return a%b;
Line 101:      } catch (Exception e) {
Line 102:        throw new Exception(&quot;mod: Impartire la zero&quot; + e);
Line 103:      }
Line 104:    }
Line 105:    public int intPow(int a, int b) {
Line 106:      int p=1;
Line 107:      try {
Line 108:        for (int i=1; i&lt;= b; i++, p *= a);
Line 109:        return p;
Line 110:      } catch (Exception e) {
Line 111:        throw new Exception(&quot;intPow: depasire&quot; + e);
Line 112:      }
Line 113:    }
Line 114:    public String toFpp(String infix) {
Line 115:      infix = infix.Trim();
Line 116:      int i, p, varf =-1;
Line 117:      char c, u;
Line 118:      String s, d, r;
Line 119:      String postfix = &quot;&quot;;
Line 120:      String eval = &quot;&quot;;
Line 121:      String apeluri = &quot;&quot;;
Line 122:      String operatori = &quot;+-*/%^&quot;;
Line 123:      String priority = &quot;112223&quot;;
Line 124:      String albe = &quot; \t\n\r&quot;;
Line 125:      String alfabet = &quot;0123456789&quot;+operatori+albe+&quot;()&quot;;
Line 126:      ArrayList stiva = new ArrayList();
Line 127:      ArrayList operanzi = new ArrayList();
Line 128:      StringBuilder sb = new StringBuilder(infix);
Line 129:      for ( i=sb.Length-1; i&gt;=0; i--) {
Line 130:        c = sb[i];
Line 131:        if (alfabet.IndexOf(c) == -1) return infix+&quot;\nERROR caracter interzis!\n&quot;;
Line 132:        if (albe.IndexOf(c) &gt;= 0) sb.Remove(i, 1);
Line 133:        if (i &lt; sb.Length-1) u = sb[i+1]; else u = ' ';
Line 134:        if (c == '(')
Line 135:          if (u == '+')
Line 136:            sb.Remove(i+1, 1);
Line 137:          else if (u == '-')
Line 138:            sb.Insert(i+1, '0');
Line 139:      } // Control alfabet, sters toate spatiile albe, rezolvat + si - unar
Line 140:      if (sb.Length &gt; 0)
Line 141:        if (sb[0] == '+')
Line 142:          sb.Remove(0, 1);
Line 143:        else if (sb[0] == '-')
Line 144:          sb.Insert(0, '0');
Line 145:      for ( ; sb.Length &gt;0; ) {
Line 146:        c = sb[0];
Line 147:        i = operatori.IndexOf(c);
Line 148:        if (char.IsDigit(c)) { // operand
Line 149:          for ( i=0; i &lt; sb.Length &amp;&amp; char.IsDigit(sb[i]); i++) ;
Line 150:          postfix += &quot;#&quot;+sb.ToString().Substring(0,i)+&quot;|&quot;;
Line 151:          eval += &quot;#&quot;;
Line 152:          sb.Remove(0,i-1);
Line 153:        } else if (i != -1) { // operatori
Line 154:          for ( ; ; ) {
Line 155:            if (varf &lt; 0) break;
Line 156:            p = operatori.IndexOf(stiva[varf].ToString());
Line 157:            if (p &lt; 0 || priority[p] &lt; priority[i]) break;
Line 158:            p = eval.Length;
Line 159:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 160:            postfix += stiva[varf];
Line 161:            eval = eval.Substring(0, p-1);
Line 162:            stiva.RemoveAt(varf);
Line 163:            varf--;
Line 164:          }
Line 165:          stiva.Add(c);
Line 166:          varf++;
Line 167:        } else if (c == '(') { // pune ( in stiva
Line 168:          stiva.Add(c);
Line 169:          varf++;
Line 170:        } else if (c == ')') { // extrage din stiva pana la ( si genereaza corespunzator
Line 171:          for ( ;  ;  ) {
Line 172:            if (varf &lt; 0) return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 173:            c = (char)stiva[varf];
Line 174:            stiva.RemoveAt(varf);
Line 175:            varf--;
Line 176:            if (c == '(') break;
Line 177:            p = eval.Length;
Line 178:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 179:            postfix += c;
Line 180:            eval = eval.Substring(0, p-1);
Line 181:          }
Line 182:        }
Line 183:        sb.Remove(0, 1);
Line 184:      }
Line 185:      for ( ; varf &gt;= 0;  ) { // golestre stiva de ultimii operatori si genereaza
Line 186:        if ((char)stiva[varf] == '(') return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 187:        p = eval.Length;
Line 188:        if (p &lt; 2) return infix+&quot;ERROR operatori fara operanzi\n&quot;;
Line 189:        eval = eval.Substring(0, p-1);
Line 190:        postfix += stiva[varf];
Line 191:        stiva.RemoveAt(varf);
Line 192:        varf--;
Line 193:      }
Line 194:      if (eval.Length != 1) return infix+&quot;\nERROR prea multi operanzi\n&quot;;
Line 195:      sb = new StringBuilder(postfix);
Line 196:      p = 0;
Line 197:      for ( ; sb.Length &gt;0; ) { // construieste succesiunea de apeluri
Line 198:        c = sb[0];
Line 199:        if (c == '#') {
Line 200:          i = sb.ToString().IndexOf(&quot;|&quot;);
Line 201:          operanzi.Add(&quot;\&quot;&quot;+sb.ToString().Substring(1,i-1)+&quot;\&quot;&quot;);
Line 202:          sb.Remove(0,i+1);
Line 203:        } else {
Line 204:          sb.Remove(0, 1);
Line 205:          varf = operanzi.Count-1;
Line 206:          d = (String)operanzi[varf];
Line 207:          s = (String)operanzi[varf-1];
Line 208:          if (s[0] == '\&quot;' &amp;&amp; d[0] == '\&quot;') r = &quot;&quot;+(p++);
Line 209:          else if (s[0] == '\&quot;') r = d;
Line 210:          else r = s;
Line 211:          operanzi[varf-1] = r;
Line 212:          operanzi.RemoveAt(varf);
Line 213:          apeluri += r+&quot;=&quot;+s+c+d+&quot;\n&quot;;
Line 214:        }
Line 215:      }
Line 216:      apeluri += operanzi[0]+&quot;\n&quot;;
Line 217:      return apeluri+postfix+&quot;\n&quot;+infix;
Line 218:    } 
Line 219:  }
Line 220:  
Line 221:  
Line 222:  #line default
Line 223:  #line hidden
Line 224:  </pre></code>



                  </td>

               </tr>

            </table>



            



</div>



    <script type="text/javascript">

    function OnToggleTOCLevel1(level2ID)

    {

      var elemLevel2 = document.getElementById(level2ID);

      if (elemLevel2.style.display == 'none')

      {

        elemLevel2.style.display = '';

      }

      else {

        elemLevel2.style.display = 'none';

      }

    }

    </script>

                          <br><br>



            <hr width=100% size=1 color=silver>



            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3614



            </font>



    </body>

</html>

<!-- 

[HttpCompileException]: \\172.30.0.5\iis\~florin\ServiceRs.ashx(125): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

   at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.UI.SimpleHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)

   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)

   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

--><!-- 

This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using &lt;customErrors mode="Off"/&gt;. Consider using &lt;customErrors mode="On"/&gt; or &lt;customErrors mode="RemoteOnly"/&gt; in production environments.-->

Serv0:	toFpp:
<html>

    <head>

        <title>Compilation Error</title>

        <style>

         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 

         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}

         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}

         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }

         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }

         pre {font-family:"Lucida Console";font-size: .9em}

         .marker {font-weight: bold; color: black;text-decoration: none;}

         .version {color: gray;}

         .error {margin-bottom: 10px;}

         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

        </style>

    </head>



    <body bgcolor="white">



            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>



            <h2> <i>Compilation Error</i> </h2></span>



            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">



            <b> Description: </b>An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

            <br><br>



            <b> Compiler Error Message: </b>CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)<br><br>

<b>Source Error:</b><br><br>

            <table width=100% bgcolor="#ffffcc">

               <tr><td>

                              </td></tr>

               <tr>

                  <td>

                      <code><pre>



Line 123:    ArrayList stiva = new ArrayList();

Line 124:    ArrayList operanzi = new ArrayList();

<font color=red>Line 125:    StringBuilder sb = new StringBuilder(infix);

</font>Line 126:    for ( i=sb.Length-1; i&gt;=0; i--) {

Line 127:      c = sb[i];</pre></code>



                  </td>

               </tr>

            </table>



            <br>



            <b>Source File:</b> \\172.30.0.5\iis\~florin\ServiceRs.ashx

            &nbsp;&nbsp; <b>Line:</b>  125

            <br><br>

<br><div class="expandable" onclick="OnToggleTOCLevel1('compilerOutputDiv')">Show Detailed Compiler Output:</div>

<div id="compilerOutputDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



C:\WINDOWS\SysWOW64\inetsrv&gt; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe&quot; /t:library /utf8output /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll&quot; /R:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\MySql.Data\5.2.5.0__c5687fc88969c44d\MySql.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll&quot; /out:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.dll&quot; /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701  &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.0.cs&quot; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.1.cs&quot;





Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.3053

for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727

Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.



\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,5): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,28): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(127,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(130,32): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(138,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(140,16): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(143,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(146,50): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(192,14): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(195,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

</pre></code>



                  </td>

               </tr>

            </table>



            



</div>

<br><div class="expandable" onclick="OnToggleTOCLevel1('dynamicCodeDiv')">Show Complete Compilation Source:</div>

<div id="dynamicCodeDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



Line 1:    #pragma checksum &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot; &quot;{406ea660-64cf-4c82-b6f0-42d48172a799}&quot; &quot;1CFD175703181AB6B3BAC827D91F8797&quot;
Line 2:    
Line 3:    #line 1 &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot;
Line 4:    
Line 5:    using System;
Line 6:    using System.Net;
Line 7:    using System.Web;
Line 8:    using System.Collections;
Line 9:    using System.Collections.Specialized;
Line 10:   using System.IO;
Line 11:   public class ServiceRs : IHttpHandler {
Line 12:     public bool IsReusable { get { return false; } }
Line 13:     public void ProcessRequest(HttpContext ctx) {
Line 14:       String[] apel = {&quot;/ping&quot;, &quot;/add/&quot;, &quot;/subtract/&quot;, &quot;/multiply/&quot;, &quot;/divide/&quot;, &quot;/mod/&quot;, &quot;/intPow/&quot;, &quot;/toFpp&quot;}; 
Line 15:       String url = ctx.Request.RawUrl.ToString().ToLower();
Line 16:       int i=0, p=-1, a=0, b=0;
Line 17:       for (i=0; i&lt;apel.Length; i++) {
Line 18:         p = url.IndexOf(apel[i]);
Line 19:         if (p &gt; 0) break;
Line 20:       }
Line 21:       switch (i) {
Line 22:         case 0: 
Line 23:           if (ctx.Request.HttpMethod != &quot;GET&quot;) break;
Line 24:           ctx.Response.Write(ping()); 
Line 25:           break;
Line 26:         case 1: 
Line 27:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 28:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 29:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 30:           ctx.Response.Write(add(a, b).ToString() + &quot; method DELETE&quot;);
Line 31:           break;
Line 32:         case 2: 
Line 33:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 34:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 35:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 36:           ctx.Response.Write(subtract(a, b).ToString() + &quot; method DELETE&quot;);
Line 37:           break;
Line 38:         case 3: 
Line 39:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 40:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 41:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 42:           ctx.Response.Write(multiply(a, b).ToString() + &quot; method DELETE&quot;);
Line 43:           break;
Line 44:         case 4: 
Line 45:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 46:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 47:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 48:           ctx.Response.Write(divide(a, b).ToString() + &quot; method DELETE&quot;);
Line 49:           break;
Line 50:         case 5: 
Line 51:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 52:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 53:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 54:           ctx.Response.Write(mod(a, b).ToString() + &quot; method DELETE&quot;);
Line 55:           break;
Line 56:         case 6: 
Line 57:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 58:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 59:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 60:           ctx.Response.Write(intPow(a, b).ToString() + &quot; method DELETE&quot;);
Line 61:           break;
Line 62:         case 7:
Line 63:           if (ctx.Request.HttpMethod != &quot;POST&quot;) break;
Line 64:           Stream body = ctx.Request.InputStream;
Line 65:           a = Convert.ToInt32(body.Length);
Line 66:           byte[] bBody = new byte[a];
Line 67:           body.Read(bBody, 0, a);
Line 68:           String infix = System.Text.Encoding.ASCII.GetString(bBody);
Line 69:           ctx.Response.Write(toFpp(infix).ToString() + &quot; method PUT&quot;); 
Line 70:           break;
Line 71:        default: break;
Line 72:       }
Line 73:     }
Line 74:     private static String tip = &quot;RESTful&quot;;
Line 75:     private static String pathServ = &quot;Service.ashx&quot;;
Line 76:     private static int port = 80;
Line 77:     public static String ping() {
Line 78:      String host = Dns.GetHostName();
Line 79:       return &quot;C# &quot; + tip + &quot; &quot; + pathServ + &quot;: &quot;+host +
Line 80:         &quot; (&quot; + Dns.GetHostAddresses(host)[0] + &quot;:&quot; + port + &quot;) &quot; + DateTime.Now;
Line 81:     }
Line 82:     public int add(int a, int b) {
Line 83:       return a+b;
Line 84:     }
Line 85:     public int subtract(int a, int b) {
Line 86:       return a-b;
Line 87:     }
Line 88:     public int multiply(int a, int b) {
Line 89:       return a*b;
Line 90:     }
Line 91:     public int divide(int a, int b) {
Line 92:      try {
Line 93:         return a/b;
Line 94:       } catch (Exception e) {
Line 95:         throw new Exception(&quot;divide: Impartire la zero&quot; + e);
Line 96:       }
Line 97:      }
Line 98:     public int mod(int a, int b) {
Line 99:       try {
Line 100:        return a%b;
Line 101:      } catch (Exception e) {
Line 102:        throw new Exception(&quot;mod: Impartire la zero&quot; + e);
Line 103:      }
Line 104:    }
Line 105:    public int intPow(int a, int b) {
Line 106:      int p=1;
Line 107:      try {
Line 108:        for (int i=1; i&lt;= b; i++, p *= a);
Line 109:        return p;
Line 110:      } catch (Exception e) {
Line 111:        throw new Exception(&quot;intPow: depasire&quot; + e);
Line 112:      }
Line 113:    }
Line 114:    public String toFpp(String infix) {
Line 115:      infix = infix.Trim();
Line 116:      int i, p, varf =-1;
Line 117:      char c, u;
Line 118:      String s, d, r;
Line 119:      String postfix = &quot;&quot;;
Line 120:      String eval = &quot;&quot;;
Line 121:      String apeluri = &quot;&quot;;
Line 122:      String operatori = &quot;+-*/%^&quot;;
Line 123:      String priority = &quot;112223&quot;;
Line 124:      String albe = &quot; \t\n\r&quot;;
Line 125:      String alfabet = &quot;0123456789&quot;+operatori+albe+&quot;()&quot;;
Line 126:      ArrayList stiva = new ArrayList();
Line 127:      ArrayList operanzi = new ArrayList();
Line 128:      StringBuilder sb = new StringBuilder(infix);
Line 129:      for ( i=sb.Length-1; i&gt;=0; i--) {
Line 130:        c = sb[i];
Line 131:        if (alfabet.IndexOf(c) == -1) return infix+&quot;\nERROR caracter interzis!\n&quot;;
Line 132:        if (albe.IndexOf(c) &gt;= 0) sb.Remove(i, 1);
Line 133:        if (i &lt; sb.Length-1) u = sb[i+1]; else u = ' ';
Line 134:        if (c == '(')
Line 135:          if (u == '+')
Line 136:            sb.Remove(i+1, 1);
Line 137:          else if (u == '-')
Line 138:            sb.Insert(i+1, '0');
Line 139:      } // Control alfabet, sters toate spatiile albe, rezolvat + si - unar
Line 140:      if (sb.Length &gt; 0)
Line 141:        if (sb[0] == '+')
Line 142:          sb.Remove(0, 1);
Line 143:        else if (sb[0] == '-')
Line 144:          sb.Insert(0, '0');
Line 145:      for ( ; sb.Length &gt;0; ) {
Line 146:        c = sb[0];
Line 147:        i = operatori.IndexOf(c);
Line 148:        if (char.IsDigit(c)) { // operand
Line 149:          for ( i=0; i &lt; sb.Length &amp;&amp; char.IsDigit(sb[i]); i++) ;
Line 150:          postfix += &quot;#&quot;+sb.ToString().Substring(0,i)+&quot;|&quot;;
Line 151:          eval += &quot;#&quot;;
Line 152:          sb.Remove(0,i-1);
Line 153:        } else if (i != -1) { // operatori
Line 154:          for ( ; ; ) {
Line 155:            if (varf &lt; 0) break;
Line 156:            p = operatori.IndexOf(stiva[varf].ToString());
Line 157:            if (p &lt; 0 || priority[p] &lt; priority[i]) break;
Line 158:            p = eval.Length;
Line 159:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 160:            postfix += stiva[varf];
Line 161:            eval = eval.Substring(0, p-1);
Line 162:            stiva.RemoveAt(varf);
Line 163:            varf--;
Line 164:          }
Line 165:          stiva.Add(c);
Line 166:          varf++;
Line 167:        } else if (c == '(') { // pune ( in stiva
Line 168:          stiva.Add(c);
Line 169:          varf++;
Line 170:        } else if (c == ')') { // extrage din stiva pana la ( si genereaza corespunzator
Line 171:          for ( ;  ;  ) {
Line 172:            if (varf &lt; 0) return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 173:            c = (char)stiva[varf];
Line 174:            stiva.RemoveAt(varf);
Line 175:            varf--;
Line 176:            if (c == '(') break;
Line 177:            p = eval.Length;
Line 178:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 179:            postfix += c;
Line 180:            eval = eval.Substring(0, p-1);
Line 181:          }
Line 182:        }
Line 183:        sb.Remove(0, 1);
Line 184:      }
Line 185:      for ( ; varf &gt;= 0;  ) { // golestre stiva de ultimii operatori si genereaza
Line 186:        if ((char)stiva[varf] == '(') return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 187:        p = eval.Length;
Line 188:        if (p &lt; 2) return infix+&quot;ERROR operatori fara operanzi\n&quot;;
Line 189:        eval = eval.Substring(0, p-1);
Line 190:        postfix += stiva[varf];
Line 191:        stiva.RemoveAt(varf);
Line 192:        varf--;
Line 193:      }
Line 194:      if (eval.Length != 1) return infix+&quot;\nERROR prea multi operanzi\n&quot;;
Line 195:      sb = new StringBuilder(postfix);
Line 196:      p = 0;
Line 197:      for ( ; sb.Length &gt;0; ) { // construieste succesiunea de apeluri
Line 198:        c = sb[0];
Line 199:        if (c == '#') {
Line 200:          i = sb.ToString().IndexOf(&quot;|&quot;);
Line 201:          operanzi.Add(&quot;\&quot;&quot;+sb.ToString().Substring(1,i-1)+&quot;\&quot;&quot;);
Line 202:          sb.Remove(0,i+1);
Line 203:        } else {
Line 204:          sb.Remove(0, 1);
Line 205:          varf = operanzi.Count-1;
Line 206:          d = (String)operanzi[varf];
Line 207:          s = (String)operanzi[varf-1];
Line 208:          if (s[0] == '\&quot;' &amp;&amp; d[0] == '\&quot;') r = &quot;&quot;+(p++);
Line 209:          else if (s[0] == '\&quot;') r = d;
Line 210:          else r = s;
Line 211:          operanzi[varf-1] = r;
Line 212:          operanzi.RemoveAt(varf);
Line 213:          apeluri += r+&quot;=&quot;+s+c+d+&quot;\n&quot;;
Line 214:        }
Line 215:      }
Line 216:      apeluri += operanzi[0]+&quot;\n&quot;;
Line 217:      return apeluri+postfix+&quot;\n&quot;+infix;
Line 218:    } 
Line 219:  }
Line 220:  
Line 221:  
Line 222:  #line default
Line 223:  #line hidden
Line 224:  </pre></code>



                  </td>

               </tr>

            </table>



            



</div>



    <script type="text/javascript">

    function OnToggleTOCLevel1(level2ID)

    {

      var elemLevel2 = document.getElementById(level2ID);

      if (elemLevel2.style.display == 'none')

      {

        elemLevel2.style.display = '';

      }

      else {

        elemLevel2.style.display = 'none';

      }

    }

    </script>

                          <br><br>



            <hr width=100% size=1 color=silver>



            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3614



            </font>



    </body>

</html>

<!-- 

[HttpCompileException]: \\172.30.0.5\iis\~florin\ServiceRs.ashx(125): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

   at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.UI.SimpleHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)

   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)

   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

--><!-- 

This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using &lt;customErrors mode="Off"/&gt;. Consider using &lt;customErrors mode="On"/&gt; or &lt;customErrors mode="RemoteOnly"/&gt; in production environments.-->

Serv0:	toFpp:
<html>

    <head>

        <title>Compilation Error</title>

        <style>

         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 

         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}

         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}

         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }

         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }

         pre {font-family:"Lucida Console";font-size: .9em}

         .marker {font-weight: bold; color: black;text-decoration: none;}

         .version {color: gray;}

         .error {margin-bottom: 10px;}

         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

        </style>

    </head>



    <body bgcolor="white">



            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>



            <h2> <i>Compilation Error</i> </h2></span>



            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">



            <b> Description: </b>An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

            <br><br>



            <b> Compiler Error Message: </b>CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)<br><br>

<b>Source Error:</b><br><br>

            <table width=100% bgcolor="#ffffcc">

               <tr><td>

                              </td></tr>

               <tr>

                  <td>

                      <code><pre>



Line 123:    ArrayList stiva = new ArrayList();

Line 124:    ArrayList operanzi = new ArrayList();

<font color=red>Line 125:    StringBuilder sb = new StringBuilder(infix);

</font>Line 126:    for ( i=sb.Length-1; i&gt;=0; i--) {

Line 127:      c = sb[i];</pre></code>



                  </td>

               </tr>

            </table>



            <br>



            <b>Source File:</b> \\172.30.0.5\iis\~florin\ServiceRs.ashx

            &nbsp;&nbsp; <b>Line:</b>  125

            <br><br>

<br><div class="expandable" onclick="OnToggleTOCLevel1('compilerOutputDiv')">Show Detailed Compiler Output:</div>

<div id="compilerOutputDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



C:\WINDOWS\SysWOW64\inetsrv&gt; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe&quot; /t:library /utf8output /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll&quot; /R:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\MySql.Data\5.2.5.0__c5687fc88969c44d\MySql.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll&quot; /out:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.dll&quot; /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701  &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.0.cs&quot; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.1.cs&quot;





Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.3053

for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727

Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.



\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,5): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,28): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(127,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(130,32): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(138,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(140,16): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(143,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(146,50): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(192,14): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(195,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

</pre></code>



                  </td>

               </tr>

            </table>



            



</div>

<br><div class="expandable" onclick="OnToggleTOCLevel1('dynamicCodeDiv')">Show Complete Compilation Source:</div>

<div id="dynamicCodeDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



Line 1:    #pragma checksum &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot; &quot;{406ea660-64cf-4c82-b6f0-42d48172a799}&quot; &quot;1CFD175703181AB6B3BAC827D91F8797&quot;
Line 2:    
Line 3:    #line 1 &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot;
Line 4:    
Line 5:    using System;
Line 6:    using System.Net;
Line 7:    using System.Web;
Line 8:    using System.Collections;
Line 9:    using System.Collections.Specialized;
Line 10:   using System.IO;
Line 11:   public class ServiceRs : IHttpHandler {
Line 12:     public bool IsReusable { get { return false; } }
Line 13:     public void ProcessRequest(HttpContext ctx) {
Line 14:       String[] apel = {&quot;/ping&quot;, &quot;/add/&quot;, &quot;/subtract/&quot;, &quot;/multiply/&quot;, &quot;/divide/&quot;, &quot;/mod/&quot;, &quot;/intPow/&quot;, &quot;/toFpp&quot;}; 
Line 15:       String url = ctx.Request.RawUrl.ToString().ToLower();
Line 16:       int i=0, p=-1, a=0, b=0;
Line 17:       for (i=0; i&lt;apel.Length; i++) {
Line 18:         p = url.IndexOf(apel[i]);
Line 19:         if (p &gt; 0) break;
Line 20:       }
Line 21:       switch (i) {
Line 22:         case 0: 
Line 23:           if (ctx.Request.HttpMethod != &quot;GET&quot;) break;
Line 24:           ctx.Response.Write(ping()); 
Line 25:           break;
Line 26:         case 1: 
Line 27:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 28:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 29:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 30:           ctx.Response.Write(add(a, b).ToString() + &quot; method DELETE&quot;);
Line 31:           break;
Line 32:         case 2: 
Line 33:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 34:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 35:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 36:           ctx.Response.Write(subtract(a, b).ToString() + &quot; method DELETE&quot;);
Line 37:           break;
Line 38:         case 3: 
Line 39:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 40:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 41:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 42:           ctx.Response.Write(multiply(a, b).ToString() + &quot; method DELETE&quot;);
Line 43:           break;
Line 44:         case 4: 
Line 45:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 46:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 47:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 48:           ctx.Response.Write(divide(a, b).ToString() + &quot; method DELETE&quot;);
Line 49:           break;
Line 50:         case 5: 
Line 51:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 52:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 53:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 54:           ctx.Response.Write(mod(a, b).ToString() + &quot; method DELETE&quot;);
Line 55:           break;
Line 56:         case 6: 
Line 57:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 58:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 59:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 60:           ctx.Response.Write(intPow(a, b).ToString() + &quot; method DELETE&quot;);
Line 61:           break;
Line 62:         case 7:
Line 63:           if (ctx.Request.HttpMethod != &quot;POST&quot;) break;
Line 64:           Stream body = ctx.Request.InputStream;
Line 65:           a = Convert.ToInt32(body.Length);
Line 66:           byte[] bBody = new byte[a];
Line 67:           body.Read(bBody, 0, a);
Line 68:           String infix = System.Text.Encoding.ASCII.GetString(bBody);
Line 69:           ctx.Response.Write(toFpp(infix).ToString() + &quot; method PUT&quot;); 
Line 70:           break;
Line 71:        default: break;
Line 72:       }
Line 73:     }
Line 74:     private static String tip = &quot;RESTful&quot;;
Line 75:     private static String pathServ = &quot;Service.ashx&quot;;
Line 76:     private static int port = 80;
Line 77:     public static String ping() {
Line 78:      String host = Dns.GetHostName();
Line 79:       return &quot;C# &quot; + tip + &quot; &quot; + pathServ + &quot;: &quot;+host +
Line 80:         &quot; (&quot; + Dns.GetHostAddresses(host)[0] + &quot;:&quot; + port + &quot;) &quot; + DateTime.Now;
Line 81:     }
Line 82:     public int add(int a, int b) {
Line 83:       return a+b;
Line 84:     }
Line 85:     public int subtract(int a, int b) {
Line 86:       return a-b;
Line 87:     }
Line 88:     public int multiply(int a, int b) {
Line 89:       return a*b;
Line 90:     }
Line 91:     public int divide(int a, int b) {
Line 92:      try {
Line 93:         return a/b;
Line 94:       } catch (Exception e) {
Line 95:         throw new Exception(&quot;divide: Impartire la zero&quot; + e);
Line 96:       }
Line 97:      }
Line 98:     public int mod(int a, int b) {
Line 99:       try {
Line 100:        return a%b;
Line 101:      } catch (Exception e) {
Line 102:        throw new Exception(&quot;mod: Impartire la zero&quot; + e);
Line 103:      }
Line 104:    }
Line 105:    public int intPow(int a, int b) {
Line 106:      int p=1;
Line 107:      try {
Line 108:        for (int i=1; i&lt;= b; i++, p *= a);
Line 109:        return p;
Line 110:      } catch (Exception e) {
Line 111:        throw new Exception(&quot;intPow: depasire&quot; + e);
Line 112:      }
Line 113:    }
Line 114:    public String toFpp(String infix) {
Line 115:      infix = infix.Trim();
Line 116:      int i, p, varf =-1;
Line 117:      char c, u;
Line 118:      String s, d, r;
Line 119:      String postfix = &quot;&quot;;
Line 120:      String eval = &quot;&quot;;
Line 121:      String apeluri = &quot;&quot;;
Line 122:      String operatori = &quot;+-*/%^&quot;;
Line 123:      String priority = &quot;112223&quot;;
Line 124:      String albe = &quot; \t\n\r&quot;;
Line 125:      String alfabet = &quot;0123456789&quot;+operatori+albe+&quot;()&quot;;
Line 126:      ArrayList stiva = new ArrayList();
Line 127:      ArrayList operanzi = new ArrayList();
Line 128:      StringBuilder sb = new StringBuilder(infix);
Line 129:      for ( i=sb.Length-1; i&gt;=0; i--) {
Line 130:        c = sb[i];
Line 131:        if (alfabet.IndexOf(c) == -1) return infix+&quot;\nERROR caracter interzis!\n&quot;;
Line 132:        if (albe.IndexOf(c) &gt;= 0) sb.Remove(i, 1);
Line 133:        if (i &lt; sb.Length-1) u = sb[i+1]; else u = ' ';
Line 134:        if (c == '(')
Line 135:          if (u == '+')
Line 136:            sb.Remove(i+1, 1);
Line 137:          else if (u == '-')
Line 138:            sb.Insert(i+1, '0');
Line 139:      } // Control alfabet, sters toate spatiile albe, rezolvat + si - unar
Line 140:      if (sb.Length &gt; 0)
Line 141:        if (sb[0] == '+')
Line 142:          sb.Remove(0, 1);
Line 143:        else if (sb[0] == '-')
Line 144:          sb.Insert(0, '0');
Line 145:      for ( ; sb.Length &gt;0; ) {
Line 146:        c = sb[0];
Line 147:        i = operatori.IndexOf(c);
Line 148:        if (char.IsDigit(c)) { // operand
Line 149:          for ( i=0; i &lt; sb.Length &amp;&amp; char.IsDigit(sb[i]); i++) ;
Line 150:          postfix += &quot;#&quot;+sb.ToString().Substring(0,i)+&quot;|&quot;;
Line 151:          eval += &quot;#&quot;;
Line 152:          sb.Remove(0,i-1);
Line 153:        } else if (i != -1) { // operatori
Line 154:          for ( ; ; ) {
Line 155:            if (varf &lt; 0) break;
Line 156:            p = operatori.IndexOf(stiva[varf].ToString());
Line 157:            if (p &lt; 0 || priority[p] &lt; priority[i]) break;
Line 158:            p = eval.Length;
Line 159:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 160:            postfix += stiva[varf];
Line 161:            eval = eval.Substring(0, p-1);
Line 162:            stiva.RemoveAt(varf);
Line 163:            varf--;
Line 164:          }
Line 165:          stiva.Add(c);
Line 166:          varf++;
Line 167:        } else if (c == '(') { // pune ( in stiva
Line 168:          stiva.Add(c);
Line 169:          varf++;
Line 170:        } else if (c == ')') { // extrage din stiva pana la ( si genereaza corespunzator
Line 171:          for ( ;  ;  ) {
Line 172:            if (varf &lt; 0) return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 173:            c = (char)stiva[varf];
Line 174:            stiva.RemoveAt(varf);
Line 175:            varf--;
Line 176:            if (c == '(') break;
Line 177:            p = eval.Length;
Line 178:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 179:            postfix += c;
Line 180:            eval = eval.Substring(0, p-1);
Line 181:          }
Line 182:        }
Line 183:        sb.Remove(0, 1);
Line 184:      }
Line 185:      for ( ; varf &gt;= 0;  ) { // golestre stiva de ultimii operatori si genereaza
Line 186:        if ((char)stiva[varf] == '(') return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 187:        p = eval.Length;
Line 188:        if (p &lt; 2) return infix+&quot;ERROR operatori fara operanzi\n&quot;;
Line 189:        eval = eval.Substring(0, p-1);
Line 190:        postfix += stiva[varf];
Line 191:        stiva.RemoveAt(varf);
Line 192:        varf--;
Line 193:      }
Line 194:      if (eval.Length != 1) return infix+&quot;\nERROR prea multi operanzi\n&quot;;
Line 195:      sb = new StringBuilder(postfix);
Line 196:      p = 0;
Line 197:      for ( ; sb.Length &gt;0; ) { // construieste succesiunea de apeluri
Line 198:        c = sb[0];
Line 199:        if (c == '#') {
Line 200:          i = sb.ToString().IndexOf(&quot;|&quot;);
Line 201:          operanzi.Add(&quot;\&quot;&quot;+sb.ToString().Substring(1,i-1)+&quot;\&quot;&quot;);
Line 202:          sb.Remove(0,i+1);
Line 203:        } else {
Line 204:          sb.Remove(0, 1);
Line 205:          varf = operanzi.Count-1;
Line 206:          d = (String)operanzi[varf];
Line 207:          s = (String)operanzi[varf-1];
Line 208:          if (s[0] == '\&quot;' &amp;&amp; d[0] == '\&quot;') r = &quot;&quot;+(p++);
Line 209:          else if (s[0] == '\&quot;') r = d;
Line 210:          else r = s;
Line 211:          operanzi[varf-1] = r;
Line 212:          operanzi.RemoveAt(varf);
Line 213:          apeluri += r+&quot;=&quot;+s+c+d+&quot;\n&quot;;
Line 214:        }
Line 215:      }
Line 216:      apeluri += operanzi[0]+&quot;\n&quot;;
Line 217:      return apeluri+postfix+&quot;\n&quot;+infix;
Line 218:    } 
Line 219:  }
Line 220:  
Line 221:  
Line 222:  #line default
Line 223:  #line hidden
Line 224:  </pre></code>



                  </td>

               </tr>

            </table>



            



</div>



    <script type="text/javascript">

    function OnToggleTOCLevel1(level2ID)

    {

      var elemLevel2 = document.getElementById(level2ID);

      if (elemLevel2.style.display == 'none')

      {

        elemLevel2.style.display = '';

      }

      else {

        elemLevel2.style.display = 'none';

      }

    }

    </script>

                          <br><br>



            <hr width=100% size=1 color=silver>



            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3614



            </font>



    </body>

</html>

<!-- 

[HttpCompileException]: \\172.30.0.5\iis\~florin\ServiceRs.ashx(125): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

   at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.UI.SimpleHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)

   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)

   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

--><!-- 

This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using &lt;customErrors mode="Off"/&gt;. Consider using &lt;customErrors mode="On"/&gt; or &lt;customErrors mode="RemoteOnly"/&gt; in production environments.-->

Apeluri punctuale de metode de la servicii aleatoare:
Serv0:	ping: <html>

    <head>

        <title>Compilation Error</title>

        <style>

         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 

         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}

         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}

         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }

         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }

         pre {font-family:"Lucida Console";font-size: .9em}

         .marker {font-weight: bold; color: black;text-decoration: none;}

         .version {color: gray;}

         .error {margin-bottom: 10px;}

         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

        </style>

    </head>



    <body bgcolor="white">



            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>



            <h2> <i>Compilation Error</i> </h2></span>



            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">



            <b> Description: </b>An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

            <br><br>



            <b> Compiler Error Message: </b>CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)<br><br>

<b>Source Error:</b><br><br>

            <table width=100% bgcolor="#ffffcc">

               <tr><td>

                              </td></tr>

               <tr>

                  <td>

                      <code><pre>



Line 123:    ArrayList stiva = new ArrayList();

Line 124:    ArrayList operanzi = new ArrayList();

<font color=red>Line 125:    StringBuilder sb = new StringBuilder(infix);

</font>Line 126:    for ( i=sb.Length-1; i&gt;=0; i--) {

Line 127:      c = sb[i];</pre></code>



                  </td>

               </tr>

            </table>



            <br>



            <b>Source File:</b> \\172.30.0.5\iis\~florin\ServiceRs.ashx

            &nbsp;&nbsp; <b>Line:</b>  125

            <br><br>

<br><div class="expandable" onclick="OnToggleTOCLevel1('compilerOutputDiv')">Show Detailed Compiler Output:</div>

<div id="compilerOutputDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



C:\WINDOWS\SysWOW64\inetsrv&gt; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe&quot; /t:library /utf8output /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll&quot; /R:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\MySql.Data\5.2.5.0__c5687fc88969c44d\MySql.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll&quot; /out:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.dll&quot; /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701  &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.0.cs&quot; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.1.cs&quot;





Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.3053

for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727

Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.



\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,5): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,28): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(127,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(130,32): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(138,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(140,16): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(143,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(146,50): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(192,14): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(195,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

</pre></code>



                  </td>

               </tr>

            </table>



            



</div>

<br><div class="expandable" onclick="OnToggleTOCLevel1('dynamicCodeDiv')">Show Complete Compilation Source:</div>

<div id="dynamicCodeDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



Line 1:    #pragma checksum &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot; &quot;{406ea660-64cf-4c82-b6f0-42d48172a799}&quot; &quot;1CFD175703181AB6B3BAC827D91F8797&quot;
Line 2:    
Line 3:    #line 1 &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot;
Line 4:    
Line 5:    using System;
Line 6:    using System.Net;
Line 7:    using System.Web;
Line 8:    using System.Collections;
Line 9:    using System.Collections.Specialized;
Line 10:   using System.IO;
Line 11:   public class ServiceRs : IHttpHandler {
Line 12:     public bool IsReusable { get { return false; } }
Line 13:     public void ProcessRequest(HttpContext ctx) {
Line 14:       String[] apel = {&quot;/ping&quot;, &quot;/add/&quot;, &quot;/subtract/&quot;, &quot;/multiply/&quot;, &quot;/divide/&quot;, &quot;/mod/&quot;, &quot;/intPow/&quot;, &quot;/toFpp&quot;}; 
Line 15:       String url = ctx.Request.RawUrl.ToString().ToLower();
Line 16:       int i=0, p=-1, a=0, b=0;
Line 17:       for (i=0; i&lt;apel.Length; i++) {
Line 18:         p = url.IndexOf(apel[i]);
Line 19:         if (p &gt; 0) break;
Line 20:       }
Line 21:       switch (i) {
Line 22:         case 0: 
Line 23:           if (ctx.Request.HttpMethod != &quot;GET&quot;) break;
Line 24:           ctx.Response.Write(ping()); 
Line 25:           break;
Line 26:         case 1: 
Line 27:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 28:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 29:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 30:           ctx.Response.Write(add(a, b).ToString() + &quot; method DELETE&quot;);
Line 31:           break;
Line 32:         case 2: 
Line 33:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 34:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 35:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 36:           ctx.Response.Write(subtract(a, b).ToString() + &quot; method DELETE&quot;);
Line 37:           break;
Line 38:         case 3: 
Line 39:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 40:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 41:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 42:           ctx.Response.Write(multiply(a, b).ToString() + &quot; method DELETE&quot;);
Line 43:           break;
Line 44:         case 4: 
Line 45:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 46:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 47:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 48:           ctx.Response.Write(divide(a, b).ToString() + &quot; method DELETE&quot;);
Line 49:           break;
Line 50:         case 5: 
Line 51:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 52:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 53:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 54:           ctx.Response.Write(mod(a, b).ToString() + &quot; method DELETE&quot;);
Line 55:           break;
Line 56:         case 6: 
Line 57:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 58:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 59:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 60:           ctx.Response.Write(intPow(a, b).ToString() + &quot; method DELETE&quot;);
Line 61:           break;
Line 62:         case 7:
Line 63:           if (ctx.Request.HttpMethod != &quot;POST&quot;) break;
Line 64:           Stream body = ctx.Request.InputStream;
Line 65:           a = Convert.ToInt32(body.Length);
Line 66:           byte[] bBody = new byte[a];
Line 67:           body.Read(bBody, 0, a);
Line 68:           String infix = System.Text.Encoding.ASCII.GetString(bBody);
Line 69:           ctx.Response.Write(toFpp(infix).ToString() + &quot; method PUT&quot;); 
Line 70:           break;
Line 71:        default: break;
Line 72:       }
Line 73:     }
Line 74:     private static String tip = &quot;RESTful&quot;;
Line 75:     private static String pathServ = &quot;Service.ashx&quot;;
Line 76:     private static int port = 80;
Line 77:     public static String ping() {
Line 78:      String host = Dns.GetHostName();
Line 79:       return &quot;C# &quot; + tip + &quot; &quot; + pathServ + &quot;: &quot;+host +
Line 80:         &quot; (&quot; + Dns.GetHostAddresses(host)[0] + &quot;:&quot; + port + &quot;) &quot; + DateTime.Now;
Line 81:     }
Line 82:     public int add(int a, int b) {
Line 83:       return a+b;
Line 84:     }
Line 85:     public int subtract(int a, int b) {
Line 86:       return a-b;
Line 87:     }
Line 88:     public int multiply(int a, int b) {
Line 89:       return a*b;
Line 90:     }
Line 91:     public int divide(int a, int b) {
Line 92:      try {
Line 93:         return a/b;
Line 94:       } catch (Exception e) {
Line 95:         throw new Exception(&quot;divide: Impartire la zero&quot; + e);
Line 96:       }
Line 97:      }
Line 98:     public int mod(int a, int b) {
Line 99:       try {
Line 100:        return a%b;
Line 101:      } catch (Exception e) {
Line 102:        throw new Exception(&quot;mod: Impartire la zero&quot; + e);
Line 103:      }
Line 104:    }
Line 105:    public int intPow(int a, int b) {
Line 106:      int p=1;
Line 107:      try {
Line 108:        for (int i=1; i&lt;= b; i++, p *= a);
Line 109:        return p;
Line 110:      } catch (Exception e) {
Line 111:        throw new Exception(&quot;intPow: depasire&quot; + e);
Line 112:      }
Line 113:    }
Line 114:    public String toFpp(String infix) {
Line 115:      infix = infix.Trim();
Line 116:      int i, p, varf =-1;
Line 117:      char c, u;
Line 118:      String s, d, r;
Line 119:      String postfix = &quot;&quot;;
Line 120:      String eval = &quot;&quot;;
Line 121:      String apeluri = &quot;&quot;;
Line 122:      String operatori = &quot;+-*/%^&quot;;
Line 123:      String priority = &quot;112223&quot;;
Line 124:      String albe = &quot; \t\n\r&quot;;
Line 125:      String alfabet = &quot;0123456789&quot;+operatori+albe+&quot;()&quot;;
Line 126:      ArrayList stiva = new ArrayList();
Line 127:      ArrayList operanzi = new ArrayList();
Line 128:      StringBuilder sb = new StringBuilder(infix);
Line 129:      for ( i=sb.Length-1; i&gt;=0; i--) {
Line 130:        c = sb[i];
Line 131:        if (alfabet.IndexOf(c) == -1) return infix+&quot;\nERROR caracter interzis!\n&quot;;
Line 132:        if (albe.IndexOf(c) &gt;= 0) sb.Remove(i, 1);
Line 133:        if (i &lt; sb.Length-1) u = sb[i+1]; else u = ' ';
Line 134:        if (c == '(')
Line 135:          if (u == '+')
Line 136:            sb.Remove(i+1, 1);
Line 137:          else if (u == '-')
Line 138:            sb.Insert(i+1, '0');
Line 139:      } // Control alfabet, sters toate spatiile albe, rezolvat + si - unar
Line 140:      if (sb.Length &gt; 0)
Line 141:        if (sb[0] == '+')
Line 142:          sb.Remove(0, 1);
Line 143:        else if (sb[0] == '-')
Line 144:          sb.Insert(0, '0');
Line 145:      for ( ; sb.Length &gt;0; ) {
Line 146:        c = sb[0];
Line 147:        i = operatori.IndexOf(c);
Line 148:        if (char.IsDigit(c)) { // operand
Line 149:          for ( i=0; i &lt; sb.Length &amp;&amp; char.IsDigit(sb[i]); i++) ;
Line 150:          postfix += &quot;#&quot;+sb.ToString().Substring(0,i)+&quot;|&quot;;
Line 151:          eval += &quot;#&quot;;
Line 152:          sb.Remove(0,i-1);
Line 153:        } else if (i != -1) { // operatori
Line 154:          for ( ; ; ) {
Line 155:            if (varf &lt; 0) break;
Line 156:            p = operatori.IndexOf(stiva[varf].ToString());
Line 157:            if (p &lt; 0 || priority[p] &lt; priority[i]) break;
Line 158:            p = eval.Length;
Line 159:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 160:            postfix += stiva[varf];
Line 161:            eval = eval.Substring(0, p-1);
Line 162:            stiva.RemoveAt(varf);
Line 163:            varf--;
Line 164:          }
Line 165:          stiva.Add(c);
Line 166:          varf++;
Line 167:        } else if (c == '(') { // pune ( in stiva
Line 168:          stiva.Add(c);
Line 169:          varf++;
Line 170:        } else if (c == ')') { // extrage din stiva pana la ( si genereaza corespunzator
Line 171:          for ( ;  ;  ) {
Line 172:            if (varf &lt; 0) return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 173:            c = (char)stiva[varf];
Line 174:            stiva.RemoveAt(varf);
Line 175:            varf--;
Line 176:            if (c == '(') break;
Line 177:            p = eval.Length;
Line 178:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 179:            postfix += c;
Line 180:            eval = eval.Substring(0, p-1);
Line 181:          }
Line 182:        }
Line 183:        sb.Remove(0, 1);
Line 184:      }
Line 185:      for ( ; varf &gt;= 0;  ) { // golestre stiva de ultimii operatori si genereaza
Line 186:        if ((char)stiva[varf] == '(') return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 187:        p = eval.Length;
Line 188:        if (p &lt; 2) return infix+&quot;ERROR operatori fara operanzi\n&quot;;
Line 189:        eval = eval.Substring(0, p-1);
Line 190:        postfix += stiva[varf];
Line 191:        stiva.RemoveAt(varf);
Line 192:        varf--;
Line 193:      }
Line 194:      if (eval.Length != 1) return infix+&quot;\nERROR prea multi operanzi\n&quot;;
Line 195:      sb = new StringBuilder(postfix);
Line 196:      p = 0;
Line 197:      for ( ; sb.Length &gt;0; ) { // construieste succesiunea de apeluri
Line 198:        c = sb[0];
Line 199:        if (c == '#') {
Line 200:          i = sb.ToString().IndexOf(&quot;|&quot;);
Line 201:          operanzi.Add(&quot;\&quot;&quot;+sb.ToString().Substring(1,i-1)+&quot;\&quot;&quot;);
Line 202:          sb.Remove(0,i+1);
Line 203:        } else {
Line 204:          sb.Remove(0, 1);
Line 205:          varf = operanzi.Count-1;
Line 206:          d = (String)operanzi[varf];
Line 207:          s = (String)operanzi[varf-1];
Line 208:          if (s[0] == '\&quot;' &amp;&amp; d[0] == '\&quot;') r = &quot;&quot;+(p++);
Line 209:          else if (s[0] == '\&quot;') r = d;
Line 210:          else r = s;
Line 211:          operanzi[varf-1] = r;
Line 212:          operanzi.RemoveAt(varf);
Line 213:          apeluri += r+&quot;=&quot;+s+c+d+&quot;\n&quot;;
Line 214:        }
Line 215:      }
Line 216:      apeluri += operanzi[0]+&quot;\n&quot;;
Line 217:      return apeluri+postfix+&quot;\n&quot;+infix;
Line 218:    } 
Line 219:  }
Line 220:  
Line 221:  
Line 222:  #line default
Line 223:  #line hidden
Line 224:  </pre></code>



                  </td>

               </tr>

            </table>



            



</div>



    <script type="text/javascript">

    function OnToggleTOCLevel1(level2ID)

    {

      var elemLevel2 = document.getElementById(level2ID);

      if (elemLevel2.style.display == 'none')

      {

        elemLevel2.style.display = '';

      }

      else {

        elemLevel2.style.display = 'none';

      }

    }

    </script>

                          <br><br>



            <hr width=100% size=1 color=silver>



            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3614



            </font>



    </body>

</html>

<!-- 

[HttpCompileException]: \\172.30.0.5\iis\~florin\ServiceRs.ashx(125): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

   at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.UI.SimpleHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)

   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)

   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

--><!-- 

This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using &lt;customErrors mode="Off"/&gt;. Consider using &lt;customErrors mode="On"/&gt; or &lt;customErrors mode="RemoteOnly"/&gt; in production environments.-->
Serv0:	add: 	7 + 2 = <html>

    <head>

        <title>Compilation Error</title>

        <style>

         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 

         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}

         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}

         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }

         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }

         pre {font-family:"Lucida Console";font-size: .9em}

         .marker {font-weight: bold; color: black;text-decoration: none;}

         .version {color: gray;}

         .error {margin-bottom: 10px;}

         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

        </style>

    </head>



    <body bgcolor="white">



            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>



            <h2> <i>Compilation Error</i> </h2></span>



            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">



            <b> Description: </b>An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

            <br><br>



            <b> Compiler Error Message: </b>CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)<br><br>

<b>Source Error:</b><br><br>

            <table width=100% bgcolor="#ffffcc">

               <tr><td>

                              </td></tr>

               <tr>

                  <td>

                      <code><pre>



Line 123:    ArrayList stiva = new ArrayList();

Line 124:    ArrayList operanzi = new ArrayList();

<font color=red>Line 125:    StringBuilder sb = new StringBuilder(infix);

</font>Line 126:    for ( i=sb.Length-1; i&gt;=0; i--) {

Line 127:      c = sb[i];</pre></code>



                  </td>

               </tr>

            </table>



            <br>



            <b>Source File:</b> \\172.30.0.5\iis\~florin\ServiceRs.ashx

            &nbsp;&nbsp; <b>Line:</b>  125

            <br><br>

<br><div class="expandable" onclick="OnToggleTOCLevel1('compilerOutputDiv')">Show Detailed Compiler Output:</div>

<div id="compilerOutputDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



C:\WINDOWS\SysWOW64\inetsrv&gt; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe&quot; /t:library /utf8output /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll&quot; /R:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\MySql.Data\5.2.5.0__c5687fc88969c44d\MySql.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll&quot; /out:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.dll&quot; /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701  &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.0.cs&quot; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.1.cs&quot;





Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.3053

for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727

Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.



\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,5): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,28): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(127,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(130,32): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(138,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(140,16): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(143,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(146,50): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(192,14): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(195,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

</pre></code>



                  </td>

               </tr>

            </table>



            



</div>

<br><div class="expandable" onclick="OnToggleTOCLevel1('dynamicCodeDiv')">Show Complete Compilation Source:</div>

<div id="dynamicCodeDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



Line 1:    #pragma checksum &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot; &quot;{406ea660-64cf-4c82-b6f0-42d48172a799}&quot; &quot;1CFD175703181AB6B3BAC827D91F8797&quot;
Line 2:    
Line 3:    #line 1 &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot;
Line 4:    
Line 5:    using System;
Line 6:    using System.Net;
Line 7:    using System.Web;
Line 8:    using System.Collections;
Line 9:    using System.Collections.Specialized;
Line 10:   using System.IO;
Line 11:   public class ServiceRs : IHttpHandler {
Line 12:     public bool IsReusable { get { return false; } }
Line 13:     public void ProcessRequest(HttpContext ctx) {
Line 14:       String[] apel = {&quot;/ping&quot;, &quot;/add/&quot;, &quot;/subtract/&quot;, &quot;/multiply/&quot;, &quot;/divide/&quot;, &quot;/mod/&quot;, &quot;/intPow/&quot;, &quot;/toFpp&quot;}; 
Line 15:       String url = ctx.Request.RawUrl.ToString().ToLower();
Line 16:       int i=0, p=-1, a=0, b=0;
Line 17:       for (i=0; i&lt;apel.Length; i++) {
Line 18:         p = url.IndexOf(apel[i]);
Line 19:         if (p &gt; 0) break;
Line 20:       }
Line 21:       switch (i) {
Line 22:         case 0: 
Line 23:           if (ctx.Request.HttpMethod != &quot;GET&quot;) break;
Line 24:           ctx.Response.Write(ping()); 
Line 25:           break;
Line 26:         case 1: 
Line 27:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 28:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 29:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 30:           ctx.Response.Write(add(a, b).ToString() + &quot; method DELETE&quot;);
Line 31:           break;
Line 32:         case 2: 
Line 33:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 34:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 35:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 36:           ctx.Response.Write(subtract(a, b).ToString() + &quot; method DELETE&quot;);
Line 37:           break;
Line 38:         case 3: 
Line 39:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 40:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 41:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 42:           ctx.Response.Write(multiply(a, b).ToString() + &quot; method DELETE&quot;);
Line 43:           break;
Line 44:         case 4: 
Line 45:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 46:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 47:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 48:           ctx.Response.Write(divide(a, b).ToString() + &quot; method DELETE&quot;);
Line 49:           break;
Line 50:         case 5: 
Line 51:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 52:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 53:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 54:           ctx.Response.Write(mod(a, b).ToString() + &quot; method DELETE&quot;);
Line 55:           break;
Line 56:         case 6: 
Line 57:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 58:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 59:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 60:           ctx.Response.Write(intPow(a, b).ToString() + &quot; method DELETE&quot;);
Line 61:           break;
Line 62:         case 7:
Line 63:           if (ctx.Request.HttpMethod != &quot;POST&quot;) break;
Line 64:           Stream body = ctx.Request.InputStream;
Line 65:           a = Convert.ToInt32(body.Length);
Line 66:           byte[] bBody = new byte[a];
Line 67:           body.Read(bBody, 0, a);
Line 68:           String infix = System.Text.Encoding.ASCII.GetString(bBody);
Line 69:           ctx.Response.Write(toFpp(infix).ToString() + &quot; method PUT&quot;); 
Line 70:           break;
Line 71:        default: break;
Line 72:       }
Line 73:     }
Line 74:     private static String tip = &quot;RESTful&quot;;
Line 75:     private static String pathServ = &quot;Service.ashx&quot;;
Line 76:     private static int port = 80;
Line 77:     public static String ping() {
Line 78:      String host = Dns.GetHostName();
Line 79:       return &quot;C# &quot; + tip + &quot; &quot; + pathServ + &quot;: &quot;+host +
Line 80:         &quot; (&quot; + Dns.GetHostAddresses(host)[0] + &quot;:&quot; + port + &quot;) &quot; + DateTime.Now;
Line 81:     }
Line 82:     public int add(int a, int b) {
Line 83:       return a+b;
Line 84:     }
Line 85:     public int subtract(int a, int b) {
Line 86:       return a-b;
Line 87:     }
Line 88:     public int multiply(int a, int b) {
Line 89:       return a*b;
Line 90:     }
Line 91:     public int divide(int a, int b) {
Line 92:      try {
Line 93:         return a/b;
Line 94:       } catch (Exception e) {
Line 95:         throw new Exception(&quot;divide: Impartire la zero&quot; + e);
Line 96:       }
Line 97:      }
Line 98:     public int mod(int a, int b) {
Line 99:       try {
Line 100:        return a%b;
Line 101:      } catch (Exception e) {
Line 102:        throw new Exception(&quot;mod: Impartire la zero&quot; + e);
Line 103:      }
Line 104:    }
Line 105:    public int intPow(int a, int b) {
Line 106:      int p=1;
Line 107:      try {
Line 108:        for (int i=1; i&lt;= b; i++, p *= a);
Line 109:        return p;
Line 110:      } catch (Exception e) {
Line 111:        throw new Exception(&quot;intPow: depasire&quot; + e);
Line 112:      }
Line 113:    }
Line 114:    public String toFpp(String infix) {
Line 115:      infix = infix.Trim();
Line 116:      int i, p, varf =-1;
Line 117:      char c, u;
Line 118:      String s, d, r;
Line 119:      String postfix = &quot;&quot;;
Line 120:      String eval = &quot;&quot;;
Line 121:      String apeluri = &quot;&quot;;
Line 122:      String operatori = &quot;+-*/%^&quot;;
Line 123:      String priority = &quot;112223&quot;;
Line 124:      String albe = &quot; \t\n\r&quot;;
Line 125:      String alfabet = &quot;0123456789&quot;+operatori+albe+&quot;()&quot;;
Line 126:      ArrayList stiva = new ArrayList();
Line 127:      ArrayList operanzi = new ArrayList();
Line 128:      StringBuilder sb = new StringBuilder(infix);
Line 129:      for ( i=sb.Length-1; i&gt;=0; i--) {
Line 130:        c = sb[i];
Line 131:        if (alfabet.IndexOf(c) == -1) return infix+&quot;\nERROR caracter interzis!\n&quot;;
Line 132:        if (albe.IndexOf(c) &gt;= 0) sb.Remove(i, 1);
Line 133:        if (i &lt; sb.Length-1) u = sb[i+1]; else u = ' ';
Line 134:        if (c == '(')
Line 135:          if (u == '+')
Line 136:            sb.Remove(i+1, 1);
Line 137:          else if (u == '-')
Line 138:            sb.Insert(i+1, '0');
Line 139:      } // Control alfabet, sters toate spatiile albe, rezolvat + si - unar
Line 140:      if (sb.Length &gt; 0)
Line 141:        if (sb[0] == '+')
Line 142:          sb.Remove(0, 1);
Line 143:        else if (sb[0] == '-')
Line 144:          sb.Insert(0, '0');
Line 145:      for ( ; sb.Length &gt;0; ) {
Line 146:        c = sb[0];
Line 147:        i = operatori.IndexOf(c);
Line 148:        if (char.IsDigit(c)) { // operand
Line 149:          for ( i=0; i &lt; sb.Length &amp;&amp; char.IsDigit(sb[i]); i++) ;
Line 150:          postfix += &quot;#&quot;+sb.ToString().Substring(0,i)+&quot;|&quot;;
Line 151:          eval += &quot;#&quot;;
Line 152:          sb.Remove(0,i-1);
Line 153:        } else if (i != -1) { // operatori
Line 154:          for ( ; ; ) {
Line 155:            if (varf &lt; 0) break;
Line 156:            p = operatori.IndexOf(stiva[varf].ToString());
Line 157:            if (p &lt; 0 || priority[p] &lt; priority[i]) break;
Line 158:            p = eval.Length;
Line 159:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 160:            postfix += stiva[varf];
Line 161:            eval = eval.Substring(0, p-1);
Line 162:            stiva.RemoveAt(varf);
Line 163:            varf--;
Line 164:          }
Line 165:          stiva.Add(c);
Line 166:          varf++;
Line 167:        } else if (c == '(') { // pune ( in stiva
Line 168:          stiva.Add(c);
Line 169:          varf++;
Line 170:        } else if (c == ')') { // extrage din stiva pana la ( si genereaza corespunzator
Line 171:          for ( ;  ;  ) {
Line 172:            if (varf &lt; 0) return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 173:            c = (char)stiva[varf];
Line 174:            stiva.RemoveAt(varf);
Line 175:            varf--;
Line 176:            if (c == '(') break;
Line 177:            p = eval.Length;
Line 178:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 179:            postfix += c;
Line 180:            eval = eval.Substring(0, p-1);
Line 181:          }
Line 182:        }
Line 183:        sb.Remove(0, 1);
Line 184:      }
Line 185:      for ( ; varf &gt;= 0;  ) { // golestre stiva de ultimii operatori si genereaza
Line 186:        if ((char)stiva[varf] == '(') return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 187:        p = eval.Length;
Line 188:        if (p &lt; 2) return infix+&quot;ERROR operatori fara operanzi\n&quot;;
Line 189:        eval = eval.Substring(0, p-1);
Line 190:        postfix += stiva[varf];
Line 191:        stiva.RemoveAt(varf);
Line 192:        varf--;
Line 193:      }
Line 194:      if (eval.Length != 1) return infix+&quot;\nERROR prea multi operanzi\n&quot;;
Line 195:      sb = new StringBuilder(postfix);
Line 196:      p = 0;
Line 197:      for ( ; sb.Length &gt;0; ) { // construieste succesiunea de apeluri
Line 198:        c = sb[0];
Line 199:        if (c == '#') {
Line 200:          i = sb.ToString().IndexOf(&quot;|&quot;);
Line 201:          operanzi.Add(&quot;\&quot;&quot;+sb.ToString().Substring(1,i-1)+&quot;\&quot;&quot;);
Line 202:          sb.Remove(0,i+1);
Line 203:        } else {
Line 204:          sb.Remove(0, 1);
Line 205:          varf = operanzi.Count-1;
Line 206:          d = (String)operanzi[varf];
Line 207:          s = (String)operanzi[varf-1];
Line 208:          if (s[0] == '\&quot;' &amp;&amp; d[0] == '\&quot;') r = &quot;&quot;+(p++);
Line 209:          else if (s[0] == '\&quot;') r = d;
Line 210:          else r = s;
Line 211:          operanzi[varf-1] = r;
Line 212:          operanzi.RemoveAt(varf);
Line 213:          apeluri += r+&quot;=&quot;+s+c+d+&quot;\n&quot;;
Line 214:        }
Line 215:      }
Line 216:      apeluri += operanzi[0]+&quot;\n&quot;;
Line 217:      return apeluri+postfix+&quot;\n&quot;+infix;
Line 218:    } 
Line 219:  }
Line 220:  
Line 221:  
Line 222:  #line default
Line 223:  #line hidden
Line 224:  </pre></code>



                  </td>

               </tr>

            </table>



            



</div>



    <script type="text/javascript">

    function OnToggleTOCLevel1(level2ID)

    {

      var elemLevel2 = document.getElementById(level2ID);

      if (elemLevel2.style.display == 'none')

      {

        elemLevel2.style.display = '';

      }

      else {

        elemLevel2.style.display = 'none';

      }

    }

    </script>

                          <br><br>



            <hr width=100% size=1 color=silver>



            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3614



            </font>



    </body>

</html>

<!-- 

[HttpCompileException]: \\172.30.0.5\iis\~florin\ServiceRs.ashx(125): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

   at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.UI.SimpleHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)

   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)

   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

--><!-- 

This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using &lt;customErrors mode="Off"/&gt;. Consider using &lt;customErrors mode="On"/&gt; or &lt;customErrors mode="RemoteOnly"/&gt; in production environments.-->
Serv0:	subtract: 	7 - 2 = <html>

    <head>

        <title>Compilation Error</title>

        <style>

         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 

         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}

         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}

         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }

         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }

         pre {font-family:"Lucida Console";font-size: .9em}

         .marker {font-weight: bold; color: black;text-decoration: none;}

         .version {color: gray;}

         .error {margin-bottom: 10px;}

         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

        </style>

    </head>



    <body bgcolor="white">



            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>



            <h2> <i>Compilation Error</i> </h2></span>



            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">



            <b> Description: </b>An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

            <br><br>



            <b> Compiler Error Message: </b>CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)<br><br>

<b>Source Error:</b><br><br>

            <table width=100% bgcolor="#ffffcc">

               <tr><td>

                              </td></tr>

               <tr>

                  <td>

                      <code><pre>



Line 123:    ArrayList stiva = new ArrayList();

Line 124:    ArrayList operanzi = new ArrayList();

<font color=red>Line 125:    StringBuilder sb = new StringBuilder(infix);

</font>Line 126:    for ( i=sb.Length-1; i&gt;=0; i--) {

Line 127:      c = sb[i];</pre></code>



                  </td>

               </tr>

            </table>



            <br>



            <b>Source File:</b> \\172.30.0.5\iis\~florin\ServiceRs.ashx

            &nbsp;&nbsp; <b>Line:</b>  125

            <br><br>

<br><div class="expandable" onclick="OnToggleTOCLevel1('compilerOutputDiv')">Show Detailed Compiler Output:</div>

<div id="compilerOutputDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



C:\WINDOWS\SysWOW64\inetsrv&gt; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe&quot; /t:library /utf8output /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll&quot; /R:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\MySql.Data\5.2.5.0__c5687fc88969c44d\MySql.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll&quot; /out:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.dll&quot; /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701  &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.0.cs&quot; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.1.cs&quot;





Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.3053

for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727

Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.



\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,5): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,28): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(127,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(130,32): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(138,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(140,16): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(143,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(146,50): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(192,14): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(195,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

</pre></code>



                  </td>

               </tr>

            </table>



            



</div>

<br><div class="expandable" onclick="OnToggleTOCLevel1('dynamicCodeDiv')">Show Complete Compilation Source:</div>

<div id="dynamicCodeDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



Line 1:    #pragma checksum &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot; &quot;{406ea660-64cf-4c82-b6f0-42d48172a799}&quot; &quot;1CFD175703181AB6B3BAC827D91F8797&quot;
Line 2:    
Line 3:    #line 1 &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot;
Line 4:    
Line 5:    using System;
Line 6:    using System.Net;
Line 7:    using System.Web;
Line 8:    using System.Collections;
Line 9:    using System.Collections.Specialized;
Line 10:   using System.IO;
Line 11:   public class ServiceRs : IHttpHandler {
Line 12:     public bool IsReusable { get { return false; } }
Line 13:     public void ProcessRequest(HttpContext ctx) {
Line 14:       String[] apel = {&quot;/ping&quot;, &quot;/add/&quot;, &quot;/subtract/&quot;, &quot;/multiply/&quot;, &quot;/divide/&quot;, &quot;/mod/&quot;, &quot;/intPow/&quot;, &quot;/toFpp&quot;}; 
Line 15:       String url = ctx.Request.RawUrl.ToString().ToLower();
Line 16:       int i=0, p=-1, a=0, b=0;
Line 17:       for (i=0; i&lt;apel.Length; i++) {
Line 18:         p = url.IndexOf(apel[i]);
Line 19:         if (p &gt; 0) break;
Line 20:       }
Line 21:       switch (i) {
Line 22:         case 0: 
Line 23:           if (ctx.Request.HttpMethod != &quot;GET&quot;) break;
Line 24:           ctx.Response.Write(ping()); 
Line 25:           break;
Line 26:         case 1: 
Line 27:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 28:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 29:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 30:           ctx.Response.Write(add(a, b).ToString() + &quot; method DELETE&quot;);
Line 31:           break;
Line 32:         case 2: 
Line 33:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 34:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 35:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 36:           ctx.Response.Write(subtract(a, b).ToString() + &quot; method DELETE&quot;);
Line 37:           break;
Line 38:         case 3: 
Line 39:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 40:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 41:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 42:           ctx.Response.Write(multiply(a, b).ToString() + &quot; method DELETE&quot;);
Line 43:           break;
Line 44:         case 4: 
Line 45:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 46:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 47:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 48:           ctx.Response.Write(divide(a, b).ToString() + &quot; method DELETE&quot;);
Line 49:           break;
Line 50:         case 5: 
Line 51:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 52:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 53:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 54:           ctx.Response.Write(mod(a, b).ToString() + &quot; method DELETE&quot;);
Line 55:           break;
Line 56:         case 6: 
Line 57:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 58:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 59:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 60:           ctx.Response.Write(intPow(a, b).ToString() + &quot; method DELETE&quot;);
Line 61:           break;
Line 62:         case 7:
Line 63:           if (ctx.Request.HttpMethod != &quot;POST&quot;) break;
Line 64:           Stream body = ctx.Request.InputStream;
Line 65:           a = Convert.ToInt32(body.Length);
Line 66:           byte[] bBody = new byte[a];
Line 67:           body.Read(bBody, 0, a);
Line 68:           String infix = System.Text.Encoding.ASCII.GetString(bBody);
Line 69:           ctx.Response.Write(toFpp(infix).ToString() + &quot; method PUT&quot;); 
Line 70:           break;
Line 71:        default: break;
Line 72:       }
Line 73:     }
Line 74:     private static String tip = &quot;RESTful&quot;;
Line 75:     private static String pathServ = &quot;Service.ashx&quot;;
Line 76:     private static int port = 80;
Line 77:     public static String ping() {
Line 78:      String host = Dns.GetHostName();
Line 79:       return &quot;C# &quot; + tip + &quot; &quot; + pathServ + &quot;: &quot;+host +
Line 80:         &quot; (&quot; + Dns.GetHostAddresses(host)[0] + &quot;:&quot; + port + &quot;) &quot; + DateTime.Now;
Line 81:     }
Line 82:     public int add(int a, int b) {
Line 83:       return a+b;
Line 84:     }
Line 85:     public int subtract(int a, int b) {
Line 86:       return a-b;
Line 87:     }
Line 88:     public int multiply(int a, int b) {
Line 89:       return a*b;
Line 90:     }
Line 91:     public int divide(int a, int b) {
Line 92:      try {
Line 93:         return a/b;
Line 94:       } catch (Exception e) {
Line 95:         throw new Exception(&quot;divide: Impartire la zero&quot; + e);
Line 96:       }
Line 97:      }
Line 98:     public int mod(int a, int b) {
Line 99:       try {
Line 100:        return a%b;
Line 101:      } catch (Exception e) {
Line 102:        throw new Exception(&quot;mod: Impartire la zero&quot; + e);
Line 103:      }
Line 104:    }
Line 105:    public int intPow(int a, int b) {
Line 106:      int p=1;
Line 107:      try {
Line 108:        for (int i=1; i&lt;= b; i++, p *= a);
Line 109:        return p;
Line 110:      } catch (Exception e) {
Line 111:        throw new Exception(&quot;intPow: depasire&quot; + e);
Line 112:      }
Line 113:    }
Line 114:    public String toFpp(String infix) {
Line 115:      infix = infix.Trim();
Line 116:      int i, p, varf =-1;
Line 117:      char c, u;
Line 118:      String s, d, r;
Line 119:      String postfix = &quot;&quot;;
Line 120:      String eval = &quot;&quot;;
Line 121:      String apeluri = &quot;&quot;;
Line 122:      String operatori = &quot;+-*/%^&quot;;
Line 123:      String priority = &quot;112223&quot;;
Line 124:      String albe = &quot; \t\n\r&quot;;
Line 125:      String alfabet = &quot;0123456789&quot;+operatori+albe+&quot;()&quot;;
Line 126:      ArrayList stiva = new ArrayList();
Line 127:      ArrayList operanzi = new ArrayList();
Line 128:      StringBuilder sb = new StringBuilder(infix);
Line 129:      for ( i=sb.Length-1; i&gt;=0; i--) {
Line 130:        c = sb[i];
Line 131:        if (alfabet.IndexOf(c) == -1) return infix+&quot;\nERROR caracter interzis!\n&quot;;
Line 132:        if (albe.IndexOf(c) &gt;= 0) sb.Remove(i, 1);
Line 133:        if (i &lt; sb.Length-1) u = sb[i+1]; else u = ' ';
Line 134:        if (c == '(')
Line 135:          if (u == '+')
Line 136:            sb.Remove(i+1, 1);
Line 137:          else if (u == '-')
Line 138:            sb.Insert(i+1, '0');
Line 139:      } // Control alfabet, sters toate spatiile albe, rezolvat + si - unar
Line 140:      if (sb.Length &gt; 0)
Line 141:        if (sb[0] == '+')
Line 142:          sb.Remove(0, 1);
Line 143:        else if (sb[0] == '-')
Line 144:          sb.Insert(0, '0');
Line 145:      for ( ; sb.Length &gt;0; ) {
Line 146:        c = sb[0];
Line 147:        i = operatori.IndexOf(c);
Line 148:        if (char.IsDigit(c)) { // operand
Line 149:          for ( i=0; i &lt; sb.Length &amp;&amp; char.IsDigit(sb[i]); i++) ;
Line 150:          postfix += &quot;#&quot;+sb.ToString().Substring(0,i)+&quot;|&quot;;
Line 151:          eval += &quot;#&quot;;
Line 152:          sb.Remove(0,i-1);
Line 153:        } else if (i != -1) { // operatori
Line 154:          for ( ; ; ) {
Line 155:            if (varf &lt; 0) break;
Line 156:            p = operatori.IndexOf(stiva[varf].ToString());
Line 157:            if (p &lt; 0 || priority[p] &lt; priority[i]) break;
Line 158:            p = eval.Length;
Line 159:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 160:            postfix += stiva[varf];
Line 161:            eval = eval.Substring(0, p-1);
Line 162:            stiva.RemoveAt(varf);
Line 163:            varf--;
Line 164:          }
Line 165:          stiva.Add(c);
Line 166:          varf++;
Line 167:        } else if (c == '(') { // pune ( in stiva
Line 168:          stiva.Add(c);
Line 169:          varf++;
Line 170:        } else if (c == ')') { // extrage din stiva pana la ( si genereaza corespunzator
Line 171:          for ( ;  ;  ) {
Line 172:            if (varf &lt; 0) return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 173:            c = (char)stiva[varf];
Line 174:            stiva.RemoveAt(varf);
Line 175:            varf--;
Line 176:            if (c == '(') break;
Line 177:            p = eval.Length;
Line 178:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 179:            postfix += c;
Line 180:            eval = eval.Substring(0, p-1);
Line 181:          }
Line 182:        }
Line 183:        sb.Remove(0, 1);
Line 184:      }
Line 185:      for ( ; varf &gt;= 0;  ) { // golestre stiva de ultimii operatori si genereaza
Line 186:        if ((char)stiva[varf] == '(') return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 187:        p = eval.Length;
Line 188:        if (p &lt; 2) return infix+&quot;ERROR operatori fara operanzi\n&quot;;
Line 189:        eval = eval.Substring(0, p-1);
Line 190:        postfix += stiva[varf];
Line 191:        stiva.RemoveAt(varf);
Line 192:        varf--;
Line 193:      }
Line 194:      if (eval.Length != 1) return infix+&quot;\nERROR prea multi operanzi\n&quot;;
Line 195:      sb = new StringBuilder(postfix);
Line 196:      p = 0;
Line 197:      for ( ; sb.Length &gt;0; ) { // construieste succesiunea de apeluri
Line 198:        c = sb[0];
Line 199:        if (c == '#') {
Line 200:          i = sb.ToString().IndexOf(&quot;|&quot;);
Line 201:          operanzi.Add(&quot;\&quot;&quot;+sb.ToString().Substring(1,i-1)+&quot;\&quot;&quot;);
Line 202:          sb.Remove(0,i+1);
Line 203:        } else {
Line 204:          sb.Remove(0, 1);
Line 205:          varf = operanzi.Count-1;
Line 206:          d = (String)operanzi[varf];
Line 207:          s = (String)operanzi[varf-1];
Line 208:          if (s[0] == '\&quot;' &amp;&amp; d[0] == '\&quot;') r = &quot;&quot;+(p++);
Line 209:          else if (s[0] == '\&quot;') r = d;
Line 210:          else r = s;
Line 211:          operanzi[varf-1] = r;
Line 212:          operanzi.RemoveAt(varf);
Line 213:          apeluri += r+&quot;=&quot;+s+c+d+&quot;\n&quot;;
Line 214:        }
Line 215:      }
Line 216:      apeluri += operanzi[0]+&quot;\n&quot;;
Line 217:      return apeluri+postfix+&quot;\n&quot;+infix;
Line 218:    } 
Line 219:  }
Line 220:  
Line 221:  
Line 222:  #line default
Line 223:  #line hidden
Line 224:  </pre></code>



                  </td>

               </tr>

            </table>



            



</div>



    <script type="text/javascript">

    function OnToggleTOCLevel1(level2ID)

    {

      var elemLevel2 = document.getElementById(level2ID);

      if (elemLevel2.style.display == 'none')

      {

        elemLevel2.style.display = '';

      }

      else {

        elemLevel2.style.display = 'none';

      }

    }

    </script>

                          <br><br>



            <hr width=100% size=1 color=silver>



            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3614



            </font>



    </body>

</html>

<!-- 

[HttpCompileException]: \\172.30.0.5\iis\~florin\ServiceRs.ashx(125): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

   at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.UI.SimpleHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)

   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)

   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

--><!-- 

This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using &lt;customErrors mode="Off"/&gt;. Consider using &lt;customErrors mode="On"/&gt; or &lt;customErrors mode="RemoteOnly"/&gt; in production environments.-->
Serv0:	multiply: 	7 * 2 = <html>

    <head>

        <title>Compilation Error</title>

        <style>

         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 

         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}

         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}

         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }

         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }

         pre {font-family:"Lucida Console";font-size: .9em}

         .marker {font-weight: bold; color: black;text-decoration: none;}

         .version {color: gray;}

         .error {margin-bottom: 10px;}

         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

        </style>

    </head>



    <body bgcolor="white">



            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>



            <h2> <i>Compilation Error</i> </h2></span>



            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">



            <b> Description: </b>An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

            <br><br>



            <b> Compiler Error Message: </b>CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)<br><br>

<b>Source Error:</b><br><br>

            <table width=100% bgcolor="#ffffcc">

               <tr><td>

                              </td></tr>

               <tr>

                  <td>

                      <code><pre>



Line 123:    ArrayList stiva = new ArrayList();

Line 124:    ArrayList operanzi = new ArrayList();

<font color=red>Line 125:    StringBuilder sb = new StringBuilder(infix);

</font>Line 126:    for ( i=sb.Length-1; i&gt;=0; i--) {

Line 127:      c = sb[i];</pre></code>



                  </td>

               </tr>

            </table>



            <br>



            <b>Source File:</b> \\172.30.0.5\iis\~florin\ServiceRs.ashx

            &nbsp;&nbsp; <b>Line:</b>  125

            <br><br>

<br><div class="expandable" onclick="OnToggleTOCLevel1('compilerOutputDiv')">Show Detailed Compiler Output:</div>

<div id="compilerOutputDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



C:\WINDOWS\SysWOW64\inetsrv&gt; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe&quot; /t:library /utf8output /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll&quot; /R:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\MySql.Data\5.2.5.0__c5687fc88969c44d\MySql.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll&quot; /out:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.dll&quot; /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701  &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.0.cs&quot; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.1.cs&quot;





Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.3053

for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727

Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.



\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,5): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,28): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(127,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(130,32): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(138,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(140,16): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(143,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(146,50): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(192,14): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(195,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

</pre></code>



                  </td>

               </tr>

            </table>



            



</div>

<br><div class="expandable" onclick="OnToggleTOCLevel1('dynamicCodeDiv')">Show Complete Compilation Source:</div>

<div id="dynamicCodeDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



Line 1:    #pragma checksum &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot; &quot;{406ea660-64cf-4c82-b6f0-42d48172a799}&quot; &quot;1CFD175703181AB6B3BAC827D91F8797&quot;
Line 2:    
Line 3:    #line 1 &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot;
Line 4:    
Line 5:    using System;
Line 6:    using System.Net;
Line 7:    using System.Web;
Line 8:    using System.Collections;
Line 9:    using System.Collections.Specialized;
Line 10:   using System.IO;
Line 11:   public class ServiceRs : IHttpHandler {
Line 12:     public bool IsReusable { get { return false; } }
Line 13:     public void ProcessRequest(HttpContext ctx) {
Line 14:       String[] apel = {&quot;/ping&quot;, &quot;/add/&quot;, &quot;/subtract/&quot;, &quot;/multiply/&quot;, &quot;/divide/&quot;, &quot;/mod/&quot;, &quot;/intPow/&quot;, &quot;/toFpp&quot;}; 
Line 15:       String url = ctx.Request.RawUrl.ToString().ToLower();
Line 16:       int i=0, p=-1, a=0, b=0;
Line 17:       for (i=0; i&lt;apel.Length; i++) {
Line 18:         p = url.IndexOf(apel[i]);
Line 19:         if (p &gt; 0) break;
Line 20:       }
Line 21:       switch (i) {
Line 22:         case 0: 
Line 23:           if (ctx.Request.HttpMethod != &quot;GET&quot;) break;
Line 24:           ctx.Response.Write(ping()); 
Line 25:           break;
Line 26:         case 1: 
Line 27:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 28:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 29:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 30:           ctx.Response.Write(add(a, b).ToString() + &quot; method DELETE&quot;);
Line 31:           break;
Line 32:         case 2: 
Line 33:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 34:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 35:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 36:           ctx.Response.Write(subtract(a, b).ToString() + &quot; method DELETE&quot;);
Line 37:           break;
Line 38:         case 3: 
Line 39:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 40:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 41:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 42:           ctx.Response.Write(multiply(a, b).ToString() + &quot; method DELETE&quot;);
Line 43:           break;
Line 44:         case 4: 
Line 45:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 46:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 47:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 48:           ctx.Response.Write(divide(a, b).ToString() + &quot; method DELETE&quot;);
Line 49:           break;
Line 50:         case 5: 
Line 51:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 52:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 53:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 54:           ctx.Response.Write(mod(a, b).ToString() + &quot; method DELETE&quot;);
Line 55:           break;
Line 56:         case 6: 
Line 57:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 58:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 59:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 60:           ctx.Response.Write(intPow(a, b).ToString() + &quot; method DELETE&quot;);
Line 61:           break;
Line 62:         case 7:
Line 63:           if (ctx.Request.HttpMethod != &quot;POST&quot;) break;
Line 64:           Stream body = ctx.Request.InputStream;
Line 65:           a = Convert.ToInt32(body.Length);
Line 66:           byte[] bBody = new byte[a];
Line 67:           body.Read(bBody, 0, a);
Line 68:           String infix = System.Text.Encoding.ASCII.GetString(bBody);
Line 69:           ctx.Response.Write(toFpp(infix).ToString() + &quot; method PUT&quot;); 
Line 70:           break;
Line 71:        default: break;
Line 72:       }
Line 73:     }
Line 74:     private static String tip = &quot;RESTful&quot;;
Line 75:     private static String pathServ = &quot;Service.ashx&quot;;
Line 76:     private static int port = 80;
Line 77:     public static String ping() {
Line 78:      String host = Dns.GetHostName();
Line 79:       return &quot;C# &quot; + tip + &quot; &quot; + pathServ + &quot;: &quot;+host +
Line 80:         &quot; (&quot; + Dns.GetHostAddresses(host)[0] + &quot;:&quot; + port + &quot;) &quot; + DateTime.Now;
Line 81:     }
Line 82:     public int add(int a, int b) {
Line 83:       return a+b;
Line 84:     }
Line 85:     public int subtract(int a, int b) {
Line 86:       return a-b;
Line 87:     }
Line 88:     public int multiply(int a, int b) {
Line 89:       return a*b;
Line 90:     }
Line 91:     public int divide(int a, int b) {
Line 92:      try {
Line 93:         return a/b;
Line 94:       } catch (Exception e) {
Line 95:         throw new Exception(&quot;divide: Impartire la zero&quot; + e);
Line 96:       }
Line 97:      }
Line 98:     public int mod(int a, int b) {
Line 99:       try {
Line 100:        return a%b;
Line 101:      } catch (Exception e) {
Line 102:        throw new Exception(&quot;mod: Impartire la zero&quot; + e);
Line 103:      }
Line 104:    }
Line 105:    public int intPow(int a, int b) {
Line 106:      int p=1;
Line 107:      try {
Line 108:        for (int i=1; i&lt;= b; i++, p *= a);
Line 109:        return p;
Line 110:      } catch (Exception e) {
Line 111:        throw new Exception(&quot;intPow: depasire&quot; + e);
Line 112:      }
Line 113:    }
Line 114:    public String toFpp(String infix) {
Line 115:      infix = infix.Trim();
Line 116:      int i, p, varf =-1;
Line 117:      char c, u;
Line 118:      String s, d, r;
Line 119:      String postfix = &quot;&quot;;
Line 120:      String eval = &quot;&quot;;
Line 121:      String apeluri = &quot;&quot;;
Line 122:      String operatori = &quot;+-*/%^&quot;;
Line 123:      String priority = &quot;112223&quot;;
Line 124:      String albe = &quot; \t\n\r&quot;;
Line 125:      String alfabet = &quot;0123456789&quot;+operatori+albe+&quot;()&quot;;
Line 126:      ArrayList stiva = new ArrayList();
Line 127:      ArrayList operanzi = new ArrayList();
Line 128:      StringBuilder sb = new StringBuilder(infix);
Line 129:      for ( i=sb.Length-1; i&gt;=0; i--) {
Line 130:        c = sb[i];
Line 131:        if (alfabet.IndexOf(c) == -1) return infix+&quot;\nERROR caracter interzis!\n&quot;;
Line 132:        if (albe.IndexOf(c) &gt;= 0) sb.Remove(i, 1);
Line 133:        if (i &lt; sb.Length-1) u = sb[i+1]; else u = ' ';
Line 134:        if (c == '(')
Line 135:          if (u == '+')
Line 136:            sb.Remove(i+1, 1);
Line 137:          else if (u == '-')
Line 138:            sb.Insert(i+1, '0');
Line 139:      } // Control alfabet, sters toate spatiile albe, rezolvat + si - unar
Line 140:      if (sb.Length &gt; 0)
Line 141:        if (sb[0] == '+')
Line 142:          sb.Remove(0, 1);
Line 143:        else if (sb[0] == '-')
Line 144:          sb.Insert(0, '0');
Line 145:      for ( ; sb.Length &gt;0; ) {
Line 146:        c = sb[0];
Line 147:        i = operatori.IndexOf(c);
Line 148:        if (char.IsDigit(c)) { // operand
Line 149:          for ( i=0; i &lt; sb.Length &amp;&amp; char.IsDigit(sb[i]); i++) ;
Line 150:          postfix += &quot;#&quot;+sb.ToString().Substring(0,i)+&quot;|&quot;;
Line 151:          eval += &quot;#&quot;;
Line 152:          sb.Remove(0,i-1);
Line 153:        } else if (i != -1) { // operatori
Line 154:          for ( ; ; ) {
Line 155:            if (varf &lt; 0) break;
Line 156:            p = operatori.IndexOf(stiva[varf].ToString());
Line 157:            if (p &lt; 0 || priority[p] &lt; priority[i]) break;
Line 158:            p = eval.Length;
Line 159:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 160:            postfix += stiva[varf];
Line 161:            eval = eval.Substring(0, p-1);
Line 162:            stiva.RemoveAt(varf);
Line 163:            varf--;
Line 164:          }
Line 165:          stiva.Add(c);
Line 166:          varf++;
Line 167:        } else if (c == '(') { // pune ( in stiva
Line 168:          stiva.Add(c);
Line 169:          varf++;
Line 170:        } else if (c == ')') { // extrage din stiva pana la ( si genereaza corespunzator
Line 171:          for ( ;  ;  ) {
Line 172:            if (varf &lt; 0) return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 173:            c = (char)stiva[varf];
Line 174:            stiva.RemoveAt(varf);
Line 175:            varf--;
Line 176:            if (c == '(') break;
Line 177:            p = eval.Length;
Line 178:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 179:            postfix += c;
Line 180:            eval = eval.Substring(0, p-1);
Line 181:          }
Line 182:        }
Line 183:        sb.Remove(0, 1);
Line 184:      }
Line 185:      for ( ; varf &gt;= 0;  ) { // golestre stiva de ultimii operatori si genereaza
Line 186:        if ((char)stiva[varf] == '(') return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 187:        p = eval.Length;
Line 188:        if (p &lt; 2) return infix+&quot;ERROR operatori fara operanzi\n&quot;;
Line 189:        eval = eval.Substring(0, p-1);
Line 190:        postfix += stiva[varf];
Line 191:        stiva.RemoveAt(varf);
Line 192:        varf--;
Line 193:      }
Line 194:      if (eval.Length != 1) return infix+&quot;\nERROR prea multi operanzi\n&quot;;
Line 195:      sb = new StringBuilder(postfix);
Line 196:      p = 0;
Line 197:      for ( ; sb.Length &gt;0; ) { // construieste succesiunea de apeluri
Line 198:        c = sb[0];
Line 199:        if (c == '#') {
Line 200:          i = sb.ToString().IndexOf(&quot;|&quot;);
Line 201:          operanzi.Add(&quot;\&quot;&quot;+sb.ToString().Substring(1,i-1)+&quot;\&quot;&quot;);
Line 202:          sb.Remove(0,i+1);
Line 203:        } else {
Line 204:          sb.Remove(0, 1);
Line 205:          varf = operanzi.Count-1;
Line 206:          d = (String)operanzi[varf];
Line 207:          s = (String)operanzi[varf-1];
Line 208:          if (s[0] == '\&quot;' &amp;&amp; d[0] == '\&quot;') r = &quot;&quot;+(p++);
Line 209:          else if (s[0] == '\&quot;') r = d;
Line 210:          else r = s;
Line 211:          operanzi[varf-1] = r;
Line 212:          operanzi.RemoveAt(varf);
Line 213:          apeluri += r+&quot;=&quot;+s+c+d+&quot;\n&quot;;
Line 214:        }
Line 215:      }
Line 216:      apeluri += operanzi[0]+&quot;\n&quot;;
Line 217:      return apeluri+postfix+&quot;\n&quot;+infix;
Line 218:    } 
Line 219:  }
Line 220:  
Line 221:  
Line 222:  #line default
Line 223:  #line hidden
Line 224:  </pre></code>



                  </td>

               </tr>

            </table>



            



</div>



    <script type="text/javascript">

    function OnToggleTOCLevel1(level2ID)

    {

      var elemLevel2 = document.getElementById(level2ID);

      if (elemLevel2.style.display == 'none')

      {

        elemLevel2.style.display = '';

      }

      else {

        elemLevel2.style.display = 'none';

      }

    }

    </script>

                          <br><br>



            <hr width=100% size=1 color=silver>



            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3614



            </font>



    </body>

</html>

<!-- 

[HttpCompileException]: \\172.30.0.5\iis\~florin\ServiceRs.ashx(125): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

   at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.UI.SimpleHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)

   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)

   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

--><!-- 

This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using &lt;customErrors mode="Off"/&gt;. Consider using &lt;customErrors mode="On"/&gt; or &lt;customErrors mode="RemoteOnly"/&gt; in production environments.-->
Serv0:	intPow: 	7 ^ 2 = <html>

    <head>

        <title>Compilation Error</title>

        <style>

         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 

         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}

         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}

         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }

         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }

         pre {font-family:"Lucida Console";font-size: .9em}

         .marker {font-weight: bold; color: black;text-decoration: none;}

         .version {color: gray;}

         .error {margin-bottom: 10px;}

         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

        </style>

    </head>



    <body bgcolor="white">



            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>



            <h2> <i>Compilation Error</i> </h2></span>



            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">



            <b> Description: </b>An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

            <br><br>



            <b> Compiler Error Message: </b>CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)<br><br>

<b>Source Error:</b><br><br>

            <table width=100% bgcolor="#ffffcc">

               <tr><td>

                              </td></tr>

               <tr>

                  <td>

                      <code><pre>



Line 123:    ArrayList stiva = new ArrayList();

Line 124:    ArrayList operanzi = new ArrayList();

<font color=red>Line 125:    StringBuilder sb = new StringBuilder(infix);

</font>Line 126:    for ( i=sb.Length-1; i&gt;=0; i--) {

Line 127:      c = sb[i];</pre></code>



                  </td>

               </tr>

            </table>



            <br>



            <b>Source File:</b> \\172.30.0.5\iis\~florin\ServiceRs.ashx

            &nbsp;&nbsp; <b>Line:</b>  125

            <br><br>

<br><div class="expandable" onclick="OnToggleTOCLevel1('compilerOutputDiv')">Show Detailed Compiler Output:</div>

<div id="compilerOutputDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



C:\WINDOWS\SysWOW64\inetsrv&gt; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe&quot; /t:library /utf8output /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll&quot; /R:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\MySql.Data\5.2.5.0__c5687fc88969c44d\MySql.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll&quot; /out:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.dll&quot; /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701  &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.0.cs&quot; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.1.cs&quot;





Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.3053

for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727

Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.



\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,5): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,28): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(127,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(130,32): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(138,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(140,16): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(143,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(146,50): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(192,14): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(195,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

</pre></code>



                  </td>

               </tr>

            </table>



            



</div>

<br><div class="expandable" onclick="OnToggleTOCLevel1('dynamicCodeDiv')">Show Complete Compilation Source:</div>

<div id="dynamicCodeDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



Line 1:    #pragma checksum &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot; &quot;{406ea660-64cf-4c82-b6f0-42d48172a799}&quot; &quot;1CFD175703181AB6B3BAC827D91F8797&quot;
Line 2:    
Line 3:    #line 1 &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot;
Line 4:    
Line 5:    using System;
Line 6:    using System.Net;
Line 7:    using System.Web;
Line 8:    using System.Collections;
Line 9:    using System.Collections.Specialized;
Line 10:   using System.IO;
Line 11:   public class ServiceRs : IHttpHandler {
Line 12:     public bool IsReusable { get { return false; } }
Line 13:     public void ProcessRequest(HttpContext ctx) {
Line 14:       String[] apel = {&quot;/ping&quot;, &quot;/add/&quot;, &quot;/subtract/&quot;, &quot;/multiply/&quot;, &quot;/divide/&quot;, &quot;/mod/&quot;, &quot;/intPow/&quot;, &quot;/toFpp&quot;}; 
Line 15:       String url = ctx.Request.RawUrl.ToString().ToLower();
Line 16:       int i=0, p=-1, a=0, b=0;
Line 17:       for (i=0; i&lt;apel.Length; i++) {
Line 18:         p = url.IndexOf(apel[i]);
Line 19:         if (p &gt; 0) break;
Line 20:       }
Line 21:       switch (i) {
Line 22:         case 0: 
Line 23:           if (ctx.Request.HttpMethod != &quot;GET&quot;) break;
Line 24:           ctx.Response.Write(ping()); 
Line 25:           break;
Line 26:         case 1: 
Line 27:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 28:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 29:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 30:           ctx.Response.Write(add(a, b).ToString() + &quot; method DELETE&quot;);
Line 31:           break;
Line 32:         case 2: 
Line 33:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 34:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 35:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 36:           ctx.Response.Write(subtract(a, b).ToString() + &quot; method DELETE&quot;);
Line 37:           break;
Line 38:         case 3: 
Line 39:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 40:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 41:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 42:           ctx.Response.Write(multiply(a, b).ToString() + &quot; method DELETE&quot;);
Line 43:           break;
Line 44:         case 4: 
Line 45:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 46:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 47:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 48:           ctx.Response.Write(divide(a, b).ToString() + &quot; method DELETE&quot;);
Line 49:           break;
Line 50:         case 5: 
Line 51:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 52:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 53:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 54:           ctx.Response.Write(mod(a, b).ToString() + &quot; method DELETE&quot;);
Line 55:           break;
Line 56:         case 6: 
Line 57:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 58:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 59:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 60:           ctx.Response.Write(intPow(a, b).ToString() + &quot; method DELETE&quot;);
Line 61:           break;
Line 62:         case 7:
Line 63:           if (ctx.Request.HttpMethod != &quot;POST&quot;) break;
Line 64:           Stream body = ctx.Request.InputStream;
Line 65:           a = Convert.ToInt32(body.Length);
Line 66:           byte[] bBody = new byte[a];
Line 67:           body.Read(bBody, 0, a);
Line 68:           String infix = System.Text.Encoding.ASCII.GetString(bBody);
Line 69:           ctx.Response.Write(toFpp(infix).ToString() + &quot; method PUT&quot;); 
Line 70:           break;
Line 71:        default: break;
Line 72:       }
Line 73:     }
Line 74:     private static String tip = &quot;RESTful&quot;;
Line 75:     private static String pathServ = &quot;Service.ashx&quot;;
Line 76:     private static int port = 80;
Line 77:     public static String ping() {
Line 78:      String host = Dns.GetHostName();
Line 79:       return &quot;C# &quot; + tip + &quot; &quot; + pathServ + &quot;: &quot;+host +
Line 80:         &quot; (&quot; + Dns.GetHostAddresses(host)[0] + &quot;:&quot; + port + &quot;) &quot; + DateTime.Now;
Line 81:     }
Line 82:     public int add(int a, int b) {
Line 83:       return a+b;
Line 84:     }
Line 85:     public int subtract(int a, int b) {
Line 86:       return a-b;
Line 87:     }
Line 88:     public int multiply(int a, int b) {
Line 89:       return a*b;
Line 90:     }
Line 91:     public int divide(int a, int b) {
Line 92:      try {
Line 93:         return a/b;
Line 94:       } catch (Exception e) {
Line 95:         throw new Exception(&quot;divide: Impartire la zero&quot; + e);
Line 96:       }
Line 97:      }
Line 98:     public int mod(int a, int b) {
Line 99:       try {
Line 100:        return a%b;
Line 101:      } catch (Exception e) {
Line 102:        throw new Exception(&quot;mod: Impartire la zero&quot; + e);
Line 103:      }
Line 104:    }
Line 105:    public int intPow(int a, int b) {
Line 106:      int p=1;
Line 107:      try {
Line 108:        for (int i=1; i&lt;= b; i++, p *= a);
Line 109:        return p;
Line 110:      } catch (Exception e) {
Line 111:        throw new Exception(&quot;intPow: depasire&quot; + e);
Line 112:      }
Line 113:    }
Line 114:    public String toFpp(String infix) {
Line 115:      infix = infix.Trim();
Line 116:      int i, p, varf =-1;
Line 117:      char c, u;
Line 118:      String s, d, r;
Line 119:      String postfix = &quot;&quot;;
Line 120:      String eval = &quot;&quot;;
Line 121:      String apeluri = &quot;&quot;;
Line 122:      String operatori = &quot;+-*/%^&quot;;
Line 123:      String priority = &quot;112223&quot;;
Line 124:      String albe = &quot; \t\n\r&quot;;
Line 125:      String alfabet = &quot;0123456789&quot;+operatori+albe+&quot;()&quot;;
Line 126:      ArrayList stiva = new ArrayList();
Line 127:      ArrayList operanzi = new ArrayList();
Line 128:      StringBuilder sb = new StringBuilder(infix);
Line 129:      for ( i=sb.Length-1; i&gt;=0; i--) {
Line 130:        c = sb[i];
Line 131:        if (alfabet.IndexOf(c) == -1) return infix+&quot;\nERROR caracter interzis!\n&quot;;
Line 132:        if (albe.IndexOf(c) &gt;= 0) sb.Remove(i, 1);
Line 133:        if (i &lt; sb.Length-1) u = sb[i+1]; else u = ' ';
Line 134:        if (c == '(')
Line 135:          if (u == '+')
Line 136:            sb.Remove(i+1, 1);
Line 137:          else if (u == '-')
Line 138:            sb.Insert(i+1, '0');
Line 139:      } // Control alfabet, sters toate spatiile albe, rezolvat + si - unar
Line 140:      if (sb.Length &gt; 0)
Line 141:        if (sb[0] == '+')
Line 142:          sb.Remove(0, 1);
Line 143:        else if (sb[0] == '-')
Line 144:          sb.Insert(0, '0');
Line 145:      for ( ; sb.Length &gt;0; ) {
Line 146:        c = sb[0];
Line 147:        i = operatori.IndexOf(c);
Line 148:        if (char.IsDigit(c)) { // operand
Line 149:          for ( i=0; i &lt; sb.Length &amp;&amp; char.IsDigit(sb[i]); i++) ;
Line 150:          postfix += &quot;#&quot;+sb.ToString().Substring(0,i)+&quot;|&quot;;
Line 151:          eval += &quot;#&quot;;
Line 152:          sb.Remove(0,i-1);
Line 153:        } else if (i != -1) { // operatori
Line 154:          for ( ; ; ) {
Line 155:            if (varf &lt; 0) break;
Line 156:            p = operatori.IndexOf(stiva[varf].ToString());
Line 157:            if (p &lt; 0 || priority[p] &lt; priority[i]) break;
Line 158:            p = eval.Length;
Line 159:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 160:            postfix += stiva[varf];
Line 161:            eval = eval.Substring(0, p-1);
Line 162:            stiva.RemoveAt(varf);
Line 163:            varf--;
Line 164:          }
Line 165:          stiva.Add(c);
Line 166:          varf++;
Line 167:        } else if (c == '(') { // pune ( in stiva
Line 168:          stiva.Add(c);
Line 169:          varf++;
Line 170:        } else if (c == ')') { // extrage din stiva pana la ( si genereaza corespunzator
Line 171:          for ( ;  ;  ) {
Line 172:            if (varf &lt; 0) return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 173:            c = (char)stiva[varf];
Line 174:            stiva.RemoveAt(varf);
Line 175:            varf--;
Line 176:            if (c == '(') break;
Line 177:            p = eval.Length;
Line 178:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 179:            postfix += c;
Line 180:            eval = eval.Substring(0, p-1);
Line 181:          }
Line 182:        }
Line 183:        sb.Remove(0, 1);
Line 184:      }
Line 185:      for ( ; varf &gt;= 0;  ) { // golestre stiva de ultimii operatori si genereaza
Line 186:        if ((char)stiva[varf] == '(') return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 187:        p = eval.Length;
Line 188:        if (p &lt; 2) return infix+&quot;ERROR operatori fara operanzi\n&quot;;
Line 189:        eval = eval.Substring(0, p-1);
Line 190:        postfix += stiva[varf];
Line 191:        stiva.RemoveAt(varf);
Line 192:        varf--;
Line 193:      }
Line 194:      if (eval.Length != 1) return infix+&quot;\nERROR prea multi operanzi\n&quot;;
Line 195:      sb = new StringBuilder(postfix);
Line 196:      p = 0;
Line 197:      for ( ; sb.Length &gt;0; ) { // construieste succesiunea de apeluri
Line 198:        c = sb[0];
Line 199:        if (c == '#') {
Line 200:          i = sb.ToString().IndexOf(&quot;|&quot;);
Line 201:          operanzi.Add(&quot;\&quot;&quot;+sb.ToString().Substring(1,i-1)+&quot;\&quot;&quot;);
Line 202:          sb.Remove(0,i+1);
Line 203:        } else {
Line 204:          sb.Remove(0, 1);
Line 205:          varf = operanzi.Count-1;
Line 206:          d = (String)operanzi[varf];
Line 207:          s = (String)operanzi[varf-1];
Line 208:          if (s[0] == '\&quot;' &amp;&amp; d[0] == '\&quot;') r = &quot;&quot;+(p++);
Line 209:          else if (s[0] == '\&quot;') r = d;
Line 210:          else r = s;
Line 211:          operanzi[varf-1] = r;
Line 212:          operanzi.RemoveAt(varf);
Line 213:          apeluri += r+&quot;=&quot;+s+c+d+&quot;\n&quot;;
Line 214:        }
Line 215:      }
Line 216:      apeluri += operanzi[0]+&quot;\n&quot;;
Line 217:      return apeluri+postfix+&quot;\n&quot;+infix;
Line 218:    } 
Line 219:  }
Line 220:  
Line 221:  
Line 222:  #line default
Line 223:  #line hidden
Line 224:  </pre></code>



                  </td>

               </tr>

            </table>



            



</div>



    <script type="text/javascript">

    function OnToggleTOCLevel1(level2ID)

    {

      var elemLevel2 = document.getElementById(level2ID);

      if (elemLevel2.style.display == 'none')

      {

        elemLevel2.style.display = '';

      }

      else {

        elemLevel2.style.display = 'none';

      }

    }

    </script>

                          <br><br>



            <hr width=100% size=1 color=silver>



            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3614



            </font>



    </body>

</html>

<!-- 

[HttpCompileException]: \\172.30.0.5\iis\~florin\ServiceRs.ashx(125): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

   at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.UI.SimpleHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)

   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)

   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

--><!-- 

This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using &lt;customErrors mode="Off"/&gt;. Consider using &lt;customErrors mode="On"/&gt; or &lt;customErrors mode="RemoteOnly"/&gt; in production environments.-->
Serv0:	mod: 	7 % 2 = <html>

    <head>

        <title>Compilation Error</title>

        <style>

         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 

         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}

         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}

         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }

         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }

         pre {font-family:"Lucida Console";font-size: .9em}

         .marker {font-weight: bold; color: black;text-decoration: none;}

         .version {color: gray;}

         .error {margin-bottom: 10px;}

         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

        </style>

    </head>



    <body bgcolor="white">



            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>



            <h2> <i>Compilation Error</i> </h2></span>



            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">



            <b> Description: </b>An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

            <br><br>



            <b> Compiler Error Message: </b>CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)<br><br>

<b>Source Error:</b><br><br>

            <table width=100% bgcolor="#ffffcc">

               <tr><td>

                              </td></tr>

               <tr>

                  <td>

                      <code><pre>



Line 123:    ArrayList stiva = new ArrayList();

Line 124:    ArrayList operanzi = new ArrayList();

<font color=red>Line 125:    StringBuilder sb = new StringBuilder(infix);

</font>Line 126:    for ( i=sb.Length-1; i&gt;=0; i--) {

Line 127:      c = sb[i];</pre></code>



                  </td>

               </tr>

            </table>



            <br>



            <b>Source File:</b> \\172.30.0.5\iis\~florin\ServiceRs.ashx

            &nbsp;&nbsp; <b>Line:</b>  125

            <br><br>

<br><div class="expandable" onclick="OnToggleTOCLevel1('compilerOutputDiv')">Show Detailed Compiler Output:</div>

<div id="compilerOutputDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



C:\WINDOWS\SysWOW64\inetsrv&gt; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe&quot; /t:library /utf8output /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll&quot; /R:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\MySql.Data\5.2.5.0__c5687fc88969c44d\MySql.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll&quot; /out:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.dll&quot; /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701  &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.0.cs&quot; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.1.cs&quot;





Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.3053

for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727

Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.



\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,5): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,28): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(127,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(130,32): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(138,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(140,16): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(143,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(146,50): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(192,14): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(195,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

</pre></code>



                  </td>

               </tr>

            </table>



            



</div>

<br><div class="expandable" onclick="OnToggleTOCLevel1('dynamicCodeDiv')">Show Complete Compilation Source:</div>

<div id="dynamicCodeDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



Line 1:    #pragma checksum &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot; &quot;{406ea660-64cf-4c82-b6f0-42d48172a799}&quot; &quot;1CFD175703181AB6B3BAC827D91F8797&quot;
Line 2:    
Line 3:    #line 1 &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot;
Line 4:    
Line 5:    using System;
Line 6:    using System.Net;
Line 7:    using System.Web;
Line 8:    using System.Collections;
Line 9:    using System.Collections.Specialized;
Line 10:   using System.IO;
Line 11:   public class ServiceRs : IHttpHandler {
Line 12:     public bool IsReusable { get { return false; } }
Line 13:     public void ProcessRequest(HttpContext ctx) {
Line 14:       String[] apel = {&quot;/ping&quot;, &quot;/add/&quot;, &quot;/subtract/&quot;, &quot;/multiply/&quot;, &quot;/divide/&quot;, &quot;/mod/&quot;, &quot;/intPow/&quot;, &quot;/toFpp&quot;}; 
Line 15:       String url = ctx.Request.RawUrl.ToString().ToLower();
Line 16:       int i=0, p=-1, a=0, b=0;
Line 17:       for (i=0; i&lt;apel.Length; i++) {
Line 18:         p = url.IndexOf(apel[i]);
Line 19:         if (p &gt; 0) break;
Line 20:       }
Line 21:       switch (i) {
Line 22:         case 0: 
Line 23:           if (ctx.Request.HttpMethod != &quot;GET&quot;) break;
Line 24:           ctx.Response.Write(ping()); 
Line 25:           break;
Line 26:         case 1: 
Line 27:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 28:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 29:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 30:           ctx.Response.Write(add(a, b).ToString() + &quot; method DELETE&quot;);
Line 31:           break;
Line 32:         case 2: 
Line 33:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 34:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 35:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 36:           ctx.Response.Write(subtract(a, b).ToString() + &quot; method DELETE&quot;);
Line 37:           break;
Line 38:         case 3: 
Line 39:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 40:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 41:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 42:           ctx.Response.Write(multiply(a, b).ToString() + &quot; method DELETE&quot;);
Line 43:           break;
Line 44:         case 4: 
Line 45:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 46:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 47:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 48:           ctx.Response.Write(divide(a, b).ToString() + &quot; method DELETE&quot;);
Line 49:           break;
Line 50:         case 5: 
Line 51:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 52:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 53:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 54:           ctx.Response.Write(mod(a, b).ToString() + &quot; method DELETE&quot;);
Line 55:           break;
Line 56:         case 6: 
Line 57:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 58:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 59:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 60:           ctx.Response.Write(intPow(a, b).ToString() + &quot; method DELETE&quot;);
Line 61:           break;
Line 62:         case 7:
Line 63:           if (ctx.Request.HttpMethod != &quot;POST&quot;) break;
Line 64:           Stream body = ctx.Request.InputStream;
Line 65:           a = Convert.ToInt32(body.Length);
Line 66:           byte[] bBody = new byte[a];
Line 67:           body.Read(bBody, 0, a);
Line 68:           String infix = System.Text.Encoding.ASCII.GetString(bBody);
Line 69:           ctx.Response.Write(toFpp(infix).ToString() + &quot; method PUT&quot;); 
Line 70:           break;
Line 71:        default: break;
Line 72:       }
Line 73:     }
Line 74:     private static String tip = &quot;RESTful&quot;;
Line 75:     private static String pathServ = &quot;Service.ashx&quot;;
Line 76:     private static int port = 80;
Line 77:     public static String ping() {
Line 78:      String host = Dns.GetHostName();
Line 79:       return &quot;C# &quot; + tip + &quot; &quot; + pathServ + &quot;: &quot;+host +
Line 80:         &quot; (&quot; + Dns.GetHostAddresses(host)[0] + &quot;:&quot; + port + &quot;) &quot; + DateTime.Now;
Line 81:     }
Line 82:     public int add(int a, int b) {
Line 83:       return a+b;
Line 84:     }
Line 85:     public int subtract(int a, int b) {
Line 86:       return a-b;
Line 87:     }
Line 88:     public int multiply(int a, int b) {
Line 89:       return a*b;
Line 90:     }
Line 91:     public int divide(int a, int b) {
Line 92:      try {
Line 93:         return a/b;
Line 94:       } catch (Exception e) {
Line 95:         throw new Exception(&quot;divide: Impartire la zero&quot; + e);
Line 96:       }
Line 97:      }
Line 98:     public int mod(int a, int b) {
Line 99:       try {
Line 100:        return a%b;
Line 101:      } catch (Exception e) {
Line 102:        throw new Exception(&quot;mod: Impartire la zero&quot; + e);
Line 103:      }
Line 104:    }
Line 105:    public int intPow(int a, int b) {
Line 106:      int p=1;
Line 107:      try {
Line 108:        for (int i=1; i&lt;= b; i++, p *= a);
Line 109:        return p;
Line 110:      } catch (Exception e) {
Line 111:        throw new Exception(&quot;intPow: depasire&quot; + e);
Line 112:      }
Line 113:    }
Line 114:    public String toFpp(String infix) {
Line 115:      infix = infix.Trim();
Line 116:      int i, p, varf =-1;
Line 117:      char c, u;
Line 118:      String s, d, r;
Line 119:      String postfix = &quot;&quot;;
Line 120:      String eval = &quot;&quot;;
Line 121:      String apeluri = &quot;&quot;;
Line 122:      String operatori = &quot;+-*/%^&quot;;
Line 123:      String priority = &quot;112223&quot;;
Line 124:      String albe = &quot; \t\n\r&quot;;
Line 125:      String alfabet = &quot;0123456789&quot;+operatori+albe+&quot;()&quot;;
Line 126:      ArrayList stiva = new ArrayList();
Line 127:      ArrayList operanzi = new ArrayList();
Line 128:      StringBuilder sb = new StringBuilder(infix);
Line 129:      for ( i=sb.Length-1; i&gt;=0; i--) {
Line 130:        c = sb[i];
Line 131:        if (alfabet.IndexOf(c) == -1) return infix+&quot;\nERROR caracter interzis!\n&quot;;
Line 132:        if (albe.IndexOf(c) &gt;= 0) sb.Remove(i, 1);
Line 133:        if (i &lt; sb.Length-1) u = sb[i+1]; else u = ' ';
Line 134:        if (c == '(')
Line 135:          if (u == '+')
Line 136:            sb.Remove(i+1, 1);
Line 137:          else if (u == '-')
Line 138:            sb.Insert(i+1, '0');
Line 139:      } // Control alfabet, sters toate spatiile albe, rezolvat + si - unar
Line 140:      if (sb.Length &gt; 0)
Line 141:        if (sb[0] == '+')
Line 142:          sb.Remove(0, 1);
Line 143:        else if (sb[0] == '-')
Line 144:          sb.Insert(0, '0');
Line 145:      for ( ; sb.Length &gt;0; ) {
Line 146:        c = sb[0];
Line 147:        i = operatori.IndexOf(c);
Line 148:        if (char.IsDigit(c)) { // operand
Line 149:          for ( i=0; i &lt; sb.Length &amp;&amp; char.IsDigit(sb[i]); i++) ;
Line 150:          postfix += &quot;#&quot;+sb.ToString().Substring(0,i)+&quot;|&quot;;
Line 151:          eval += &quot;#&quot;;
Line 152:          sb.Remove(0,i-1);
Line 153:        } else if (i != -1) { // operatori
Line 154:          for ( ; ; ) {
Line 155:            if (varf &lt; 0) break;
Line 156:            p = operatori.IndexOf(stiva[varf].ToString());
Line 157:            if (p &lt; 0 || priority[p] &lt; priority[i]) break;
Line 158:            p = eval.Length;
Line 159:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 160:            postfix += stiva[varf];
Line 161:            eval = eval.Substring(0, p-1);
Line 162:            stiva.RemoveAt(varf);
Line 163:            varf--;
Line 164:          }
Line 165:          stiva.Add(c);
Line 166:          varf++;
Line 167:        } else if (c == '(') { // pune ( in stiva
Line 168:          stiva.Add(c);
Line 169:          varf++;
Line 170:        } else if (c == ')') { // extrage din stiva pana la ( si genereaza corespunzator
Line 171:          for ( ;  ;  ) {
Line 172:            if (varf &lt; 0) return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 173:            c = (char)stiva[varf];
Line 174:            stiva.RemoveAt(varf);
Line 175:            varf--;
Line 176:            if (c == '(') break;
Line 177:            p = eval.Length;
Line 178:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 179:            postfix += c;
Line 180:            eval = eval.Substring(0, p-1);
Line 181:          }
Line 182:        }
Line 183:        sb.Remove(0, 1);
Line 184:      }
Line 185:      for ( ; varf &gt;= 0;  ) { // golestre stiva de ultimii operatori si genereaza
Line 186:        if ((char)stiva[varf] == '(') return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 187:        p = eval.Length;
Line 188:        if (p &lt; 2) return infix+&quot;ERROR operatori fara operanzi\n&quot;;
Line 189:        eval = eval.Substring(0, p-1);
Line 190:        postfix += stiva[varf];
Line 191:        stiva.RemoveAt(varf);
Line 192:        varf--;
Line 193:      }
Line 194:      if (eval.Length != 1) return infix+&quot;\nERROR prea multi operanzi\n&quot;;
Line 195:      sb = new StringBuilder(postfix);
Line 196:      p = 0;
Line 197:      for ( ; sb.Length &gt;0; ) { // construieste succesiunea de apeluri
Line 198:        c = sb[0];
Line 199:        if (c == '#') {
Line 200:          i = sb.ToString().IndexOf(&quot;|&quot;);
Line 201:          operanzi.Add(&quot;\&quot;&quot;+sb.ToString().Substring(1,i-1)+&quot;\&quot;&quot;);
Line 202:          sb.Remove(0,i+1);
Line 203:        } else {
Line 204:          sb.Remove(0, 1);
Line 205:          varf = operanzi.Count-1;
Line 206:          d = (String)operanzi[varf];
Line 207:          s = (String)operanzi[varf-1];
Line 208:          if (s[0] == '\&quot;' &amp;&amp; d[0] == '\&quot;') r = &quot;&quot;+(p++);
Line 209:          else if (s[0] == '\&quot;') r = d;
Line 210:          else r = s;
Line 211:          operanzi[varf-1] = r;
Line 212:          operanzi.RemoveAt(varf);
Line 213:          apeluri += r+&quot;=&quot;+s+c+d+&quot;\n&quot;;
Line 214:        }
Line 215:      }
Line 216:      apeluri += operanzi[0]+&quot;\n&quot;;
Line 217:      return apeluri+postfix+&quot;\n&quot;+infix;
Line 218:    } 
Line 219:  }
Line 220:  
Line 221:  
Line 222:  #line default
Line 223:  #line hidden
Line 224:  </pre></code>



                  </td>

               </tr>

            </table>



            



</div>



    <script type="text/javascript">

    function OnToggleTOCLevel1(level2ID)

    {

      var elemLevel2 = document.getElementById(level2ID);

      if (elemLevel2.style.display == 'none')

      {

        elemLevel2.style.display = '';

      }

      else {

        elemLevel2.style.display = 'none';

      }

    }

    </script>

                          <br><br>



            <hr width=100% size=1 color=silver>



            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3614



            </font>



    </body>

</html>

<!-- 

[HttpCompileException]: \\172.30.0.5\iis\~florin\ServiceRs.ashx(125): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

   at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.UI.SimpleHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)

   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)

   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

--><!-- 

This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using &lt;customErrors mode="Off"/&gt;. Consider using &lt;customErrors mode="On"/&gt; or &lt;customErrors mode="RemoteOnly"/&gt; in production environments.-->
Serv0:	divide: 	7 / 0 = <html>

    <head>

        <title>Compilation Error</title>

        <style>

         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 

         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}

         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}

         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }

         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }

         pre {font-family:"Lucida Console";font-size: .9em}

         .marker {font-weight: bold; color: black;text-decoration: none;}

         .version {color: gray;}

         .error {margin-bottom: 10px;}

         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

        </style>

    </head>



    <body bgcolor="white">



            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>



            <h2> <i>Compilation Error</i> </h2></span>



            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">



            <b> Description: </b>An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

            <br><br>



            <b> Compiler Error Message: </b>CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)<br><br>

<b>Source Error:</b><br><br>

            <table width=100% bgcolor="#ffffcc">

               <tr><td>

                              </td></tr>

               <tr>

                  <td>

                      <code><pre>



Line 123:    ArrayList stiva = new ArrayList();

Line 124:    ArrayList operanzi = new ArrayList();

<font color=red>Line 125:    StringBuilder sb = new StringBuilder(infix);

</font>Line 126:    for ( i=sb.Length-1; i&gt;=0; i--) {

Line 127:      c = sb[i];</pre></code>



                  </td>

               </tr>

            </table>



            <br>



            <b>Source File:</b> \\172.30.0.5\iis\~florin\ServiceRs.ashx

            &nbsp;&nbsp; <b>Line:</b>  125

            <br><br>

<br><div class="expandable" onclick="OnToggleTOCLevel1('compilerOutputDiv')">Show Detailed Compiler Output:</div>

<div id="compilerOutputDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



C:\WINDOWS\SysWOW64\inetsrv&gt; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe&quot; /t:library /utf8output /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll&quot; /R:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\MySql.Data\5.2.5.0__c5687fc88969c44d\MySql.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll&quot; /out:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.dll&quot; /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701  &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.0.cs&quot; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.1.cs&quot;





Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.3053

for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727

Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.



\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,5): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,28): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(127,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(130,32): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(138,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(140,16): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(143,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(146,50): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(192,14): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(195,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

</pre></code>



                  </td>

               </tr>

            </table>



            



</div>

<br><div class="expandable" onclick="OnToggleTOCLevel1('dynamicCodeDiv')">Show Complete Compilation Source:</div>

<div id="dynamicCodeDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



Line 1:    #pragma checksum &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot; &quot;{406ea660-64cf-4c82-b6f0-42d48172a799}&quot; &quot;1CFD175703181AB6B3BAC827D91F8797&quot;
Line 2:    
Line 3:    #line 1 &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot;
Line 4:    
Line 5:    using System;
Line 6:    using System.Net;
Line 7:    using System.Web;
Line 8:    using System.Collections;
Line 9:    using System.Collections.Specialized;
Line 10:   using System.IO;
Line 11:   public class ServiceRs : IHttpHandler {
Line 12:     public bool IsReusable { get { return false; } }
Line 13:     public void ProcessRequest(HttpContext ctx) {
Line 14:       String[] apel = {&quot;/ping&quot;, &quot;/add/&quot;, &quot;/subtract/&quot;, &quot;/multiply/&quot;, &quot;/divide/&quot;, &quot;/mod/&quot;, &quot;/intPow/&quot;, &quot;/toFpp&quot;}; 
Line 15:       String url = ctx.Request.RawUrl.ToString().ToLower();
Line 16:       int i=0, p=-1, a=0, b=0;
Line 17:       for (i=0; i&lt;apel.Length; i++) {
Line 18:         p = url.IndexOf(apel[i]);
Line 19:         if (p &gt; 0) break;
Line 20:       }
Line 21:       switch (i) {
Line 22:         case 0: 
Line 23:           if (ctx.Request.HttpMethod != &quot;GET&quot;) break;
Line 24:           ctx.Response.Write(ping()); 
Line 25:           break;
Line 26:         case 1: 
Line 27:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 28:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 29:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 30:           ctx.Response.Write(add(a, b).ToString() + &quot; method DELETE&quot;);
Line 31:           break;
Line 32:         case 2: 
Line 33:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 34:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 35:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 36:           ctx.Response.Write(subtract(a, b).ToString() + &quot; method DELETE&quot;);
Line 37:           break;
Line 38:         case 3: 
Line 39:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 40:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 41:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 42:           ctx.Response.Write(multiply(a, b).ToString() + &quot; method DELETE&quot;);
Line 43:           break;
Line 44:         case 4: 
Line 45:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 46:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 47:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 48:           ctx.Response.Write(divide(a, b).ToString() + &quot; method DELETE&quot;);
Line 49:           break;
Line 50:         case 5: 
Line 51:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 52:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 53:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 54:           ctx.Response.Write(mod(a, b).ToString() + &quot; method DELETE&quot;);
Line 55:           break;
Line 56:         case 6: 
Line 57:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 58:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 59:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 60:           ctx.Response.Write(intPow(a, b).ToString() + &quot; method DELETE&quot;);
Line 61:           break;
Line 62:         case 7:
Line 63:           if (ctx.Request.HttpMethod != &quot;POST&quot;) break;
Line 64:           Stream body = ctx.Request.InputStream;
Line 65:           a = Convert.ToInt32(body.Length);
Line 66:           byte[] bBody = new byte[a];
Line 67:           body.Read(bBody, 0, a);
Line 68:           String infix = System.Text.Encoding.ASCII.GetString(bBody);
Line 69:           ctx.Response.Write(toFpp(infix).ToString() + &quot; method PUT&quot;); 
Line 70:           break;
Line 71:        default: break;
Line 72:       }
Line 73:     }
Line 74:     private static String tip = &quot;RESTful&quot;;
Line 75:     private static String pathServ = &quot;Service.ashx&quot;;
Line 76:     private static int port = 80;
Line 77:     public static String ping() {
Line 78:      String host = Dns.GetHostName();
Line 79:       return &quot;C# &quot; + tip + &quot; &quot; + pathServ + &quot;: &quot;+host +
Line 80:         &quot; (&quot; + Dns.GetHostAddresses(host)[0] + &quot;:&quot; + port + &quot;) &quot; + DateTime.Now;
Line 81:     }
Line 82:     public int add(int a, int b) {
Line 83:       return a+b;
Line 84:     }
Line 85:     public int subtract(int a, int b) {
Line 86:       return a-b;
Line 87:     }
Line 88:     public int multiply(int a, int b) {
Line 89:       return a*b;
Line 90:     }
Line 91:     public int divide(int a, int b) {
Line 92:      try {
Line 93:         return a/b;
Line 94:       } catch (Exception e) {
Line 95:         throw new Exception(&quot;divide: Impartire la zero&quot; + e);
Line 96:       }
Line 97:      }
Line 98:     public int mod(int a, int b) {
Line 99:       try {
Line 100:        return a%b;
Line 101:      } catch (Exception e) {
Line 102:        throw new Exception(&quot;mod: Impartire la zero&quot; + e);
Line 103:      }
Line 104:    }
Line 105:    public int intPow(int a, int b) {
Line 106:      int p=1;
Line 107:      try {
Line 108:        for (int i=1; i&lt;= b; i++, p *= a);
Line 109:        return p;
Line 110:      } catch (Exception e) {
Line 111:        throw new Exception(&quot;intPow: depasire&quot; + e);
Line 112:      }
Line 113:    }
Line 114:    public String toFpp(String infix) {
Line 115:      infix = infix.Trim();
Line 116:      int i, p, varf =-1;
Line 117:      char c, u;
Line 118:      String s, d, r;
Line 119:      String postfix = &quot;&quot;;
Line 120:      String eval = &quot;&quot;;
Line 121:      String apeluri = &quot;&quot;;
Line 122:      String operatori = &quot;+-*/%^&quot;;
Line 123:      String priority = &quot;112223&quot;;
Line 124:      String albe = &quot; \t\n\r&quot;;
Line 125:      String alfabet = &quot;0123456789&quot;+operatori+albe+&quot;()&quot;;
Line 126:      ArrayList stiva = new ArrayList();
Line 127:      ArrayList operanzi = new ArrayList();
Line 128:      StringBuilder sb = new StringBuilder(infix);
Line 129:      for ( i=sb.Length-1; i&gt;=0; i--) {
Line 130:        c = sb[i];
Line 131:        if (alfabet.IndexOf(c) == -1) return infix+&quot;\nERROR caracter interzis!\n&quot;;
Line 132:        if (albe.IndexOf(c) &gt;= 0) sb.Remove(i, 1);
Line 133:        if (i &lt; sb.Length-1) u = sb[i+1]; else u = ' ';
Line 134:        if (c == '(')
Line 135:          if (u == '+')
Line 136:            sb.Remove(i+1, 1);
Line 137:          else if (u == '-')
Line 138:            sb.Insert(i+1, '0');
Line 139:      } // Control alfabet, sters toate spatiile albe, rezolvat + si - unar
Line 140:      if (sb.Length &gt; 0)
Line 141:        if (sb[0] == '+')
Line 142:          sb.Remove(0, 1);
Line 143:        else if (sb[0] == '-')
Line 144:          sb.Insert(0, '0');
Line 145:      for ( ; sb.Length &gt;0; ) {
Line 146:        c = sb[0];
Line 147:        i = operatori.IndexOf(c);
Line 148:        if (char.IsDigit(c)) { // operand
Line 149:          for ( i=0; i &lt; sb.Length &amp;&amp; char.IsDigit(sb[i]); i++) ;
Line 150:          postfix += &quot;#&quot;+sb.ToString().Substring(0,i)+&quot;|&quot;;
Line 151:          eval += &quot;#&quot;;
Line 152:          sb.Remove(0,i-1);
Line 153:        } else if (i != -1) { // operatori
Line 154:          for ( ; ; ) {
Line 155:            if (varf &lt; 0) break;
Line 156:            p = operatori.IndexOf(stiva[varf].ToString());
Line 157:            if (p &lt; 0 || priority[p] &lt; priority[i]) break;
Line 158:            p = eval.Length;
Line 159:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 160:            postfix += stiva[varf];
Line 161:            eval = eval.Substring(0, p-1);
Line 162:            stiva.RemoveAt(varf);
Line 163:            varf--;
Line 164:          }
Line 165:          stiva.Add(c);
Line 166:          varf++;
Line 167:        } else if (c == '(') { // pune ( in stiva
Line 168:          stiva.Add(c);
Line 169:          varf++;
Line 170:        } else if (c == ')') { // extrage din stiva pana la ( si genereaza corespunzator
Line 171:          for ( ;  ;  ) {
Line 172:            if (varf &lt; 0) return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 173:            c = (char)stiva[varf];
Line 174:            stiva.RemoveAt(varf);
Line 175:            varf--;
Line 176:            if (c == '(') break;
Line 177:            p = eval.Length;
Line 178:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 179:            postfix += c;
Line 180:            eval = eval.Substring(0, p-1);
Line 181:          }
Line 182:        }
Line 183:        sb.Remove(0, 1);
Line 184:      }
Line 185:      for ( ; varf &gt;= 0;  ) { // golestre stiva de ultimii operatori si genereaza
Line 186:        if ((char)stiva[varf] == '(') return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 187:        p = eval.Length;
Line 188:        if (p &lt; 2) return infix+&quot;ERROR operatori fara operanzi\n&quot;;
Line 189:        eval = eval.Substring(0, p-1);
Line 190:        postfix += stiva[varf];
Line 191:        stiva.RemoveAt(varf);
Line 192:        varf--;
Line 193:      }
Line 194:      if (eval.Length != 1) return infix+&quot;\nERROR prea multi operanzi\n&quot;;
Line 195:      sb = new StringBuilder(postfix);
Line 196:      p = 0;
Line 197:      for ( ; sb.Length &gt;0; ) { // construieste succesiunea de apeluri
Line 198:        c = sb[0];
Line 199:        if (c == '#') {
Line 200:          i = sb.ToString().IndexOf(&quot;|&quot;);
Line 201:          operanzi.Add(&quot;\&quot;&quot;+sb.ToString().Substring(1,i-1)+&quot;\&quot;&quot;);
Line 202:          sb.Remove(0,i+1);
Line 203:        } else {
Line 204:          sb.Remove(0, 1);
Line 205:          varf = operanzi.Count-1;
Line 206:          d = (String)operanzi[varf];
Line 207:          s = (String)operanzi[varf-1];
Line 208:          if (s[0] == '\&quot;' &amp;&amp; d[0] == '\&quot;') r = &quot;&quot;+(p++);
Line 209:          else if (s[0] == '\&quot;') r = d;
Line 210:          else r = s;
Line 211:          operanzi[varf-1] = r;
Line 212:          operanzi.RemoveAt(varf);
Line 213:          apeluri += r+&quot;=&quot;+s+c+d+&quot;\n&quot;;
Line 214:        }
Line 215:      }
Line 216:      apeluri += operanzi[0]+&quot;\n&quot;;
Line 217:      return apeluri+postfix+&quot;\n&quot;+infix;
Line 218:    } 
Line 219:  }
Line 220:  
Line 221:  
Line 222:  #line default
Line 223:  #line hidden
Line 224:  </pre></code>



                  </td>

               </tr>

            </table>



            



</div>



    <script type="text/javascript">

    function OnToggleTOCLevel1(level2ID)

    {

      var elemLevel2 = document.getElementById(level2ID);

      if (elemLevel2.style.display == 'none')

      {

        elemLevel2.style.display = '';

      }

      else {

        elemLevel2.style.display = 'none';

      }

    }

    </script>

                          <br><br>



            <hr width=100% size=1 color=silver>



            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3614



            </font>



    </body>

</html>

<!-- 

[HttpCompileException]: \\172.30.0.5\iis\~florin\ServiceRs.ashx(125): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

   at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.UI.SimpleHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)

   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)

   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

--><!-- 

This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using &lt;customErrors mode="Off"/&gt;. Consider using &lt;customErrors mode="On"/&gt; or &lt;customErrors mode="RemoteOnly"/&gt; in production environments.-->
Serv0:	mod: 	7 / 0 = <html>

    <head>

        <title>Compilation Error</title>

        <style>

         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 

         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}

         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}

         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }

         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }

         pre {font-family:"Lucida Console";font-size: .9em}

         .marker {font-weight: bold; color: black;text-decoration: none;}

         .version {color: gray;}

         .error {margin-bottom: 10px;}

         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

        </style>

    </head>



    <body bgcolor="white">



            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>



            <h2> <i>Compilation Error</i> </h2></span>



            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">



            <b> Description: </b>An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

            <br><br>



            <b> Compiler Error Message: </b>CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)<br><br>

<b>Source Error:</b><br><br>

            <table width=100% bgcolor="#ffffcc">

               <tr><td>

                              </td></tr>

               <tr>

                  <td>

                      <code><pre>



Line 123:    ArrayList stiva = new ArrayList();

Line 124:    ArrayList operanzi = new ArrayList();

<font color=red>Line 125:    StringBuilder sb = new StringBuilder(infix);

</font>Line 126:    for ( i=sb.Length-1; i&gt;=0; i--) {

Line 127:      c = sb[i];</pre></code>



                  </td>

               </tr>

            </table>



            <br>



            <b>Source File:</b> \\172.30.0.5\iis\~florin\ServiceRs.ashx

            &nbsp;&nbsp; <b>Line:</b>  125

            <br><br>

<br><div class="expandable" onclick="OnToggleTOCLevel1('compilerOutputDiv')">Show Detailed Compiler Output:</div>

<div id="compilerOutputDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



C:\WINDOWS\SysWOW64\inetsrv&gt; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe&quot; /t:library /utf8output /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll&quot; /R:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\MySql.Data\5.2.5.0__c5687fc88969c44d\MySql.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll&quot; /out:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.dll&quot; /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701  &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.0.cs&quot; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.1.cs&quot;





Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.3053

for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727

Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.



\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,5): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,28): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(127,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(130,32): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(138,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(140,16): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(143,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(146,50): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(192,14): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(195,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

</pre></code>



                  </td>

               </tr>

            </table>



            



</div>

<br><div class="expandable" onclick="OnToggleTOCLevel1('dynamicCodeDiv')">Show Complete Compilation Source:</div>

<div id="dynamicCodeDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



Line 1:    #pragma checksum &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot; &quot;{406ea660-64cf-4c82-b6f0-42d48172a799}&quot; &quot;1CFD175703181AB6B3BAC827D91F8797&quot;
Line 2:    
Line 3:    #line 1 &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot;
Line 4:    
Line 5:    using System;
Line 6:    using System.Net;
Line 7:    using System.Web;
Line 8:    using System.Collections;
Line 9:    using System.Collections.Specialized;
Line 10:   using System.IO;
Line 11:   public class ServiceRs : IHttpHandler {
Line 12:     public bool IsReusable { get { return false; } }
Line 13:     public void ProcessRequest(HttpContext ctx) {
Line 14:       String[] apel = {&quot;/ping&quot;, &quot;/add/&quot;, &quot;/subtract/&quot;, &quot;/multiply/&quot;, &quot;/divide/&quot;, &quot;/mod/&quot;, &quot;/intPow/&quot;, &quot;/toFpp&quot;}; 
Line 15:       String url = ctx.Request.RawUrl.ToString().ToLower();
Line 16:       int i=0, p=-1, a=0, b=0;
Line 17:       for (i=0; i&lt;apel.Length; i++) {
Line 18:         p = url.IndexOf(apel[i]);
Line 19:         if (p &gt; 0) break;
Line 20:       }
Line 21:       switch (i) {
Line 22:         case 0: 
Line 23:           if (ctx.Request.HttpMethod != &quot;GET&quot;) break;
Line 24:           ctx.Response.Write(ping()); 
Line 25:           break;
Line 26:         case 1: 
Line 27:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 28:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 29:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 30:           ctx.Response.Write(add(a, b).ToString() + &quot; method DELETE&quot;);
Line 31:           break;
Line 32:         case 2: 
Line 33:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 34:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 35:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 36:           ctx.Response.Write(subtract(a, b).ToString() + &quot; method DELETE&quot;);
Line 37:           break;
Line 38:         case 3: 
Line 39:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 40:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 41:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 42:           ctx.Response.Write(multiply(a, b).ToString() + &quot; method DELETE&quot;);
Line 43:           break;
Line 44:         case 4: 
Line 45:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 46:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 47:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 48:           ctx.Response.Write(divide(a, b).ToString() + &quot; method DELETE&quot;);
Line 49:           break;
Line 50:         case 5: 
Line 51:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 52:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 53:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 54:           ctx.Response.Write(mod(a, b).ToString() + &quot; method DELETE&quot;);
Line 55:           break;
Line 56:         case 6: 
Line 57:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 58:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 59:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 60:           ctx.Response.Write(intPow(a, b).ToString() + &quot; method DELETE&quot;);
Line 61:           break;
Line 62:         case 7:
Line 63:           if (ctx.Request.HttpMethod != &quot;POST&quot;) break;
Line 64:           Stream body = ctx.Request.InputStream;
Line 65:           a = Convert.ToInt32(body.Length);
Line 66:           byte[] bBody = new byte[a];
Line 67:           body.Read(bBody, 0, a);
Line 68:           String infix = System.Text.Encoding.ASCII.GetString(bBody);
Line 69:           ctx.Response.Write(toFpp(infix).ToString() + &quot; method PUT&quot;); 
Line 70:           break;
Line 71:        default: break;
Line 72:       }
Line 73:     }
Line 74:     private static String tip = &quot;RESTful&quot;;
Line 75:     private static String pathServ = &quot;Service.ashx&quot;;
Line 76:     private static int port = 80;
Line 77:     public static String ping() {
Line 78:      String host = Dns.GetHostName();
Line 79:       return &quot;C# &quot; + tip + &quot; &quot; + pathServ + &quot;: &quot;+host +
Line 80:         &quot; (&quot; + Dns.GetHostAddresses(host)[0] + &quot;:&quot; + port + &quot;) &quot; + DateTime.Now;
Line 81:     }
Line 82:     public int add(int a, int b) {
Line 83:       return a+b;
Line 84:     }
Line 85:     public int subtract(int a, int b) {
Line 86:       return a-b;
Line 87:     }
Line 88:     public int multiply(int a, int b) {
Line 89:       return a*b;
Line 90:     }
Line 91:     public int divide(int a, int b) {
Line 92:      try {
Line 93:         return a/b;
Line 94:       } catch (Exception e) {
Line 95:         throw new Exception(&quot;divide: Impartire la zero&quot; + e);
Line 96:       }
Line 97:      }
Line 98:     public int mod(int a, int b) {
Line 99:       try {
Line 100:        return a%b;
Line 101:      } catch (Exception e) {
Line 102:        throw new Exception(&quot;mod: Impartire la zero&quot; + e);
Line 103:      }
Line 104:    }
Line 105:    public int intPow(int a, int b) {
Line 106:      int p=1;
Line 107:      try {
Line 108:        for (int i=1; i&lt;= b; i++, p *= a);
Line 109:        return p;
Line 110:      } catch (Exception e) {
Line 111:        throw new Exception(&quot;intPow: depasire&quot; + e);
Line 112:      }
Line 113:    }
Line 114:    public String toFpp(String infix) {
Line 115:      infix = infix.Trim();
Line 116:      int i, p, varf =-1;
Line 117:      char c, u;
Line 118:      String s, d, r;
Line 119:      String postfix = &quot;&quot;;
Line 120:      String eval = &quot;&quot;;
Line 121:      String apeluri = &quot;&quot;;
Line 122:      String operatori = &quot;+-*/%^&quot;;
Line 123:      String priority = &quot;112223&quot;;
Line 124:      String albe = &quot; \t\n\r&quot;;
Line 125:      String alfabet = &quot;0123456789&quot;+operatori+albe+&quot;()&quot;;
Line 126:      ArrayList stiva = new ArrayList();
Line 127:      ArrayList operanzi = new ArrayList();
Line 128:      StringBuilder sb = new StringBuilder(infix);
Line 129:      for ( i=sb.Length-1; i&gt;=0; i--) {
Line 130:        c = sb[i];
Line 131:        if (alfabet.IndexOf(c) == -1) return infix+&quot;\nERROR caracter interzis!\n&quot;;
Line 132:        if (albe.IndexOf(c) &gt;= 0) sb.Remove(i, 1);
Line 133:        if (i &lt; sb.Length-1) u = sb[i+1]; else u = ' ';
Line 134:        if (c == '(')
Line 135:          if (u == '+')
Line 136:            sb.Remove(i+1, 1);
Line 137:          else if (u == '-')
Line 138:            sb.Insert(i+1, '0');
Line 139:      } // Control alfabet, sters toate spatiile albe, rezolvat + si - unar
Line 140:      if (sb.Length &gt; 0)
Line 141:        if (sb[0] == '+')
Line 142:          sb.Remove(0, 1);
Line 143:        else if (sb[0] == '-')
Line 144:          sb.Insert(0, '0');
Line 145:      for ( ; sb.Length &gt;0; ) {
Line 146:        c = sb[0];
Line 147:        i = operatori.IndexOf(c);
Line 148:        if (char.IsDigit(c)) { // operand
Line 149:          for ( i=0; i &lt; sb.Length &amp;&amp; char.IsDigit(sb[i]); i++) ;
Line 150:          postfix += &quot;#&quot;+sb.ToString().Substring(0,i)+&quot;|&quot;;
Line 151:          eval += &quot;#&quot;;
Line 152:          sb.Remove(0,i-1);
Line 153:        } else if (i != -1) { // operatori
Line 154:          for ( ; ; ) {
Line 155:            if (varf &lt; 0) break;
Line 156:            p = operatori.IndexOf(stiva[varf].ToString());
Line 157:            if (p &lt; 0 || priority[p] &lt; priority[i]) break;
Line 158:            p = eval.Length;
Line 159:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 160:            postfix += stiva[varf];
Line 161:            eval = eval.Substring(0, p-1);
Line 162:            stiva.RemoveAt(varf);
Line 163:            varf--;
Line 164:          }
Line 165:          stiva.Add(c);
Line 166:          varf++;
Line 167:        } else if (c == '(') { // pune ( in stiva
Line 168:          stiva.Add(c);
Line 169:          varf++;
Line 170:        } else if (c == ')') { // extrage din stiva pana la ( si genereaza corespunzator
Line 171:          for ( ;  ;  ) {
Line 172:            if (varf &lt; 0) return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 173:            c = (char)stiva[varf];
Line 174:            stiva.RemoveAt(varf);
Line 175:            varf--;
Line 176:            if (c == '(') break;
Line 177:            p = eval.Length;
Line 178:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 179:            postfix += c;
Line 180:            eval = eval.Substring(0, p-1);
Line 181:          }
Line 182:        }
Line 183:        sb.Remove(0, 1);
Line 184:      }
Line 185:      for ( ; varf &gt;= 0;  ) { // golestre stiva de ultimii operatori si genereaza
Line 186:        if ((char)stiva[varf] == '(') return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 187:        p = eval.Length;
Line 188:        if (p &lt; 2) return infix+&quot;ERROR operatori fara operanzi\n&quot;;
Line 189:        eval = eval.Substring(0, p-1);
Line 190:        postfix += stiva[varf];
Line 191:        stiva.RemoveAt(varf);
Line 192:        varf--;
Line 193:      }
Line 194:      if (eval.Length != 1) return infix+&quot;\nERROR prea multi operanzi\n&quot;;
Line 195:      sb = new StringBuilder(postfix);
Line 196:      p = 0;
Line 197:      for ( ; sb.Length &gt;0; ) { // construieste succesiunea de apeluri
Line 198:        c = sb[0];
Line 199:        if (c == '#') {
Line 200:          i = sb.ToString().IndexOf(&quot;|&quot;);
Line 201:          operanzi.Add(&quot;\&quot;&quot;+sb.ToString().Substring(1,i-1)+&quot;\&quot;&quot;);
Line 202:          sb.Remove(0,i+1);
Line 203:        } else {
Line 204:          sb.Remove(0, 1);
Line 205:          varf = operanzi.Count-1;
Line 206:          d = (String)operanzi[varf];
Line 207:          s = (String)operanzi[varf-1];
Line 208:          if (s[0] == '\&quot;' &amp;&amp; d[0] == '\&quot;') r = &quot;&quot;+(p++);
Line 209:          else if (s[0] == '\&quot;') r = d;
Line 210:          else r = s;
Line 211:          operanzi[varf-1] = r;
Line 212:          operanzi.RemoveAt(varf);
Line 213:          apeluri += r+&quot;=&quot;+s+c+d+&quot;\n&quot;;
Line 214:        }
Line 215:      }
Line 216:      apeluri += operanzi[0]+&quot;\n&quot;;
Line 217:      return apeluri+postfix+&quot;\n&quot;+infix;
Line 218:    } 
Line 219:  }
Line 220:  
Line 221:  
Line 222:  #line default
Line 223:  #line hidden
Line 224:  </pre></code>



                  </td>

               </tr>

            </table>



            



</div>



    <script type="text/javascript">

    function OnToggleTOCLevel1(level2ID)

    {

      var elemLevel2 = document.getElementById(level2ID);

      if (elemLevel2.style.display == 'none')

      {

        elemLevel2.style.display = '';

      }

      else {

        elemLevel2.style.display = 'none';

      }

    }

    </script>

                          <br><br>



            <hr width=100% size=1 color=silver>



            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3614



            </font>



    </body>

</html>

<!-- 

[HttpCompileException]: \\172.30.0.5\iis\~florin\ServiceRs.ashx(125): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

   at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.UI.SimpleHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)

   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)

   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

--><!-- 

This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using &lt;customErrors mode="Off"/&gt;. Consider using &lt;customErrors mode="On"/&gt; or &lt;customErrors mode="RemoteOnly"/&gt; in production environments.-->
Serv0:	ping: <html>

    <head>

        <title>Compilation Error</title>

        <style>

         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 

         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}

         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}

         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }

         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }

         pre {font-family:"Lucida Console";font-size: .9em}

         .marker {font-weight: bold; color: black;text-decoration: none;}

         .version {color: gray;}

         .error {margin-bottom: 10px;}

         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

        </style>

    </head>



    <body bgcolor="white">



            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>



            <h2> <i>Compilation Error</i> </h2></span>



            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">



            <b> Description: </b>An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

            <br><br>



            <b> Compiler Error Message: </b>CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)<br><br>

<b>Source Error:</b><br><br>

            <table width=100% bgcolor="#ffffcc">

               <tr><td>

                              </td></tr>

               <tr>

                  <td>

                      <code><pre>



Line 123:    ArrayList stiva = new ArrayList();

Line 124:    ArrayList operanzi = new ArrayList();

<font color=red>Line 125:    StringBuilder sb = new StringBuilder(infix);

</font>Line 126:    for ( i=sb.Length-1; i&gt;=0; i--) {

Line 127:      c = sb[i];</pre></code>



                  </td>

               </tr>

            </table>



            <br>



            <b>Source File:</b> \\172.30.0.5\iis\~florin\ServiceRs.ashx

            &nbsp;&nbsp; <b>Line:</b>  125

            <br><br>

<br><div class="expandable" onclick="OnToggleTOCLevel1('compilerOutputDiv')">Show Detailed Compiler Output:</div>

<div id="compilerOutputDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



C:\WINDOWS\SysWOW64\inetsrv&gt; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe&quot; /t:library /utf8output /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll&quot; /R:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\MySql.Data\5.2.5.0__c5687fc88969c44d\MySql.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll&quot; /out:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.dll&quot; /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701  &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.0.cs&quot; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6c3e65c3\34d82d6c\App_Web_servicers.ashx.367d2d72.2g6suq26.1.cs&quot;





Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.3053

for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727

Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.



\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,5): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(125,28): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(127,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(130,32): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(138,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(140,16): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(143,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(146,50): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

\\172.30.0.5\iis\~florin\ServiceRs.ashx(192,14): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

\\172.30.0.5\iis\~florin\ServiceRs.ashx(195,11): error CS0021: Cannot apply indexing with [] to an expression of type 'StringBuilder'

</pre></code>



                  </td>

               </tr>

            </table>



            



</div>

<br><div class="expandable" onclick="OnToggleTOCLevel1('dynamicCodeDiv')">Show Complete Compilation Source:</div>

<div id="dynamicCodeDiv" style="display: none;">

            <br><table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>



Line 1:    #pragma checksum &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot; &quot;{406ea660-64cf-4c82-b6f0-42d48172a799}&quot; &quot;1CFD175703181AB6B3BAC827D91F8797&quot;
Line 2:    
Line 3:    #line 1 &quot;\\172.30.0.5\iis\~florin\ServiceRs.ashx&quot;
Line 4:    
Line 5:    using System;
Line 6:    using System.Net;
Line 7:    using System.Web;
Line 8:    using System.Collections;
Line 9:    using System.Collections.Specialized;
Line 10:   using System.IO;
Line 11:   public class ServiceRs : IHttpHandler {
Line 12:     public bool IsReusable { get { return false; } }
Line 13:     public void ProcessRequest(HttpContext ctx) {
Line 14:       String[] apel = {&quot;/ping&quot;, &quot;/add/&quot;, &quot;/subtract/&quot;, &quot;/multiply/&quot;, &quot;/divide/&quot;, &quot;/mod/&quot;, &quot;/intPow/&quot;, &quot;/toFpp&quot;}; 
Line 15:       String url = ctx.Request.RawUrl.ToString().ToLower();
Line 16:       int i=0, p=-1, a=0, b=0;
Line 17:       for (i=0; i&lt;apel.Length; i++) {
Line 18:         p = url.IndexOf(apel[i]);
Line 19:         if (p &gt; 0) break;
Line 20:       }
Line 21:       switch (i) {
Line 22:         case 0: 
Line 23:           if (ctx.Request.HttpMethod != &quot;GET&quot;) break;
Line 24:           ctx.Response.Write(ping()); 
Line 25:           break;
Line 26:         case 1: 
Line 27:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 28:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 29:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 30:           ctx.Response.Write(add(a, b).ToString() + &quot; method DELETE&quot;);
Line 31:           break;
Line 32:         case 2: 
Line 33:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 34:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 35:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 36:           ctx.Response.Write(subtract(a, b).ToString() + &quot; method DELETE&quot;);
Line 37:           break;
Line 38:         case 3: 
Line 39:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 40:           a = int.Parse(url.Substring(p + 10, url.LastIndexOf(&quot;/&quot;) - p - 10));
Line 41:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 42:           ctx.Response.Write(multiply(a, b).ToString() + &quot; method DELETE&quot;);
Line 43:           break;
Line 44:         case 4: 
Line 45:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 46:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 47:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 48:           ctx.Response.Write(divide(a, b).ToString() + &quot; method DELETE&quot;);
Line 49:           break;
Line 50:         case 5: 
Line 51:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 52:           a = int.Parse(url.Substring(p + 5, url.LastIndexOf(&quot;/&quot;) - p - 5));
Line 53:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 54:           ctx.Response.Write(mod(a, b).ToString() + &quot; method DELETE&quot;);
Line 55:           break;
Line 56:         case 6: 
Line 57:           if (ctx.Request.HttpMethod != &quot;PUT&quot;) break;
Line 58:           a = int.Parse(url.Substring(p + 8, url.LastIndexOf(&quot;/&quot;) - p - 8));
Line 59:           b = int.Parse(url.Substring(url.LastIndexOf(&quot;/&quot;) + 1));
Line 60:           ctx.Response.Write(intPow(a, b).ToString() + &quot; method DELETE&quot;);
Line 61:           break;
Line 62:         case 7:
Line 63:           if (ctx.Request.HttpMethod != &quot;POST&quot;) break;
Line 64:           Stream body = ctx.Request.InputStream;
Line 65:           a = Convert.ToInt32(body.Length);
Line 66:           byte[] bBody = new byte[a];
Line 67:           body.Read(bBody, 0, a);
Line 68:           String infix = System.Text.Encoding.ASCII.GetString(bBody);
Line 69:           ctx.Response.Write(toFpp(infix).ToString() + &quot; method PUT&quot;); 
Line 70:           break;
Line 71:        default: break;
Line 72:       }
Line 73:     }
Line 74:     private static String tip = &quot;RESTful&quot;;
Line 75:     private static String pathServ = &quot;Service.ashx&quot;;
Line 76:     private static int port = 80;
Line 77:     public static String ping() {
Line 78:      String host = Dns.GetHostName();
Line 79:       return &quot;C# &quot; + tip + &quot; &quot; + pathServ + &quot;: &quot;+host +
Line 80:         &quot; (&quot; + Dns.GetHostAddresses(host)[0] + &quot;:&quot; + port + &quot;) &quot; + DateTime.Now;
Line 81:     }
Line 82:     public int add(int a, int b) {
Line 83:       return a+b;
Line 84:     }
Line 85:     public int subtract(int a, int b) {
Line 86:       return a-b;
Line 87:     }
Line 88:     public int multiply(int a, int b) {
Line 89:       return a*b;
Line 90:     }
Line 91:     public int divide(int a, int b) {
Line 92:      try {
Line 93:         return a/b;
Line 94:       } catch (Exception e) {
Line 95:         throw new Exception(&quot;divide: Impartire la zero&quot; + e);
Line 96:       }
Line 97:      }
Line 98:     public int mod(int a, int b) {
Line 99:       try {
Line 100:        return a%b;
Line 101:      } catch (Exception e) {
Line 102:        throw new Exception(&quot;mod: Impartire la zero&quot; + e);
Line 103:      }
Line 104:    }
Line 105:    public int intPow(int a, int b) {
Line 106:      int p=1;
Line 107:      try {
Line 108:        for (int i=1; i&lt;= b; i++, p *= a);
Line 109:        return p;
Line 110:      } catch (Exception e) {
Line 111:        throw new Exception(&quot;intPow: depasire&quot; + e);
Line 112:      }
Line 113:    }
Line 114:    public String toFpp(String infix) {
Line 115:      infix = infix.Trim();
Line 116:      int i, p, varf =-1;
Line 117:      char c, u;
Line 118:      String s, d, r;
Line 119:      String postfix = &quot;&quot;;
Line 120:      String eval = &quot;&quot;;
Line 121:      String apeluri = &quot;&quot;;
Line 122:      String operatori = &quot;+-*/%^&quot;;
Line 123:      String priority = &quot;112223&quot;;
Line 124:      String albe = &quot; \t\n\r&quot;;
Line 125:      String alfabet = &quot;0123456789&quot;+operatori+albe+&quot;()&quot;;
Line 126:      ArrayList stiva = new ArrayList();
Line 127:      ArrayList operanzi = new ArrayList();
Line 128:      StringBuilder sb = new StringBuilder(infix);
Line 129:      for ( i=sb.Length-1; i&gt;=0; i--) {
Line 130:        c = sb[i];
Line 131:        if (alfabet.IndexOf(c) == -1) return infix+&quot;\nERROR caracter interzis!\n&quot;;
Line 132:        if (albe.IndexOf(c) &gt;= 0) sb.Remove(i, 1);
Line 133:        if (i &lt; sb.Length-1) u = sb[i+1]; else u = ' ';
Line 134:        if (c == '(')
Line 135:          if (u == '+')
Line 136:            sb.Remove(i+1, 1);
Line 137:          else if (u == '-')
Line 138:            sb.Insert(i+1, '0');
Line 139:      } // Control alfabet, sters toate spatiile albe, rezolvat + si - unar
Line 140:      if (sb.Length &gt; 0)
Line 141:        if (sb[0] == '+')
Line 142:          sb.Remove(0, 1);
Line 143:        else if (sb[0] == '-')
Line 144:          sb.Insert(0, '0');
Line 145:      for ( ; sb.Length &gt;0; ) {
Line 146:        c = sb[0];
Line 147:        i = operatori.IndexOf(c);
Line 148:        if (char.IsDigit(c)) { // operand
Line 149:          for ( i=0; i &lt; sb.Length &amp;&amp; char.IsDigit(sb[i]); i++) ;
Line 150:          postfix += &quot;#&quot;+sb.ToString().Substring(0,i)+&quot;|&quot;;
Line 151:          eval += &quot;#&quot;;
Line 152:          sb.Remove(0,i-1);
Line 153:        } else if (i != -1) { // operatori
Line 154:          for ( ; ; ) {
Line 155:            if (varf &lt; 0) break;
Line 156:            p = operatori.IndexOf(stiva[varf].ToString());
Line 157:            if (p &lt; 0 || priority[p] &lt; priority[i]) break;
Line 158:            p = eval.Length;
Line 159:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 160:            postfix += stiva[varf];
Line 161:            eval = eval.Substring(0, p-1);
Line 162:            stiva.RemoveAt(varf);
Line 163:            varf--;
Line 164:          }
Line 165:          stiva.Add(c);
Line 166:          varf++;
Line 167:        } else if (c == '(') { // pune ( in stiva
Line 168:          stiva.Add(c);
Line 169:          varf++;
Line 170:        } else if (c == ')') { // extrage din stiva pana la ( si genereaza corespunzator
Line 171:          for ( ;  ;  ) {
Line 172:            if (varf &lt; 0) return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 173:            c = (char)stiva[varf];
Line 174:            stiva.RemoveAt(varf);
Line 175:            varf--;
Line 176:            if (c == '(') break;
Line 177:            p = eval.Length;
Line 178:            if (p &lt; 2) return infix+&quot;\nERROR operatori fara operanzi\n&quot;;
Line 179:            postfix += c;
Line 180:            eval = eval.Substring(0, p-1);
Line 181:          }
Line 182:        }
Line 183:        sb.Remove(0, 1);
Line 184:      }
Line 185:      for ( ; varf &gt;= 0;  ) { // golestre stiva de ultimii operatori si genereaza
Line 186:        if ((char)stiva[varf] == '(') return infix+&quot;\nERROR paranteze incorecte!\n&quot;;
Line 187:        p = eval.Length;
Line 188:        if (p &lt; 2) return infix+&quot;ERROR operatori fara operanzi\n&quot;;
Line 189:        eval = eval.Substring(0, p-1);
Line 190:        postfix += stiva[varf];
Line 191:        stiva.RemoveAt(varf);
Line 192:        varf--;
Line 193:      }
Line 194:      if (eval.Length != 1) return infix+&quot;\nERROR prea multi operanzi\n&quot;;
Line 195:      sb = new StringBuilder(postfix);
Line 196:      p = 0;
Line 197:      for ( ; sb.Length &gt;0; ) { // construieste succesiunea de apeluri
Line 198:        c = sb[0];
Line 199:        if (c == '#') {
Line 200:          i = sb.ToString().IndexOf(&quot;|&quot;);
Line 201:          operanzi.Add(&quot;\&quot;&quot;+sb.ToString().Substring(1,i-1)+&quot;\&quot;&quot;);
Line 202:          sb.Remove(0,i+1);
Line 203:        } else {
Line 204:          sb.Remove(0, 1);
Line 205:          varf = operanzi.Count-1;
Line 206:          d = (String)operanzi[varf];
Line 207:          s = (String)operanzi[varf-1];
Line 208:          if (s[0] == '\&quot;' &amp;&amp; d[0] == '\&quot;') r = &quot;&quot;+(p++);
Line 209:          else if (s[0] == '\&quot;') r = d;
Line 210:          else r = s;
Line 211:          operanzi[varf-1] = r;
Line 212:          operanzi.RemoveAt(varf);
Line 213:          apeluri += r+&quot;=&quot;+s+c+d+&quot;\n&quot;;
Line 214:        }
Line 215:      }
Line 216:      apeluri += operanzi[0]+&quot;\n&quot;;
Line 217:      return apeluri+postfix+&quot;\n&quot;+infix;
Line 218:    } 
Line 219:  }
Line 220:  
Line 221:  
Line 222:  #line default
Line 223:  #line hidden
Line 224:  </pre></code>



                  </td>

               </tr>

            </table>



            



</div>



    <script type="text/javascript">

    function OnToggleTOCLevel1(level2ID)

    {

      var elemLevel2 = document.getElementById(level2ID);

      if (elemLevel2.style.display == 'none')

      {

        elemLevel2.style.display = '';

      }

      else {

        elemLevel2.style.display = 'none';

      }

    }

    </script>

                          <br><br>



            <hr width=100% size=1 color=silver>



            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3614



            </font>



    </body>

</html>

<!-- 

[HttpCompileException]: \\172.30.0.5\iis\~florin\ServiceRs.ashx(125): error CS0246: The type or namespace name 'StringBuilder' could not be found (are you missing a using directive or an assembly reference?)

   at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.UI.SimpleHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)

   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)

   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

--><!-- 

This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using &lt;customErrors mode="Off"/&gt;. Consider using &lt;customErrors mode="On"/&gt; or &lt;customErrors mode="RemoteOnly"/&gt; in production environments.-->

STOP client.
