Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to develop a blog or personalized site with ASP.NET 2.0

Reply
Thread Tools

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

 
 
RedHair
Guest
Posts: n/a
 
      02-03-2006
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.


 
Reply With Quote
 
 
 
 
Dan
Guest
Posts: n/a
 
      02-03-2006
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......you 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.jpg , 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" <> wrote in message
news:...
>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.
>
>



 
Reply With Quote
 
 
 
 
RedHair
Guest
Posts: n/a
 
      02-03-2006
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" <> 级糶秎ン穝籇: bl...
>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......you 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.jpg , 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" <> wrote in message
> news:...
>>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.
>>
>>

>
>



 
Reply With Quote
 
Dan
Guest
Posts: n/a
 
      02-03-2006
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" <> wrote in message
news:e$...
> 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" <>
> 级糶秎ン穝籇: bl...
>>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......you 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.jpg , 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" <> wrote in message
>> news:...
>>>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.
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Sonu Kapoor
Guest
Posts: n/a
 
      02-03-2006
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
 
Reply With Quote
 
RedHair
Guest
Posts: n/a
 
      02-03-2006
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" <> 级糶秎ン穝籇: bl...
> 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" <> wrote in message
> news:e$...
>> 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" <> 级糶秎ン穝籇: bl...
>>>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......you 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.jpg , 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" <> wrote in message
>>> news:...
>>>>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.
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
RedHair
Guest
Posts: n/a
 
      02-03-2006
Thanks, I'll try it.

<Sonu Kapoor> 级糶秎ン穝籇: bl...
> 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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
hi its a very useful blog visit this blog gikklu C Programming 0 11-24-2009 04:15 PM
New Blog form Net Programing and Blog IT competition zegga ASP .Net 0 08-01-2009 05:38 AM
have a look at my blog site for asp.net .. there is microsoft contest also ( u can win so much)have a look at my blog site for asp.net .. there is microsoft contest also ( u can win so much) justpratik Python 0 06-08-2007 04:48 AM
Developing/Deploying a site that has personalized pages theBlindRef ASP .Net 1 11-21-2006 09:21 AM
blog blog blog John Computer Information 0 02-13-2005 10:20 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57