clearsky Posted November 22, 2008 Posted November 22, 2008 im trying to get this to work, but have no idea why it dont work here... <%@ page language="VB" %> <script runat="server"> Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Label1.Text = "Hello " & TextBox1.Text End Sub </script> <html> <head> <title>ASP.NET Inline Pages</title> </head> <body> <form id="Form1" runat="server"> <h1>Welcome to ASP.NET 2.0!</h1> <b>Enter Your Name:</b> <asp:TextBox ID="TextBox1" Runat="server"/> <asp:Button ID="Button1" Text="Click Me" OnClick="Button1_Click" Runat="server"/> <br /> <br /> <asp:Label ID="Label1" Text="Hello" Runat="server" /> </form> </body> </html>
clearsky Posted November 22, 2008 Author Posted November 22, 2008 What error are you getting? Server Error in '/' Application -------------------------------------------------------------------------------- Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off". <!-- Web.Config Configuration File --> <configuration> <system.web> <customErrors mode="Off"/> </system.web> </configuration> Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL. <!-- Web.Config Configuration File --> <configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web> </configuration> but dont know how where, or how to change the web.config
Ashoat Posted November 22, 2008 Posted November 22, 2008 Create a web.config file in the same directory your .aspx file is.
clearsky Posted November 22, 2008 Author Posted November 22, 2008 Create a web.config file in the same directory your .aspx file is. Thanks, now i got the error.. but what to so about it is the big question: Process has not been started. Description: HTTP 500. Error processing request. Stack Trace: System.InvalidOperationException: Process has not been started. at System.Diagnostics.Process.get_ExitCode () [0x00000] at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:get_ExitCode () at Microsoft.VisualBasic.VBCodeCompiler.CompileFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00000] at Microsoft.VisualBasic.VBCodeCompiler.CompileAssemblyFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00000] at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00000] at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.String virtualPath, System.CodeDom.Compiler.CompilerParameters options) [0x00000] at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.String virtualPath) [0x00000] at System.Web.Compilation.BuildManager.BuildAssembly (System.String virtualPath) [0x00000] at System.Web.Compilation.BuildManager.GetCompiledType (System.String virtualPath) [0x00000] at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath (System.String virtualPath, System.Type requiredBaseType) [0x00000] at System.Web.UI.PageParser.GetCompiledPageInstance (System.String virtualPath, System.String inputFile, System.Web.HttpContext context) [0x00000] at System.Web.UI.PageHandlerFactory.GetHandler (System.Web.HttpContext context, System.String requestType, System.String url, System.String path) [0x00000] at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context, System.String url) [0x00000] at System.Web.HttpApplication+<>c__CompilerGenerated2.MoveNext () [0x00000] here is my web.config: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.web> <compilation defaultLanguage="c#" debug="true"/> <customErrors mode="Off" /> <authentication mode="Windows" /> <authorization> <allow users="*" /> </authorization> <trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" /> <globalization requestEncoding="utf-8" responseEncoding="utf-8" /> </system.web> </configuration>
clearsky Posted November 23, 2008 Author Posted November 23, 2008 hi Anybody have any idea on the above problem?
Wizard Posted November 23, 2008 Posted November 23, 2008 hi Anybody have any idea on the above problem? Wrong forums, go ask the aspx guys.
clearsky Posted November 24, 2008 Author Posted November 24, 2008 hi Anybody have any idea on the above problem? Wrong forums, go ask the aspx guys. Well after some digging, it seems that its monos that are missing the VB codebase.. or that the VB compiler is not in the Path...
clearsky Posted November 24, 2008 Author Posted November 24, 2008 Does it work now? Yep, After i converted the code to use C# instead of VB it works... Here is the examples: default.aspx: <%@ page language="C#" %> <script runat="server"> void Button1_Click(object sender, System.EventArgs e) { Label1.Text = "Hello " + TextBox1.Text; } </script> <html> <head> <title>ASP.NET Inline Pages</title> </head> <body> <form id="Form1" runat="server"> <h1>Welcome to ASP.NET 2.0!</h1> <b>Enter Your Name:</b> <asp:TextBox ID="TextBox1" Runat="server"/> <asp:Button ID="Button1" Text="Click Me" OnClick="Button1_Click" Runat="server"/> <br /> <br /> <asp:Label ID="Label1" Text="Hello" Runat="server" /> </form> </body> </html> web.config: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.web> <compilation defaultLanguage="c#" debug="true"/> <customErrors mode="Off" /> <authentication mode="Windows" /> <authorization> <allow users="*" /> </authorization> <trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" /> <globalization requestEncoding="utf-8" responseEncoding="utf-8" /> </system.web> </configuration> Put both files in the same directory. Thanks.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now