473,397 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Web Control in separate project - Partially Solved

Everyone,

In order to promote code reuse, I've setup a web control (.ascx) in a
standalone vs.net project. I can then reference this project in any web
application. The trick is to setup a virtual directory that points to the
location of the web control in each parent application.

The issue is that IIS doesn't seem to like this. The error I receive is:

It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level. This error
can be caused by a virtual directory not being configured as an application
in IIS.

The only way I've found around this is to modify the machine.config file and
remove attributes from sections.

Has anyone ever solved this issue? I have checked and re-checked that all
folders are correctly registered as IIS applications.

Thanks,
Jim Christiano
Jul 21 '05 #1
1 1513
This doesn't really answer your question, but a much nicer way to do this
would be to create a server control and place it in a GAC'd assembly.
Alternatively you could create a similar result by using a skinned web
control, and again placing the actual server control in a GAC'd assembly.
This would eliminate the problems as the DLL would be in the GAC and hence
accessible to the applications.

Web controls are generally intended for code-reuse within an application. If
you want to use it cross application, then server controls are usually a
better option.

Hope this helps,

--
Regards

Tim Stephenson MCSD.NET
Charted MCAD & MCSD.NET Early Achiever
"Jim Christiano" <jc*********@divalsafety.com> wrote in message
news:%2********************@TK2MSFTNGP11.phx.gbl.. .
Everyone,

In order to promote code reuse, I've setup a web control (.ascx) in a
standalone vs.net project. I can then reference this project in any web
application. The trick is to setup a virtual directory that points to the
location of the web control in each parent application.

The issue is that IIS doesn't seem to like this. The error I receive is:

It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

The only way I've found around this is to modify the machine.config file and remove attributes from sections.

Has anyone ever solved this issue? I have checked and re-checked that all
folders are correctly registered as IIS applications.

Thanks,
Jim Christiano

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Brian | last post by:
NOTE ALSO POSTED IN microsoft.public.dotnet.framework.aspnet.buildingcontrols I have solved most of my Server Control Collection property issues. I wrote an HTML page that describes all of the...
15
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update...
2
by: Tommy | last post by:
I'm using VB.NET 2003 I have started a new project. I have subclassed each control I plan on using in my project, text box, tab control, etc... I have a base form then I have created an...
1
by: Jim Christiano | last post by:
Everyone, In order to promote code reuse, I've setup a web control (.ascx) in a standalone vs.net project. I can then reference this project in any web application. The trick is to setup a...
2
by: john | last post by:
Maybe I haven't had that "a-ha" moment yet, but I think the new approach to web projects is a step in the wrong direction. My main beef is that control over the assembly generation process has...
3
by: LurfysMa | last post by:
I would like to hear opinions on the tradeoffs of putting the tables, forms, and queries for several related datasets in separate databases vs one combined database. I am working on an...
3
by: Peter | last post by:
Hi, I have a project with an MDI parent form (Main), which can contain any number of MDI children (Document). The Document form contains several user controls, designed as separate projects and...
0
by: Larry R | last post by:
I have a wizard control that has a varying number of steps. Each step utilizes different custom business objects and populates values. The steps are partially determined at the beginning of the...
3
by: stumorgan | last post by:
Basically what I have is a form with a graph on it which graphs data that I'm reading from a USB device at 100 Hz (every 10ms). I have a thread reading and parsing the data from the USB, but when...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.