I have made one webapplication in C#.net and make a app_code folder where one file in created
named "SessionHelper.cs" (property set correctly to "Compile" so that it can access in Webapplication)
it uses to set and get session parametes, when I try to debug it, gives me "Value" as below in "Watch window"
app_code.SessionHelper.IsURLCheckSupport(Name) The type 'Solution.Web.app_code.SessionHelper' exists in both 'Solution.Web.dll' and 'App_Code.wgj24okr.dll' (value)
See below,
So i am not able to get the value while debug it, what can be the solution for this.
Please let me know, if you want more details.
The App_Code folder and its special status in an ASP.NET Web application makes it possible to create custom classes and other source-code-only files and use them in your Web application without having to compile them independently.
You can store source code in the App_Code folder, and it will be automatically compiled at run time. The resulting assembly is accessible to any other code in the Web application. The App_Code folder therefore works much like the Bin folder, except that you can store source code in it instead of compiled code.
This is occuring because your project is a "Web Application", when you Compile in Visual Studio, all the code in your site (including in App_Code
) gets compiled into an assembly called, in this instance, Solution.Web.dll
. When you run your site, asp.net knows about a "special" folder called App_Code
and compiles the content of it into an assembly with a unique name, in this instance `App_Code.wgj24okr.dll'.
One solution is to rename your App_Code
folder to another name, such as Code
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With