同一个webroot中的2个项目 [英] 2 projects in same webroot

查看:49
本文介绍了同一个webroot中的2个项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在同一个WEbRoot中有2个项目。每个项目都有自己的子目录。

项目#1:/ Journal /''< - 匿名

/ Journal / Admin /''< - WebForm身份验证每个网页



项目#2:/收据/''< ---匿名

/收据/ Admin /''< ---每个网站的WebForm身份验证

页面

我有一个Web.Config文件,可以完美地用于表单身份验证。但是我/ b $ b真的不知道如何为我的第二个项目增加安全性。我问这个

因为托管服务器只允许webroot中的一(1)个web.Config文件

文件夹...我给你看我现在的Web.Config文件。这两个项目必须具有

不同的登录页面,如果可能的话,还有不同的自定义错误页面......它们是

完全不同的主题和设计。

<?xml version =" 1.0"编码= QUOT; UTF-8英寸?>

< configuration>


< system.web>

< pages validateRequest =" false" />

< compilation defaultLanguage =" vb"调试= QUOT;真" />

< customErrors mode =" On" defaultRedirect =" Journal / Err.aspx">

< error statusCode =" 404"重定向= QUOT;期刊/ Err.aspx" />

< error statusCode =" 403"重定向= QUOT;期刊/ Err.aspx" />

< / customErrors>

< authentication mode =" Forms">

< forms loginUrl ="轴颈/管理/的Login.aspx" path =" /">

< / forms>

< / authentication>

< /system.web>

< location path =" Journal / Admin">

< system.web>

< authorization>

< deny users ="?" />

< / authorization>

< /system.web>

< / location>


< / configuration>

我认为唯一可以在主要位置添加某种位置

< configuration>标签 。我正朝着正确的方向前进?

谢谢

弗朗索瓦


I''ve 2 projects in same WEbRoot. Each project has is own Subdirectory.
Project #1: /Journal/ ''<-- Anonymous
/Journal/Admin/ '' <-- WebForm Authentication for each web
page

Project #2: /Recettes/ ''<--- Anonymous
/Recettes/Admin/ ''<--- WebForm Authentication for each web
page

I''ve a Web.Config file that work perfectly for Form authentication. But I
really don''t know how to add security for my second project. I ask this
because the hosting server only allow ONE (1) web.Config file in webroot
folder... I show you my present Web.Config file. The two project must have
distinct login page and if possible distinct custom error page... They are
completly different in subject and design.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>

<system.web>
<pages validateRequest="false" />
<compilation defaultLanguage="vb" debug="true" />
<customErrors mode="On" defaultRedirect="Journal/Err.aspx">
<error statusCode="404" redirect="Journal/Err.aspx" />
<error statusCode="403" redirect="Journal/Err.aspx" />
</customErrors>
<authentication mode="Forms">
<forms loginUrl="Journal/admin/Login.aspx" path="/">
</forms>
</authentication>
</system.web>
<location path="Journal/Admin">
<system.web>
<authorization>
<deny users ="?" />
</authorization>
</system.web>
</location>

</configuration>
The only thing I think is to add some kind of location to the main
<configuration> tag . I''m in the right direction?
Thanks
Francois


推荐答案

" Francois Soucy" <滚装** @ 127.0.0.1>在消息中写道

新闻:%2 **************** @ TK2MSFTNGP10.phx.gbl ...
"Francois Soucy" <Ro**@127.0.0.1> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
我'在同一个WEbRoot中有2个项目。每个项目都有自己的子目录。
项目#1:/ Journal /''< - 匿名
/ Journal / Admin /''< - 每个
网页的WebForm身份验证

项目#2:/ Recettes /''< ---匿名
/ Recettes / Admin /''< ---每个网页的WebForm身份验证页面

我有一个Web.Config文件,非常适合表单身份验证。但我真的不知道如何为我的第二个项目增加安全性。我问这个
因为托管服务器只允许webroot
文件夹中的ONE(1)web.Config文件...我给你看我现在的Web.Config文件。这两个项目必须有不同的登录页面,如果可能的话,还有不同的自定义错误页面...它们在主题和设计上完全不同。

