473,803 Members | 2,949 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to develop a blog or personalized site with ASP.NET 2.0

I plan to use ASP.NET to develop a blog or replicator site, I want to
use http://www.domainname.com/user1/ http://www.domainname.com/user2/
....... to represent each user's personal blog.
Here the user1, user2 .... mean (1) Virtual directory of IIS (2) Physical
folder in
file system (3) Fake url and ISAPI will parse it as a parameter?
If it's (1) or (2) then any limitation of the total folder number in the
system?
if it's (3), how to create the customized ISAPI?

The second question is how to store user-uploaded file in file system in a
web
farm environment?

Thanks.
Feb 3 '06 #1
6 1900
Dan
I would approcah it like this:

1) If you want the directory style url www.blah.com/user1/ then yes isapi
filter it so in reality it runs off page user.aspx?id=9 for example
-ISAPI filtering is surprisingly easy in .net i made one to do what you
need in 10mins, including time to learn it and then code it. Search the web
there are plenty of simple tutorials on it

2) For the uploadef files i would make an interface for the user using the
html file control......yo u could go the ftp route as an alternative.... ..and
then change the file names as they are uploaded. So for example user uploads
image JohnAtTheGame.j pg , and you change this to image1.jpg, then create a
directory (i find it best when based on the id number) so say create
directory called 10 (the users id), then a sub directory called images (if
it doesnt exist - just to be neat) and then save the image there.

So then to read back in your user.aspx file when it retrieves the blog for
user with id=9 you simply go to
http://www.mydomain.com/users/9/images/image1.jpg to show his image.

Also i usually store the folder location in the database, or in an xml file
if such as in this case all users will be in the same place. Then when
reading back you read from the xml file the users directory location, in
this case i called it 'users'. And your code knows to look in there for a
folder with that users id as its name. And as you kept the images named to a
convention by renaming you know the images in there will be image1.jpg,
image2.jpg etc etc so you can easily generate a page to display them at will
with code such as:

for(int i=1; i<maxNumImages ; i++)
{
int imageNum = i;
string theImage = "image" + imageNum + ".jpg";
Response.Write( "<img src=" + theImage + ">");

}

And the same would apply for blogs of text. This method can be epanded to do
loads of extras but the best part is you dynamically build an easy to read
directory structure, all permissions can be made using the aspx code, and
its completely scalable to as many images as you like.

Hope that helps?
--
Dan
"RedHair" <re*****@ms40.u rl.com.tw> wrote in message
news:uu******** *****@TK2MSFTNG P12.phx.gbl...
I plan to use ASP.NET to develop a blog or replicator site, I want to
use http://www.domainname.com/user1/ http://www.domainname.com/user2/
...... to represent each user's personal blog.
Here the user1, user2 .... mean (1) Virtual directory of IIS (2) Physical
folder in
file system (3) Fake url and ISAPI will parse it as a parameter?
If it's (1) or (2) then any limitation of the total folder number in the
system?
if it's (3), how to create the customized ISAPI?

The second question is how to store user-uploaded file in file system in a
web
farm environment?

Thanks.

Feb 3 '06 #2
Thanks for your quick reply.
Regarding to the (2) solution, is there any total folder number limitation
in
Windows file system? beacuse program need to create physical directory.
Btw, if the www.mydomain.com is a web farm environment, then I need to
create directory in each web server.
"Dan" <dv*******@aol. com> ¼¶¼g©ó¶l¥ó·s»D: e4************* *@TK2MSFTNGP09. phx.gbl...
I would approcah it like this:

1) If you want the directory style url www.blah.com/user1/ then yes isapi
filter it so in reality it runs off page user.aspx?id=9 for example
-ISAPI filtering is surprisingly easy in .net i made one to do what you
need in 10mins, including time to learn it and then code it. Search the
web there are plenty of simple tutorials on it

2) For the uploadef files i would make an interface for the user using the
html file control......yo u could go the ftp route as an
alternative.... ..and then change the file names as they are uploaded. So
for example user uploads image JohnAtTheGame.j pg , and you change this to
image1.jpg, then create a directory (i find it best when based on the id
number) so say create directory called 10 (the users id), then a sub
directory called images (if it doesnt exist - just to be neat) and then
save the image there.

So then to read back in your user.aspx file when it retrieves the blog for
user with id=9 you simply go to
http://www.mydomain.com/users/9/images/image1.jpg to show his image.

