Server Transfer To Windows Forms Authenticated Application

G

Guest

Hello,

I am having a really strange issue, I have folder containing an ASP.NET
application. (The folder's name is Web) The root directory of the whole
site I have an Index.aspx page that contains:

<%
Server.Transfer("Web\Default.aspx")
%>

The web config file in the Web directory is using an Authentication mode of
Forms. For some reason when the transfer method is called, it thows an:

Parser Error Message: 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.

I am running on a shared server, and can't really make it a virtual
directory. Does anyone know a way around this? Could I make it a subweb or
does this need to be a virtual directory?

Thanks.
 
G

Guest

Hi Ryan,

what i understand from your description that u are maintaining a web.config
file in a sub dir also.
Actually Authenticate Mode can only be defined in the application wide
web.config file .

I suggest you remove the Authentication element from the web.config file and
then try running your application. In case you still find errors, try
removing the sessionState and authorization elements as well because they are
also set at application level.

In case you only wish to use Authentication mode as forms, you may have to
create a virtual dir.

HTH
 

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

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top