<?xml version =" ; 1.0"编码= QUOT; UTF-8英寸?>
< configuration>
< system.web>
< pages validateRequest =" false" />
< compilation defaultLanguage =" vb"调试= QUOT;真" />
< customErrors mode =" On" defaultRedirect =" Journal / Err.aspx">
< error statusCode =" 404"重定向= QUOT;期刊/ Err.aspx" />
< error statusCode =" 403"重定向= QUOT;期刊/ Err.aspx" />
< / customErrors>
< authentication mode =" Forms">
< forms loginUrl =" Journal / admin / Login.aspx" path =" /">
< / forms>
< / authentication>
< /system.web>
< location path =" Journal / Admin">
< system.web>
< authorization>
< deny users ="?" />
< / authorization>
< /system.web>
< / location>

< / configuration>

我唯一想到的是在主要位置添加某种位置
< configuration>标签 。我正朝着正确的方向前进?
I''ve 2 projects in same WEbRoot. Each project has is own Subdirectory.
Project #1: /Journal/ ''<-- Anonymous
/Journal/Admin/ '' <-- WebForm Authentication for each web page

Project #2: /Recettes/ ''<--- Anonymous
/Recettes/Admin/ ''<--- WebForm Authentication for each web
page

I''ve a Web.Config file that work perfectly for Form authentication. But I
really don''t know how to add security for my second project. I ask this
because the hosting server only allow ONE (1) web.Config file in webroot
folder... I show you my present Web.Config file. The two project must have
distinct login page and if possible distinct custom error page... They are
completly different in subject and design.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>

<system.web>
<pages validateRequest="false" />
<compilation defaultLanguage="vb" debug="true" />
<customErrors mode="On" defaultRedirect="Journal/Err.aspx">
<error statusCode="404" redirect="Journal/Err.aspx" />
<error statusCode="403" redirect="Journal/Err.aspx" />
</customErrors>
<authentication mode="Forms">
<forms loginUrl="Journal/admin/Login.aspx" path="/">
</forms>
</authentication>
</system.web>
<location path="Journal/Admin">
<system.web>
<authorization>
<deny users ="?" />
</authorization>
</system.web>
</location>

</configuration>
The only thing I think is to add some kind of location to the main
<configuration> tag . I''m in the right direction?




你不能只是添加


< location path =" ;收据/管理员">

< / location>

-

John Saunders

johnwsaundersiii at hotmail



Can''t you just add

<location path="Recettes/Admin">
</location>
--
John Saunders
johnwsaundersiii at hotmail




" John Saunders" <乔************** @ notcoldmail.com>在消息中写道

news:************* @ TK2MSFTNGP12.phx.gbl ...

"John Saunders" <jo**************@notcoldmail.com> wrote in message
news:Of*************@TK2MSFTNGP12.phx.gbl...
" Francois Soucy" <滚装** @ 127.0.0.1>在消息中写道
新闻:%2 **************** @ TK2MSFTNGP10.phx.gbl ...
"Francois Soucy" <Ro**@127.0.0.1> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
我有2个项目在同一个WEbRoot中。每个项目都有自己的子目录。
项目#1:/ Journal /''< - 匿名
/ Journal / Admin /''< - 每个
I''ve 2 projects in same WEbRoot. Each project has is own Subdirectory.
Project #1: /Journal/ ''<-- Anonymous
/Journal/Admin/ '' <-- WebForm Authentication for each

的WebForm身份验证/> web


web

页面

项目#2:/ Recettes /''< ---匿名
/ Recettes / Admin /''< - - 每个
网页的WebForm身份验证

我有一个Web.Config文件,可以完美地用于表单身份验证。但是
我真的不知道如何为我的第二个项目增加安全性。我问这个
因为托管服务器只允许webroot
文件夹中的ONE(1)web.Config文件...我给你看我现在的Web.Config文件。这两个项目必须
有不同的登录页面,如果可能的话,还有不同的自定义错误页面......他们
在主题和设计方面完全不同。