Also i usually store the folder location in the database, or in an xml
file if such as in this case all users will be in the same place. Then
when reading back you read from the xml file the users directory location,
in this case i called it 'users'. And your code knows to look in there for
a folder with that users id as its name. And as you kept the images named
to a convention by renaming you know the images in there will be
image1.jpg, image2.jpg etc etc so you can easily generate a page to
display them at will with code such as:

for(int i=1; i<maxNumImages ; i++)
{
int imageNum = i;
string theImage = "image" + imageNum + ".jpg";
Response.Write( "<img src=" + theImage + ">");

}

And the same would apply for blogs of text. This method can be epanded to
do loads of extras but the best part is you dynamically build an easy to
read directory structure, all permissions can be made using the aspx code,
and its completely scalable to as many images as you like.

Hope that helps?
--
Dan
"RedHair" <re*****@ms40.u rl.com.tw> wrote in message
news:uu******** *****@TK2MSFTNG P12.phx.gbl...
I plan to use ASP.NET to develop a blog or replicator site, I want to
use http://www.domainname.com/user1/ http://www.domainname.com/user2/
...... to represent each user's personal blog.
Here the user1, user2 .... mean (1) Virtual directory of IIS (2) Physical
folder in
file system (3) Fake url and ISAPI will parse it as a parameter?
If it's (1) or (2) then any limitation of the total folder number in the
system?
if it's (3), how to create the customized ISAPI?

The second question is how to store user-uploaded file in file system in
a web
farm environment?

Thanks.


Feb 3 '06 #3
Dan
Hi again

Not sure why you think there is a folder limitation, i dont believe there is
to my knowledge. I use this method to store products this way on an
ecommerce site. Some of the directories are packed with sub directories so
no problems thus far? Do let me know if you hear of a problem though as i
would be interested.

And yes on a web farm you will need to create the directory on each server
at upload.

--
Dan
"RedHair" <re*****@ms40.u rl.com.tw> wrote in message
news:e$******** ******@TK2MSFTN GP12.phx.gbl...
Thanks for your quick reply.
Regarding to the (2) solution, is there any total folder number limitation
in
Windows file system? beacuse program need to create physical directory.
Btw, if the www.mydomain.com is a web farm environment, then I need to
create directory in each web server.
"Dan" <dv*******@aol. com>
¼¶¼g©ó¶l¥ó·s»D: e4************* *@TK2MSFTNGP09. phx.gbl...
I would approcah it like this:

1) If you want the directory style url www.blah.com/user1/ then yes isapi
filter it so in reality it runs off page user.aspx?id=9 for example
-ISAPI filtering is surprisingly easy in .net i made one to do what you
need in 10mins, including time to learn it and then code it. Search the
web there are plenty of simple tutorials on it

2) For the uploadef files i would make an interface for the user using
the html file control......yo u could go the ftp route as an
alternative.... ..and then change the file names as they are uploaded. So
for example user uploads image JohnAtTheGame.j pg , and you change this to
image1.jpg, then create a directory (i find it best when based on the id
number) so say create directory called 10 (the users id), then a sub
directory called images (if it doesnt exist - just to be neat) and then
save the image there.

So then to read back in your user.aspx file when it retrieves the blog
for user with id=9 you simply go to
http://www.mydomain.com/users/9/images/image1.jpg to show his image.

Also i usually store the folder location in the database, or in an xml
file if such as in this case all users will be in the same place. Then
when reading back you read from the xml file the users directory
location, in this case i called it 'users'. And your code knows to look
in there for a folder with that users id as its name. And as you kept the
images named to a convention by renaming you know the images in there
will be image1.jpg, image2.jpg etc etc so you can easily generate a page
to display them at will with code such as:

for(int i=1; i<maxNumImages ; i++)
{
int imageNum = i;
string theImage = "image" + imageNum + ".jpg";
Response.Write( "<img src=" + theImage + ">");

}

And the same would apply for blogs of text. This method can be epanded to
do loads of extras but the best part is you dynamically build an easy to
read directory structure, all permissions can be made using the aspx
code, and its completely scalable to as many images as you like.

Hope that helps?
--
Dan
"RedHair" <re*****@ms40.u rl.com.tw> wrote in message
news:uu******** *****@TK2MSFTNG P12.phx.gbl...
I plan to use ASP.NET to develop a blog or replicator site, I want to
use http://www.domainname.com/user1/ http://www.domainname.com/user2/
...... to represent each user's personal blog.
Here the user1, user2 .... mean (1) Virtual directory of IIS (2)
Physical folder in
file system (3) Fake url and ISAPI will parse it as a parameter?
If it's (1) or (2) then any limitation of the total folder number in the
system?
if it's (3), how to create the customized ISAPI?

