System.Configuration.ConfigurationSection Not Available Under Class Library

Apr 30, 2010

I'm migrating a piece of functionality from my App_Code directory to a separate project that's going to build a class library to be referenced by my web app. One of my classes in the App_Code piece inherits form System.Configuration.ConfigurationSection, like so:

Imports System.Configuration
Imports System.Web.Configuration
Imports Microsoft.VisualBasic
Namespace P10.WebStore
#Region "WebStore Section"
Public Class WebStoreSection
Inherits ConfigurationSection

I absolutely cannot get the project to recognize ConfigurationSection as a class. Nothing I google about this class mentions having to do anything special to use it. Is it because this is a class library and not an .exe or somethign?

View 1 Replies


Similar Messages:

Use System.Web.Mvc From Class Library?

Jun 4, 2010

I'm working on an ASP.NET MVC application, but I'm trying to remove everything but Controller code from my project and put it in it's own Class Library. I've got some code that is using System.Web.Mvc; But it doesn't seem to be letting me access it. I have Referenced the System.Web Namespace in the project. Bassically I'm getting errors on the iActionFilter and the FilterAttribute stuff.

View 2 Replies

Unable To Add Reference To System.Web In A Class Library Project

Mar 18, 2011

Does anyone know what could be the reason I am not able to add reference to System.Web. It gives an exclamation(!) symbol in front of the dll under reference folder in VS 1020. I wand to refer to System.Web.Security.MembershipProvider class.

View 1 Replies

Configuration :: Link Website To The Class Library?

Jun 25, 2010

I have moved to a new computer.. and I forgot how I setup the following within Visual Studio 2008...

on my previous computer:

[1]I have a MY_SITE solution

within that solution I have:

[2]T:MySiteFolder

[3]I have MY_SITEClassLibrary (which actually is just a reference to a folder that contains a lot of .cs files - that is within the T:MySiteFolderTheClassLibrary)

... then... if I have USING MY_SITEClassLibrary in any aspx.cs file, I can reference the various classes..

when I move to a NEW computer and a new visual studio 2008 installation... if I open the T:MySiteFolder website... it just opens as a normal website without the MY_SITEClassLibrary as a primary object......

so, can anyone remind me how to again setup this relationship within my new visual studio installation/computer?

View 3 Replies

Configuration :: Accessing C# Windows Class Library Project DLL?

Jun 8, 2010

I have one C# windows class library type project which has a web reference whose settings are automatically added in to settings.settings file( Webservice name, type, scope, value).

I also have one separate ASP.net project which has let us as suppose, one page with a button. When I click this button, it calls a method of referred DLL of previous project and control goes there.

When in that project, when control goes in to location where I use this web reference, it tries to get the URL of web reference from settings file and raises an exception - 'The current configuration system does not support user-scoped settings'.

So, What is the way for me to call a c# project having web service in a asp.net project ? This is really a source stopper for our development.

View 1 Replies

Configuration :: Output Type Of Class Library Cannot Be Started?

Jul 8, 2010

I copied an entire project:

[Code]....

from one computer running Visual Studio 2008 to another computer running Visual Studio 2008.

I can rebuild/build the solution just fine on the new computer, but, if I select 'start debugging', it goes through the compile/build process and then ultimately pops up a window that says:

"A project with an Output Type of Class Library cannot be started directly.

In order to debug this project, add an executable to this solution which references the library project. Set the executable project as the startup project."

NOTE: the 'start debugging' runs fine on the older computer..

View 2 Replies

Configuration - Have Settings In The Web.config (and Access Them Using ConfigurationSection) Or In A Separate XML File?

Sep 20, 2010

I have few settings which I could place in a separate XML file and have them accessed in the Web app. Then I thought (thinking of one additional file to deploy), why not have them in the web.config itself. However, just because I need to have custom nodes, I can not have the settings under . So, I am thinking of creating a custom config handler following this. Would that be better than having a separate XML file? Is It going to be an overkill or performance wise? Is there a better way to go?

View 1 Replies

Web Forms :: Way To Control Null When Inheriting From Class Library Class

Sep 16, 2010

