Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > No authentication with Server.Transfer("url")

Reply
Thread Tools

No authentication with Server.Transfer("url")

 
 
Ashok
Guest
Posts: n/a
 
      10-24-2006
Hi All,

I am using Integrated windows authentication(IWA) on my child virtual
directory(VD) which is beneath the parent Virtual Directory. When i use
Server.Transfer("/Parent VD/Child VD/StartingPage.aspx")
i am getting the error "Error executing child request for
/Parent VD/Child VD/StartingPage.aspx." (NO Login Box gets prompted).
I have anonymous access for the Parent VD (as this is for public access) and
Integrated windows authentication for the Child VD.
If i use the full url like
Response.Redirect("http://IPAddress//Parent VD/Child
VD/StartingPage.aspx,true)
it prompts the windows login box.

I created both parent and child VD'S as Applications when i got the below
error
(I configure both virtual directory's (VD's) as applications)

"it is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level. This error
can be caused by a virtual directory not being configured as an application
in IIS."


Below are my machine.config settings
<section name="authorization"
type="System.Web.Configuration.AuthorizationConfig Handler, System.Web,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=somekey"/>
<section name="authentication"
type="System.Web.Configuration.AuthenticationConfi gHandler, System.Web,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=somekey"
allowDefinition="MachineToApplication"/>
<section name="machineKey"
type="System.Web.Configuration.MachineKeyConfigHan dler, System.Web,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=somekey"
allowDefinition="MachineToApplication"/>
<!-- /security -->
<section name="sessionState"
type="System.Web.SessionState.SessionStateSectionH andler, System.Web,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=somekey"
allowDefinition="MachineToApplication"/>


integrated windows authentication (IW Authentication)

wwwroot
-----Parent Virtual Directory (ANONYMOUS ACCESS ==> IW Authentication)
---- Child Virtual Directory (integrated windows
authentication)


I greatly appreciate your help.

Thank You
 
Reply With Quote
 
 
 
 
Ashok
Guest
Posts: n/a
 
      10-24-2006
I think i found the solution from the below site

http://www.velocityreviews.com/forum...fer-scope.html

Well the reason could be as you mentioned, Server.transfer is application
level scope. When you do Server.Transfer, I guess asp.net executes the
target webform and returns the result to the browser. In .NET each
application is run under its own application domain. I think Server.Transfer
is restricted to application level scope, because one application domain can
not access the code of another application domain.Where as
Response.Redirect, involves two round trips, the second one does a HTTP Get
request. So, you can do Response.Redirect without any restrictions


To user Server.Transfer create the child folder as Directory not Virtual
Directory and then control the folder and permissions using the help given in
this link.

http://www.expertrating.com/coursewa...P.Net-12-1.asp

.......

Please correct me if i am wrong




"Ashok" wrote:

> Hi All,
>
> I am using Integrated windows authentication(IWA) on my child virtual
> directory(VD) which is beneath the parent Virtual Directory. When i use
> Server.Transfer("/Parent VD/Child VD/StartingPage.aspx")
> i am getting the error "Error executing child request for
> /Parent VD/Child VD/StartingPage.aspx." (NO Login Box gets prompted).
> I have anonymous access for the Parent VD (as this is for public access) and
> Integrated windows authentication for the Child VD.
> If i use the full url like
> Response.Redirect("http://IPAddress//Parent VD/Child
> VD/StartingPage.aspx,true)
> it prompts the windows login box.
>
> I created both parent and child VD'S as Applications when i got the below
> error
> (I configure both virtual directory's (VD's) as applications)
>
> "it is an error to use a section registered as
> allowDefinition='MachineToApplication' beyond application level. This error
> can be caused by a virtual directory not being configured as an application
> in IIS."
>
>
> Below are my machine.config settings
> <section name="authorization"
> type="System.Web.Configuration.AuthorizationConfig Handler, System.Web,
> Version=1.0.5000.0, Culture=neutral, PublicKeyToken=somekey"/>
> <section name="authentication"
> type="System.Web.Configuration.AuthenticationConfi gHandler, System.Web,
> Version=1.0.5000.0, Culture=neutral, PublicKeyToken=somekey"
> allowDefinition="MachineToApplication"/>
> <section name="machineKey"
> type="System.Web.Configuration.MachineKeyConfigHan dler, System.Web,
> Version=1.0.5000.0, Culture=neutral, PublicKeyToken=somekey"
> allowDefinition="MachineToApplication"/>
> <!-- /security -->
> <section name="sessionState"
> type="System.Web.SessionState.SessionStateSectionH andler, System.Web,
> Version=1.0.5000.0, Culture=neutral, PublicKeyToken=somekey"
> allowDefinition="MachineToApplication"/>
>
>
> integrated windows authentication (IW Authentication)
>
> wwwroot
> -----Parent Virtual Directory (ANONYMOUS ACCESS ==> IW Authentication)
> ---- Child Virtual Directory (integrated windows
> authentication)
>
>
> I greatly appreciate your help.
>
> Thank You

 
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
Failed Authentication, Status "Unsupported Authentication Algorithm" Rafael Cisco 1 11-26-2004 03:57 PM
Basic Authentication v. Integrated Windows Authentication w/ Delegation Mark ASP .Net 0 01-20-2004 03:13 PM
ASP.Net Forms authentication with basic authentication popup Brett Porter ASP .Net 2 01-20-2004 02:17 PM
Moving from Baisc Authentication to Forms Authentication raj mandadi ASP .Net 0 12-22-2003 12:16 AM
Forms Authentication, external authentication server, & rerouting to orig. req. URL Andrew Connell ASP .Net 1 10-21-2003 05:41 PM



Advertisments