2

I installed mono and mod_mono for apache2 running on Debian 7.

Though its giving me this error:

System.Web.Compilation.CompilationException
VBNC30451: Could not resolve the name 'Type'

Description: Error compiling a resource required to service this request. Review your     source file and modify it to fix this error.
Details: VBNC30451: Could not resolve the name 'Type'
Error origin: Compiler
Error source file: /tempconvert.asmx
Exception stack trace:
at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath, System.CodeDom.Compiler.CompilerParameters options) [0x0035f] in /home/joaogl/mono-3.4.0/mcs/class/System.Web/System.Web.Compilation/AssemblyBuilder.cs:853 
at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath) [0x00000] in /home/joaogl/mono-3.4.0/mcs/class/System.Web/System.Web.Compilation/AssemblyBuilder.cs:731 
at System.Web.Compilation.BuildManager.GenerateAssembly (System.Web.Compilation.AssemblyBuilder abuilder, System.Web.Compilation.BuildProviderGroup group, System.Web.VirtualPath vp, Boolean debug) [0x00258] in /home/joaogl/mono-3.4.0/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs:846 
at System.Web.Compilation.BuildManager.BuildInner (System.Web.VirtualPath vp, Boolean debug) [0x0011c] in /home/joaogl/mono-3.4.0/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs:469 

How can I solve this?

1 Answers1

3

If I understand the nature of your problem (I have had the same problem), then:

  1. Follow this (https://library.linode.com/frameworks/mod-mono/debian-5-lenny) "mod_mono and Apache on Debian" installation instruction
  2. Use this (http://go-mono.com/config-mod-mono/Default.aspx) to generate an Apache mod_mono configuration file.
  3. If you have set up MonoServerPath whatever "/usr/bin/mod-mono-server2" in your apache2.conf - remove it

Then, you may test how if it works.

Create index.aspx and put it into your htdocs directory or how you call it

<%@ Page Language="C#" AutoEventWireup="true"%>  

<!DOCTYPE html>        
<script runat="server">  
    protected void Button1_Click(object sender, System.EventArgs e)  
    {  
        //initialize a datetime variable with current datetime  
        DateTime now = DateTime.Now;  

        Label1.Text = "now : " + now.ToString();  

        //add 2 minutes to current time  
        DateTime dateAfter2Minutes = now.AddMinutes(2);  

        TimeSpan ts = dateAfter2Minutes - now;  
        //total milliseconds difference between two datetime object  
        int milliseconds = (int)ts.TotalMilliseconds;  

        Label1.Text += "<br ><br />after two minutes: ";  
        Label1.Text += dateAfter2Minutes.ToString();  

        Label1.Text += "<br ><br />smillieconds difference between to datetime object : ";  
        Label1.Text += milliseconds;  
    }  
</script>        

<html xmlns="http://www.w3.org/1999/xhtml">        
<head id="Head1" runat="server">        
    <title>c# example - datetime difference in milliseconds</title>        
</head>        
<body>        
    <form id="form1" runat="server">        
    <div>        
        <h2 style="color:MidnightBlue; font-style:italic;">        
            c# example - datetime difference in milliseconds  
        </h2>        
        <hr width="550" align="left" color="Gainsboro" />        
        <asp:Label         
            ID="Label1"         
            runat="server"        
            Font-Size="Large"      
            Font-Names="Comic Sans MS"  
            >        
        </asp:Label>        
        <br /><br />      
        <asp:Button         
            ID="Button1"         
            runat="server"         
            Text="get milliseconds difference between two datetime"        
            OnClick="Button1_Click"      
            Height="40"        
            Font-Bold="true"        
            />        
    </div>        
    </form>        
</body>        
</html>

It helped me.

Good luck!

SharkWeb
  • 361
  • 1
  • 5