I have this Control directive in a usercontrol (i've changed the namespace and class name):

<%@ Control Language="C#" AutoEventWireup="true" Inherits="Namespace.Path.To.ClassName" %>
<asp:TextBox runat="server" ID="txtComment" TextMode="MultiLine" ValidationGroup="comment" />
ClassName is a class that lives in a class library and this is the class:
namespace Namespace.Path.To
{
public class ClassName : System.Web.UI.UserControl
{
protected System.Web.UI.WebControls.TextBox txtComment;
protected void Page_Load(object sender, EventArgs e)
{
HttpContext.Current.Response.Write(txtComment == null);
HttpContext.Current.Response.End();
}

View 3 Replies

C# - How To Show A Message Box From Inside A Class In A Class Library

Feb 24, 2010

Can anyone tell me how to show alert message inside the .cs file of class library project in c#? I am calling a method of cs file in classlibrary project. Whenever the control comes to the alert message statement inside the method, alert message should be shown on the web page(aspx) and the next statement to the alert message statement should not be executed.

View 3 Replies

C# - How To Inherit A Page Class From A Class Library

Mar 16, 2011

I might be asking a dumb question, but I have a client for whom I need to build many websites (10+) (asp.net 3.5) which will all the pages on each site will have the same codebehind, but the sites will launching in different regions and whilst following the same template, will have different content.I have built and launched site 1, and sites 2, 3 & 4 is nearly live, but it occurs to me that as all the sites are basically the same, the code is going to get more complicated to update as it will be duplicated, so if I need to do a bug fix on one site, I'll need to do the fix on all websites (and this is going to get complicated.)

I was wondering if it possible to somehow create a class library of all the current aspx.cs files, reference this dll in each website and then inherit these classes into the .aspx.cs files. So default.aspx in each site would still have a CodeFile of "Default.aspx.cs", but Default.aspx.cs would inherit the corresponing class from the dll:

using WebPagesClass;
public partial class _Default : WebPagesClass._Default
{ }

The reason for doing it like this is that if I need to change any code on a specific website (for minor changes in languages for instance), I can override the page functions and change the parts required. For all other pages which have not cha, I can just copy from a single website.Is this vaguely possible? If not anyone one got any killer suggestions of how to manage so many websites from a single codebase?

View 2 Replies

Class Library Can't Be Found?

Apr 19, 2010

I have a web Application and have created a seperate class library project.I am trying to use the Class Library by referencing it in the Web Application. I am doing this by right clicking the web application and clicking 'Add Reference...'. I then browse to my Class library and click ok. This gets added to a Bin folder in my web application.The problem is I can't actually get any of the objects that are in the Clas Library. I have tried adding a using statement to the top of the page. It tells me that the object could not be found (are you missing a using directive or an assembly reference?)Can anyone tell me what I'm doing wrong?

View 3 Replies

Get A File In Class Library?

Dec 30, 2010

i have a class library that get a xml file and read it and set some property from that data

may code is like:

[Code]....

the problem is this code is in class library and the file is in web form application.

View 1 Replies

Library Using That Provides Gmail() Class?

Mar 25, 2010

What library are you using that provides your Gmail() class?At a guess I would say its out of date and its trying to query a gmail api that is returning a different data set?If you post the address of the library then we can look and see if its up to date

View 5 Replies

Web Forms :: Use System.Drawing.Bitmap Class Into Other Class?

Oct 5, 2010

How can I to use System.Drawing.Bitmap class into athoer class?

using System.Data;
using System.Collections;
using System.Globalization;
using System.Data.SqlClient;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
namespace University
{
public class Class1
{
System.Drawing.Bitmap BMP=new System.Drawing .Bitmap();
}
}

when I use System.Drawing.Bitmap gives error this class does not exists

View 2 Replies

How To Create A Class Library Use SQL LINQ

May 24, 2010

i want create a class Library work with SQL Linq ,when i create a LINQ Data Class it automatic create some connectionString and use the database namemy question is can i change some settings that, use this class Library in difrent website with difrent connectionStrings?

View 6 Replies

C# - Consume Web Service In App From A Class Library?

Feb 16, 2011

My team and I have a asp.net web forms application and are using several class libraries. In one of those libraries, we are trying to consume a web service. The web reference was added in the web app project and the appropriate references have been added. The app compiles. When attempting to consume said web service in the class library, the credentials don't seem to work, and the call fails. However, if we take the web service call out of the class library, and consume it within the web app, it works.

View 5 Replies

How To Use Web Class Library From A Windows Project

Feb 19, 2011

I have a Web project in which I defined some methods to parse some webpages. I then save the retrieved data in a DB. Now I have run a lengthy operation(it may take 2 days) in which I continously parse webpage this way.

Can I use the webproject from a Windows project. If I try to add a refference to it it doesn't work. How should I do it? I have used until now an asp.net application, and done the calls to the parsing methods in the pageLoad event but after an hour or so the process stops.

View 1 Replies

C# - Can't Access Class Library In A Web Application

Feb 28, 2011

I have two projects in one solution :

Class Library for my BLL and DAL classes Web Application for my PL

Now I just use the keyword "using" in the BLL and DAL classes and get access to their methods easily. but now I try to reference the BLL and DAL in the web application project through the "using" keyword but it won't let me (the name space couldn't be found (are you missing reference ?)) .. then I tried to reference the library's dll (grabbed it from the ClassLibrary/bin/debug) and the same error just popped out again!

Summery:

My solution consists of two projects (ClassLibrary and a WebApplication) and I want to use/reference the classes/dlls of the class library in the web application

View 3 Replies

How To Debug The Custom Class Library

Feb 3, 2010

I have Web Service in Asp.Net Application, i create a break point in Web service. In the web service i create a instance for custom class library and call a method inside the Class library. When i run the Application i can able to debug the Web service that i create the break point, but i want to debug that custom class library code also how to deug this.

When i try to debug by add custom class library inside the current solution, but am unable to debug that custom class library code.

View 2 Replies

Page Code In Class Library

Dec 21, 2010

i create a class library and i want my code behind the page be there. in my page like login.aspx is a login control and i want to write some code for that but i got some error i don't know what i'm doing rong. the code behind in class library is:

[Code]....

and the codes in login.aspx page is:

[Code]....

after i buld the project the code behind doesn't find the MainLogin control

View 3 Replies

Image Directory In Class Library?

May 11, 2010

I have a class library that does e-commerce functionality including sending e-mails. I am trying to modify to allow a HTML alternate view e-mail that includes 2 jpgs.How can I accomplish this? Should I set up a Images folder? How do I access them?

View 5 Replies

C# - How To Access Method In Class Library

Jul 23, 2010

I've moved a class in my project into a class Library in the same solution. I've added a reference in the web project to the class library.

How do I access the methods in the class library?

View 2 Replies

Using A Response Object Within A Class Library

Dec 29, 2010

My problem today is that I am having trouble shifting some functionality, that is being used in multiple applications, from the applications themselves to a class library I have started building. The issue comes in the fact the code was written to utilize Response objects as seen below...

[Code]....

This is all currently within a function called "DownloadDocument". I continue to have issues running any of the Response object functionality. I usually get the error saying, "Response is not available in this context", is there anyway to use a Response object in a class library file?

View 4 Replies

Get TinyMVC .NET Class Library To Work On ASP?

Sep 23, 2010

I am trying to implement the TinyMCE Spellcheck plugin that uses GoogleSpell. The thing is I am trying to install it in an MVC environment. I started by referencing the .NET class Library DLL (MoxieCode.TinyMCE) in my project. Then, I added this code to my web.config:

<system.webServer>
<handlers>
<add name="TinyMCE" verb="GET,HEAD,POST" path="TinyMCE.ashx" type="Moxiecode.TinyMCE.Web.HttpHandler,Moxiecode.TinyMCE" />
</handlers>
<!--previously existing rules-->
<validation validateIntegratedModeConfiguration="false"/>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>

I then added these lines to my tinyMCE.init({}); call:

plugins: "spellchecker",
theme_advanced_buttons3: "spellchecker",
spellchecker_languages : "English=en",
spellchecker_rpc_url : "TinyMCE.ashx?module=SpellChecker",

These steps are outlined in the tutorial here. I then followed instructions from this stack overflow post which recommended the following modification to global.asax to make it mvc friendly:

routes.IgnoreRoute("TinyMCE.ashx");
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

Everything seems fine accept that when I browse to /TinyMCE.ashx i get this error:

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested URL: /TinyMCE.ashx

Why can't asp.net mvc process that url?

View 2 Replies

Access A WebMethod In Class Library?

Aug 8, 2010

I have a custom class library that performs validation. I want to open up this class for use within Javascript. I understand that I can easily achieve this by utilizing WebServices/WCF or by creating a function on my page with the WebMethod attribute, but it'd be nice not to have to set all that up for every project.

Ideally I'd like to just add the WebMethod attribute to my class library methods and then call them using Javascript.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved