app-code

Catch exceptions in ASP.NET resulting from Generic Handler (ashx) file

浪子不回头ぞ 提交于 2019-11-29 12:50:27
I am trying to get a different server side stack functioning with my ASP.NET site. My ashx file seems to be throwing a 500 Internal Server Error. How do I figure out what exception this ashx file is throwing or the reason the 500 is being thrown? When I attach to my IIS 7 w3wp.exe process, it doesn't throw an exception, but I'm reading that this is likely the case. The ashx file lives in the root directory of my ASP.NET site, and the Properties have it set to compile. GET http://uhc-8:8883/MyApp/ExtDirectProxy.ashx 500 (Internal Server Error) index.html:27 Uncaught TypeError: Cannot read

ASP.NET web site can't see .cs file in App_Code folder

允我心安 提交于 2019-11-29 06:50:28
问题 So I have an ASP.NET web site (not web application) I'm making in VS2010 with C#. It runs fine on my machine, but when I upload it to the site it's hosted on, it won't compile, giving: "CS0246: The type or namespace name 'DataAccess' could not be found (are you missing a using directive or an assembly reference?)" I've been using the copy web site feature in VS and had no problems until I wanted to put my own class in the App_Code folder and use it. I read in other answers about changing the

App_Code folder issues

时间秒杀一切 提交于 2019-11-28 06:48:18
So I'm having a really weird issue with my App_Code folder on a new website I'm designing. I have a basic class inside of a namespace in the App_Code folder. Everything works fine in the IDE when I setup the namespace and make an object from the class. It brings up the class summary on hover, and when you click on "go to deffinition" it goes to the class file. And it also works fine localy. However, when I load the site onto my server, I get this error message when I access that page: Line 10: using System.Web.UI.WebControls; Line 11: using System.Web.UI.WebControls.WebParts; Line 12: using

ASP.Net - App_Data & App_Code folders?

人盡茶涼 提交于 2019-11-27 23:27:18
What is the point of having App_code & App_data folders? Why doesn't my objectDataSource detect classes unless files are in App_Code? Please provide as much detail as you can, I'm new to ASP.Net These folders have special purpose. From this article - ASP.NET Web project folder structure. App_Code App_Code contains source code for shared classes and business objects (for example, ..cs, and .vb files) that you want to compile as part of your application. In a dynamically compiled Web site project, ASP.NET compiles the code in the App_Code folder on the initial request to your application. Items

How come classes in subfolders in my App_Code folder are not being found correctly?

可紊 提交于 2019-11-27 14:09:28
问题 I am getting the following error when I put class files in subfolders of my App_Code folder: errorCS0246: The type or namespace name 'MyClassName' could not be found (are you missing a using directive or an assembly reference?) This class is not in a namespace at all. Any ideas? 回答1: You need to add codeSubDirectories to your compilation element in web.config <configuration> <system.web> <compilation> <codeSubDirectories> <add directoryName="View"/> </codeSubDirectories> </compilation> <

Unable to call App_Code class from a code-behind

女生的网名这么多〃 提交于 2019-11-27 04:59:27
I have a class in a file that's in the "App_Code" folder. I'm able to use this in an "aspx" file but not from a code-behind file. How do I make it visible to a code-behind? NOTE: This is ASP.Net on Mono and I'm writing the classes directly, not using an IDE to compile them My files: ASPX FILE (testappcode.aspx) <%@ Page language="c#" src="TestAppCode.aspx.cs" Inherits="TestAppCode.TestAppCode" AutoEventWireup="true" %> <html> <head> <title>Test App_Code Folder</title> </head> <body> <form id="contactForm" runat="server"> <asp:TextBox id="Name" runat="server" ></asp:TextBox> <asp:TextBox id=

App_Code folder issues

冷暖自知 提交于 2019-11-27 01:16:26
问题 So I'm having a really weird issue with my App_Code folder on a new website I'm designing. I have a basic class inside of a namespace in the App_Code folder. Everything works fine in the IDE when I setup the namespace and make an object from the class. It brings up the class summary on hover, and when you click on "go to deffinition" it goes to the class file. And it also works fine localy. However, when I load the site onto my server, I get this error message when I access that page: Line 10

Unable to call App_Code class from a code-behind

≡放荡痞女 提交于 2019-11-26 11:26:07
问题 I have a class in a file that\'s in the \"App_Code\" folder. I\'m able to use this in an \"aspx\" file but not from a code-behind file. How do I make it visible to a code-behind? NOTE: This is ASP.Net on Mono and I\'m writing the classes directly, not using an IDE to compile them My files: ASPX FILE (testappcode.aspx) <%@ Page language=\"c#\" src=\"TestAppCode.aspx.cs\" Inherits=\"TestAppCode.TestAppCode\" AutoEventWireup=\"true\" %> <html> <head> <title>Test App_Code Folder</title> </head>