No authentication with Server.Transfer("url")

A

Ashok

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.AuthorizationConfigHandler, System.Web,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=somekey"/>
<section name="authentication"
type="System.Web.Configuration.AuthenticationConfigHandler, System.Web,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=somekey"
allowDefinition="MachineToApplication"/>
<section name="machineKey"
type="System.Web.Configuration.MachineKeyConfigHandler, System.Web,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=somekey"
allowDefinition="MachineToApplication"/>
<!-- /security -->
<section name="sessionState"
type="System.Web.SessionState.SessionStateSectionHandler, 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
 
A

Ashok

I think i found the solution from the below site

http://www.velocityreviews.com/forums/t92722-servertransfer-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/courseware/DotNetCourse/DotNet-ASP.Net-12-1.asp

.......

Please correct me if i am wrong
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top