The second question is how to store user-uploaded file in file system in
a web
farm environment?

Thanks.



Feb 3 '06 #4
Scott Mitchell wrote some time ago a simple blog. Check it out here: http://scottonwriting.net/sowblog/posts/5018.aspx

Sonu Kapoor [MVP]
---
Posted via www.DotNetSlackers.com
Feb 3 '06 #5
Thanks again.
I just want make sure there is no problem in file system, because when the
amount
of directories and files increase dramatically, the I/O of disk could be a
potential issue.
Besides,, if my web farm contains 10 web servers, when user uploaded a file
via
web1, the program is able to create directory and store file in the local
file system, but it
also needs to create directory and copy file to other remote 9 web servers.
Everytime when I add new web server into the web farm, I need to copy all
existing
directories and files to the new server and change the program. And the new
server only
shares the http requests but not the I/O of local HD, because all web server
will have same
copy of the directories and files no matter its size already grow very
large.

My preferred solution is to have a independent (to web server) ,separate and
centralized file
server or database for file storage purpose only, then if the load of http
requests increase, I
just add new web server into web farm, if the bottle neck is file I/O issue,
I just add new file or
db server, any comment on this idea?

Btw, the customized ISAPI filter has any performance issue, because I can't
find any sample
or toturials but lots of commerical product.

"Dan" <dv*******@aol. com> ¼¶¼g©ó¶l¥ó·s»D: e5************* *@TK2MSFTNGP09. phx.gbl...
Hi again

Not sure why you think there is a folder limitation, i dont believe there
is to my knowledge. I use this method to store products this way on an
ecommerce site. Some of the directories are packed with sub directories so
no problems thus far? Do let me know if you hear of a problem though as i
would be interested.

And yes on a web farm you will need to create the directory on each server
at upload.

--
Dan
"RedHair" <re*****@ms40.u rl.com.tw> wrote in message
news:e$******** ******@TK2MSFTN GP12.phx.gbl...
Thanks for your quick reply.
Regarding to the (2) solution, is there any total folder number
limitation in
Windows file system? beacuse program need to create physical directory.
Btw, if the www.mydomain.com is a web farm environment, then I need to
create directory in each web server.
"Dan" <dv*******@aol. com> ¼¶¼g©ó¶l¥ó·s»D: e4************* *@TK2MSFTNGP09. phx.gbl...
I would approcah it like this:

1) If you want the directory style url www.blah.com/user1/ then yes
isapi filter it so in reality it runs off page user.aspx?id=9 for
example
-ISAPI filtering is surprisingly easy in .net i made one to do what
you need in 10mins, including time to learn it and then code it. Search
the web there are plenty of simple tutorials on it

2) For the uploadef files i would make an interface for the user using
the html file control......yo u could go the ftp route as an
alternative.... ..and then change the file names as they are uploaded. So
for example user uploads image JohnAtTheGame.j pg , and you change this
to image1.jpg, then create a directory (i find it best when based on the
id number) so say create directory called 10 (the users id), then a sub
directory called images (if it doesnt exist - just to be neat) and then
save the image there.

So then to read back in your user.aspx file when it retrieves the blog
for user with id=9 you simply go to
http://www.mydomain.com/users/9/images/image1.jpg to show his image.

Also i usually store the folder location in the database, or in an xml
file if such as in this case all users will be in the same place. Then
when reading back you read from the xml file the users directory
location, in this case i called it 'users'. And your code knows to look
in there for a folder with that users id as its name. And as you kept
the images named to a convention by renaming you know the images in
there will be image1.jpg, image2.jpg etc etc so you can easily generate
a page to display them at will with code such as:

for(int i=1; i<maxNumImages ; i++)
{
int imageNum = i;
string theImage = "image" + imageNum + ".jpg";
Response.Write( "<img src=" + theImage + ">");

}

And the same would apply for blogs of text. This method can be epanded
to do loads of extras but the best part is you dynamically build an easy
to read directory structure, all permissions can be made using the aspx
code, and its completely scalable to as many images as you like.

