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


Similar Messages:

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# - Project Is Not Recognising One Of The Folders In Class Library?

May 27, 2010

I am developing a project using Visual Studio 2008 in C#, I have added the class library within the project and set up the relevant references and used the relevant using statements.

this is the error message:

Error 28 The type or namespace name
'Domain' does not exist in the
namespace 'Forestry.SchoolLibrary'
(are you missing an assembly
reference?) C:ProjectsSchoolofForestry runkSourceSchoolAccountPresenterEditAccountPresenter.cs 26 40 School

these are my using statements:

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Data.Linq;
using System.Text;
using System.Xml;
using Forestry.SchoolLibrary.Core.Domain;
using Forestry.SchoolLibrary.Properties;

View 2 Replies

C# - How To Add A Reference To A Web Application Project In An Associated Class Library

May 13, 2010

I'm working on an internet application that has been set up as a web SITE project (I know...) in Visual Studio. I need to add additional features/functionality so have added a class library to the project and referred to it in the main web site project.

The issue now arises because I need to make use of core objects which live inside the App_Code directory in the web site project but this project doesn't appear to expose its DLL like web app/ code library projects do. Because of this I can't add a reference to the web site project in the class library to leverage the common site-wide code/objects.

I can't move the stuff out of App_Code so I'm looking for a way to refer to the website project dll from the new class library.

View 3 Replies

Asp.net - Moving Functionality To A Class Library Project ?

Mar 30, 2011

I have a .net project whose part of the functionality is xls transformation. I now want to move that functionality away from the main project to a separate class library project.

I have no problems moving classes and accessing them, but part of the resources that I wanted to move were xslt files that define the transformations. Those files were originally located in the special asp.net folder: App_Data and then accessed using Server.MapPath(~/App_Data/XSLT/anXsltFile.xslt)

I wanted to move those files to that separate library as well, but not sure how to approach it, and how to access those files within the class library.

View 4 Replies

WCF / ASMX :: Use Webservice In Class Library Project?

Oct 3, 2010

I've created class library project and added service reference to webservice. When i try to use webservice object am not able to access webservice methods.

myservice proxy=new myservice();
proxy.( no methods are coming)?

View 2 Replies

C# - Using NHibernate In A Class Library For Both Web And Windows Applications?

Mar 8, 2011

I just changed my NHibernate application to use the Unit of Work pattern. I then continued through this tutorial to the part where it starts using HttpContext to determine whether or not the code is running in an web application. Using Visual Studio 2010 I get the error "The name 'HttpContext' does not exist in the current context". So I added a reference to System.Web and imported the namespace. The sample code then checks whether or not HttpContext.Current is null to determine whether this is a web or windows application. Is this the best way of doing that?

View 2 Replies

VS 2008 Adding Css File To Class Library Project?

Jan 10, 2011

I have a custom gridview control which is a class library project.I want to be able to specify the css class for the gridview which I can do.But I also want to set a default css stylesheet to the gridview. So if I don't override it using the cssclass property it must get it's cssclass from the default stylesheet I have in my project.

How can I specify the default stylesheet. I have a stylesheet in a folder called "Styles" in my project.

View 4 Replies

How To Make The Setting Works For Class Library Project In C# 2.0

Jan 29, 2010

I am putting the setting under the property of one of my C# Class Library project for app setting:

EUCAccountService_ConnectionString
EUCTelcoDB_ConnectionString

In the development, it works nicely. Until I deported to production, I realise that the component that use those thing .. it just hang. I found that under BIN when it compiled dewaCorp.EUC.TelcoDB.Data.dll.config and open up that file and turn out nothing.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
</configuration>

How to make this works? I thought by compiling it, it turned to some sort config file or something. But it didn't.

View 2 Replies

How To Access Session Object Outside The Web Project (class Library)

Oct 29, 2010

I am implementing a custom membership and role providers where I need to store all the role/membership information in the user's session.

I am implementing these custom providers inside a class library project (different from the website project) and need to access the session in them. The idea is to store the role/membership related information in the session after retrieving them for the first time from the database.

When I try to access the Session using System.Web.HttpContext.Current.Session

