473,387 Members | 1,899 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,387 software developers and data experts.

ASP.NET Class files served via web?

Hi everyone, I dont know if this is the correct place for this
question or not, but here it goes. I have multiple projects that I use
the same code for. I wanted to know if it was possible to load a class
file that is served over the web? i.e. in each project I can just load
from one source instead of copy and pasting the cs files all over the
place. There has got to be a way to do this, but I can not find a
resource on the web for information. Any help you can give me would be
appreciated, or if there is no way to do this and I am just barking up
the wrong tree, please let me know.
Thanks.

Martin Fowler

May 3 '07 #1
2 1002
Sure, just compile your code and business logic into a class library project,
and you can set a reference to the assembly from any web app and re-use it.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"ma***********@gmail.com" wrote:
Hi everyone, I dont know if this is the correct place for this
question or not, but here it goes. I have multiple projects that I use
the same code for. I wanted to know if it was possible to load a class
file that is served over the web? i.e. in each project I can just load
from one source instead of copy and pasting the cs files all over the
place. There has got to be a way to do this, but I can not find a
resource on the web for information. Any help you can give me would be
appreciated, or if there is no way to do this and I am just barking up
the wrong tree, please let me know.
Thanks.

Martin Fowler

May 3 '07 #2
<ma***********@gmail.comwrote in message
news:11**********************@e65g2000hsc.googlegr oups.com...
Hi everyone, I dont know if this is the correct place for this
question or not, but here it goes. I have multiple projects that I use
the same code for. I wanted to know if it was possible to load a class
file that is served over the web? i.e. in each project I can just load
from one source instead of copy and pasting the cs files all over the
place. There has got to be a way to do this, but I can not find a
resource on the web for information. Any help you can give me would be
appreciated, or if there is no way to do this and I am just barking up
the wrong tree, please let me know.
Instead of "serving class files" over the web, what most people do is create
a class library project, containing the classes you want to share. This can
the be referenced in several web sites.

Serving your code over the web would allow hackers to intercept the response
and return you whatever code they wanted you to run. Besides, it doesn't
work that way.
--
John Saunders [MVP]
May 3 '07 #3

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

Similar topics

3
by: Andy Fish | last post by:
Hi, in my ASP.NET web app, I have some config and data files. For convenience, I would like to keep them under the application root directory on the web server, but I don't want IIS to be able...
5
by: nick | last post by:
I need to create a simple asp.net application that use password protect some html pages. The html page provider doesn't know asp.net. And the host doesn't allow me to create user accounts. ...
6
by: Chris | last post by:
Are there any performance/general issues with putting classes in the .vb files in the app_code folder rather than compiling them into assemblies
0
by: premMS143 | last post by:
Hi Everyone, Wish u a Happy new year. I'm new to Flash. However know it lightly. I've 10 SWF files which was converted from powerpoint using 3rd party software. Now I want to create a Main...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.