Hope that helps?
--
Dan
"RedHair" <re*****@ms40.u rl.com.tw> wrote in message
news:uu******** *****@TK2MSFTNG P12.phx.gbl...
I plan to use ASP.NET to develop a blog or replicator site, I want to
use http://www.domainname.com/user1/ http://www.domainname.com/user2/
...... to represent each user's personal blog.
Here the user1, user2 .... mean (1) Virtual directory of IIS (2)
Physical folder in
file system (3) Fake url and ISAPI will parse it as a parameter?
If it's (1) or (2) then any limitation of the total folder number in
the system?
if it's (3), how to create the customized ISAPI?

The second question is how to store user-uploaded file in file system
in a web
farm environment?

Thanks.



Feb 3 '06 #6
Thanks, I'll try it.

<Sonu Kapoor> ¼¶¼g©ó¶l¥ó·s»D: uU************* *@TK2MSFTNGP09. phx.gbl...
Scott Mitchell wrote some time ago a simple blog. Check it out here:
http://scottonwriting.net/sowblog/posts/5018.aspx

Sonu Kapoor [MVP]
---
Posted via www.DotNetSlackers.com

Feb 3 '06 #7

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

Similar topics

2
1779
by: Tyler Lyon | last post by:
I am trying to find a free script that allows a user to register and login to their own personalized page that was automatically created when the user registered. I am creating a website where the users can access their personal page by logging in and on that page they can find correspondence and their history with me, etc. Can you please help me with finding a free script that does all of this? Thanks in advance, Tyler
1
3016
by: Frogbèrt | last post by:
Config: Win2K, IIS5.0 My solution requires that the host header sent to IIS be analyzed. I have set up a web site that responds to both www.domain.com and domain.com. In DNS, both a WWW and a * A record exist, so either www.domain.com or domain.com gets directed to the same web site. However, I wish for whatever.domain.com to point to the same web site and for my ASP page to analyze the URL to determine what (if any) was entered BEFORE...
4
1888
by: John | last post by:
Greetings, all, Several days after adding personalized URLs to my "amazing" collection of "God Loves (yourname)" mazes, it occurred to me that if someone were to create an offcolor term, then copy the URL to his own web page, that I might be penalized because my page would include that text on the resulting page. For example, let's say that "GOD LOVES JOKES" has negative connotations. Someone could create:
2
1537
by: Luis E Valencia | last post by:
I want a row of the datagrid with a personalized link. The fields of the link are on the select related to the datagrid the link would be accoiones.aspx?iddireccion=2&idindicador=5 I tried this but doesnt work <ItemTemplate> <asp:HyperLink runat="server" id="Hyperlink2" NavigateUrl='acciones.aspx?iddireccion='<%# DataBinder.Eval(Container,"DataItem.iddireccion"%>'&idindicador='<%#
5
2146
by: Kamil Tezduyar | last post by:
I want to create a team to develop a web portal framework. The main purpose of this framework is reusing this in many projects. The major idea in my mind it, building it as much as flexible. We will create the framework with the combinations of the team members. This development will be online and we will use online source controls for both code, and documentation. I think 5 asp.net experienced team member is enough for this project. I...
1
1574
by: Michael | last post by:
Hello, Does anyone know how to create a personalized url? For example, I would like my site http://www.mysite.com to offer it's users the ablity to create personalized urls like http://myname.mysite.com Does anyone know how I can do that via code? So it will be automated when the user creates an account. Thanks.
1
3489
by: judacris | last post by:
I've seen the threads here about molding 2 divs in a centered fashion. but I can't seem to solve this thing. my blogger blog is functioning well on my site for now, but the blog feed (left) and the sidebar (right) doesn't center here's the css i'm modifying to center it. i apologise for the mess. <html> <head> <title>cris-kun's 'Blog - www.puff-x.com</title> <$BlogMetaData$>
2
1037
nomad
by: nomad | last post by:
An employee that was working on the project left, I got the task to rework some blog pages in WordPress. I have some exp. working with WordPress and PHP. but I hve no ideal how to do the following: I do... I place a blog in an exist blog page. ie this blog page is simular to an HTML page but has NO place where people can write their thoughts about it. An example would be nice, or if you can give me a link where I can do this that would be...
3
1361
by: Pam1234 | last post by:
Hi everyone, This is a broad question but I'm hoping someone can steer me in the right direction. I can write valid xhtml strict in the dark with my eyes shut but I'm a trial-and-error person when it comes to PHP. For that reason I'll require concrete examples if possible. I've installed and modified plenty of Joomla sites, I can wade through existing PHP code with some degree of success, and I do know how to set up a database in MySQL at...
0
9703
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9566
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10555
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10317
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10300
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10069
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6844
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5503
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4277
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.