I get this as a null object (Object reference not set to an instance of an object.

Why is the session turning out to be null?

View 1 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

Architecture :: Creating Each Class Library Project For Interface?

Jan 11, 2010

weather to create each class libaray project for Interface, Service, Model, DTO, Repository ?

View 1 Replies

C# - Using Web Service In Class Library Which Is Referenced In The Website Project Of Same Solution?

Nov 18, 2010

How to access proxy class of a web service which has been referenced in the website project of a solution within a class library project in the same solution?

I mean no web-service reference/setting is added to the class library and instead it needs to be picked from the web project.

View 1 Replies

Visual Studio :: Code Behind Page Not Recognizing Class Library Project?

Jun 11, 2010

I've got an ASP.NET 4 web forms application I'm building in Studio 2010. The solution has two projects. A web forms application and a class library. I have added a reference to the class libraryr project in the web forms project, but when I go a code behind page in the web forms project, it does not recognize the class from the class library and throws the "type or namespace <class> could not be found ...." error. Adding a using <class library projec> does not work either as it does not recognize that.

What am I missing?

View 8 Replies

Folder / Contents Of Class Library Appearing In Website Project Of Web Application

Oct 8, 2010

When I make an asp.net web application and add class libraries to the solution, the website project itself has a folder with the same name/contents as the class library.

Eg I make a web application called Test, add a project which is a class library, to the solution, called testAbc, and then there is a folder at the root of the website project called testAbc with the contents of the class lib.

View 4 Replies

Folder / Contents Of Class Library Appearing In Website Project Of Web Application?

Feb 14, 2010

When I make an asp.net web application and add class libraries to the solution, the website project itself has a folder with the same name/contents as the class library.

Eg I make a web application called Test, add a project which is a class library, to the solution, called testAbc, and then there is a folder at the root of the website project called testAbc with the contents of the class lib.

I read why this happens in a book a while ago but can't quite remember now.

View 1 Replies

Visual Studio :: Call To The Class Library From The Windows Form Application Works Fine?

Aug 12, 2010

I have a windows service that calls a class library. The call to the Class library from the windows form application works fine. But from the service I do get the desired output. The event viewer does not report any error. The service was working fine until the recently when the server got remastered. Any suggestions what might have gone wrong?

View 2 Replies

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

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 :: 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 :: Accessing Web Service In Dll From Unit Test Project?

May 25, 2010

I am not able to override the design-time URL of a webservice in my web config.

I must be doing something stupid

My Dll is called SMSLibrary2X which has a web reference to a UserService web service like this (taken from the app.config of the dll:

<setting name="SMSLibrary2x_TAMService_UserService" serializeAs="String">
<value>https://devss.ourdomain.ca:4452/UserService.asmx</value>
</setting>

, however, in the web reference, the URL property is [URL]

As I understand it, the app.config for the DLL is not really pertinent, except perhaps to copy the setting into the app.config of the unit test project.

So, In the SMSLibrary2xTests web.config file, I have this:

[Code]....

However when my unit tests run, always pick up the URL of the web service that I defined when I added the Web Reference to the SMSLibrary2x DLL project, which is fine for design time, but not appropriate when I want to point to different versions at deploy time (dev, QA, prod, etc). I just can't seem to get it to pick up the proper URL.

View 5 Replies

C# - How To Create A Dll File - Showing An Error / "a Project With Output Type Of Class Library Cannot Be Started Directly"

May 23, 2010

Using Visual Studio 2005

I have list of class files, when i try to run the class files, it showing error as
"a project with output type of class library cannot be started directly"

How to run the class file? How to create a dll file.

View 5 Replies

Configuration :: Deploying The Project In Windows Server 2008 (iis 7)

May 11, 2010

I have a website build with .Net 2.0 Framework, I tried to deploy it in iis 7 ( Windows Server 2008 ). I get the following error when i browse the project. Server Error in '/' Application. Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Your application is not running with full trust. Please call AspxLab.WebControls.Runtime.Initialize to manually initialize AspxLab Controls runtime environment. Source Error:

[Code]....

Stack Trace:

[Code]....

[SecurityException: Your application is not running with full trust. Please call AspxLab.WebControls.Runtime.Initialize to manually initialize AspxLab Controls runtime environment.]

a..ctor() +540
az..cctor() +140

Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927

View 3 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







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