<?xml version =" ; 1.0"编码= QUOT; UTF-8英寸?>
< configuration>
< system.web>
< pages validateRequest =" false" />
< compilation defaultLanguage =" vb"调试= QUOT;真" />
< customErrors mode =" On" defaultRedirect =" Journal / Err.aspx">
< error statusCode =" 404"重定向= QUOT;期刊/ Err.aspx" />
< error statusCode =" 403"重定向= QUOT;期刊/ Err.aspx" />
< / customErrors>
< authentication mode =" Forms">
< forms loginUrl =" Journal / admin / Login.aspx" path =" /">
< / forms>
< / authentication>
< /system.web>
< location path =" Journal / Admin">
< system.web>
< authorization>
< deny users ="?" />
< / authorization>
< /system.web>
< / location>

< / configuration>

我唯一想到的是在主要位置添加某种位置
< configuration>标签 。我正朝着正确的方向前进?
page

Project #2: /Recettes/ ''<--- Anonymous
/Recettes/Admin/ ''<--- WebForm Authentication for each web page

I''ve a Web.Config file that work perfectly for Form authentication. But I really don''t know how to add security for my second project. I ask this
because the hosting server only allow ONE (1) web.Config file in webroot
folder... I show you my present Web.Config file. The two project must have distinct login page and if possible distinct custom error page... They are completly different in subject and design.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>

<system.web>
<pages validateRequest="false" />
<compilation defaultLanguage="vb" debug="true" />
<customErrors mode="On" defaultRedirect="Journal/Err.aspx">
<error statusCode="404" redirect="Journal/Err.aspx" />
<error statusCode="403" redirect="Journal/Err.aspx" />
</customErrors>
<authentication mode="Forms">
<forms loginUrl="Journal/admin/Login.aspx" path="/">
</forms>
</authentication>
</system.web>
<location path="Journal/Admin">
<system.web>
<authorization>
<deny users ="?" />
</authorization>
</system.web>
</location>

</configuration>
The only thing I think is to add some kind of location to the main
<configuration> tag . I''m in the right direction?



你不能只是添加

< location path =" Recettes / Admin">
< / location>
-
John Saunders
johnwsaundersiii at hotmail



Can''t you just add

<location path="Recettes/Admin">
</location>
--
John Saunders
johnwsaundersiii at hotmail



是的我可以,但用户会被重定向到/Journal/Admin/login.aspx ...

我不想要这个。这两个项目的设计和目的各不相同。

尝试访问/ Recettes / Admin /中的页面的用户必须重定向到

/ Recettes / Admin / Login。 aspx

Francois


Yes I can but user will then be redirected to /Journal/Admin/login.aspx ...
I don''t want this. The two project ARE different in design and purpose.
Users that try to access a page in /Recettes/Admin/ MUST be redirected to
/Recettes/Admin/Login.aspx
Francois




" Francois Soucy" <滚装** @ 127.0.0.1>在消息中写道

新闻:%2 **************** @ TK2MSFTNGP10.phx.gbl ...

"Francois Soucy" <Ro**@127.0.0.1> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
我'在同一个WEbRoot中有2个项目。每个项目都有自己的子目录。
项目#1:/ Journal /''< - 匿名
/ Journal / Admin /''< - 每个
网页的WebForm身份验证

项目#2:/ Recettes /''< ---匿名
/ Recettes / Admin /''< ---每个网页的WebForm身份验证页面

我有一个Web.Config文件,非常适合表单身份验证。但我真的不知道如何为我的第二个项目增加安全性。我问这个
因为托管服务器只允许webroot
文件夹中的ONE(1)web.Config文件...
I''ve 2 projects in same WEbRoot. Each project has is own Subdirectory.
Project #1: /Journal/ ''<-- Anonymous
/Journal/Admin/ '' <-- WebForm Authentication for each web page

Project #2: /Recettes/ ''<--- Anonymous
/Recettes/Admin/ ''<--- WebForm Authentication for each web
page

I''ve a Web.Config file that work perfectly for Form authentication. But I
really don''t know how to add security for my second project. I ask this
because the hosting server only allow ONE (1) web.Config file in webroot
folder...




你可以创建两个Web.Config文件,专门用于项目和放置

项目#1&分别为#2。这些特定的Web.Config文件将在webroot下面的主人身上支付



John



You can create two Web.Config files that are specifi to project and place
each under project#1 & #2 respectively. These specific Web.Config files will
overide the master under the webroot.

John


这篇关于同一个webroot中的2个项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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