创建个性化文件夹和页面 [英] creating personalize folder and page

查看:126
本文介绍了创建个性化文件夹和页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个可以注册使用的网站.我必须提供每个用户都可以创建其页面的功能.假设用户名是User1,站点URL是www.xxx.com,那么用户URL将是www.xxx.com/User1,我该怎么做.我需要任何想法,请帮助我.


在此先谢谢您.

Hi,
I have a web site where use can register. I have to provide a feature that every user can make his page. Suppose user name is User1 and site URL is www.xxx.com so user url will be www.xxx.com/User1 how can I do that. I need any kind of idea Please help me.


Thanks in advance.

推荐答案

尝试个性化和ASP.NET 2.0中的用户配置文件 [^ ]

使用 URL重写 [ C#中的开源内容管理系统(CMS) [
Try Personalization and User Profiles in ASP.NET 2.0[^]

Use URL rewriting[^]

Hopefully enough to get you started...

You could consider using an existing CMS. Here is a list:
Open Source Content Management Systems (CMS) in C#[^]

umbraco and DotNetNuke are to my knowledge well supported, and comes with a ton of functionality ...



Regards
Espen Harlinn


首先,无论如何都要这样做完全是个坏主意:相反,请在您的根目录下建立一个名为"Users"的文件夹,然后将文件放在其中.
如果只是将用户文件放在根目录中:
Firstly, it''s a bad idea to do it exactly like that anyway: Instead set up a folder off your root called (say) "Users" and put the files in there.
If you just put user files in your root:
User: "User1"
File: "User1.html" or "user1.aspx"

然后,当有人以登录"或默认"用户身份登录时会发生什么?

如果您使用单独的目录,则应该可以更安全地工作.

下一步我要做的方式(是我可疑的类型)无论如何都不是向他们提供对服务器文件结构的直接访问:要加载文件,请将其粘贴到文本框中,然后将您的软件文件粘贴到用户名以及相应的扩展名.

我还将考虑将每个用户文件保存在名为他的用户名的单独目录中(位于用户"下),并带有一个自定义的web.config,该文件仅允许您和该用户访问-这样他们就不会彼此烦恼.
因此,您最终会得到:

Then what happens when someone logs in as user "Login" or "Default"?

If you use a separate directory, then that should work a bit more securely.

Next The way I would do it (being the suspicious type I am) is not to provide them with direct access to the server file structure anyway: To load a file, paste it into a text box, and then your software files that under the user name with the appropriate extension.

I would also consider keeping each user file in a separate directory (under "users") called his username, with a custom web.config that allows access to you and that user only - so they can''t faff about with each others files.
So you would end up with:

\                             All your files for the site
   users                      Folder
      User1                   Folder
         web.config           Limit access to you and User1
         User1.html           The file they loaded
      User2                   Folder
         web.config           Limit access to you and User2
         User2.html           The file they loaded
      ...



[edit]我忘记了web.configs ... [/edit]



[edit]I forgot the web.configs...[/edit]


这篇关于创建个性化文件夹和页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