Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Windows Authentication in a Subdirectory of a Web Application

Posted on 2005-04-20
7
Medium Priority
?
559 Views
Last Modified: 2012-05-05
Hi,

Is it possible to use the Windows Authentication in a sub directory of the web application?  The main web application is configured for Form authentication but the sub directory needed to be configured for Windows authentication so that it process the request under the windows user account.  I need this thing for PGP encryption from Web.  Any possibilities?

Thanks, Nauman.
0
Comment
Question by:nauman_ahmed
  • 4
  • 2
6 Comments
 
LVL 35

Expert Comment

by:YZlat
ID: 13827699
yes, you can use <location> tag in the web.config file. But in order to do that, you'll need to configure your subdirectory as an application
0
 
LVL 35

Accepted Solution

by:
YZlat earned 2000 total points
ID: 13827739
add the following code to your web.config file in the root directory of your application, between <configuration> tags right after </system.web> tag:
   

 <location path="MySubDirectory">
    <system.web>
      <customErrors mode="Off" />
       <authentication mode="Windows" />

    </system.web>
  </location>

0
 
LVL 25

Author Comment

by:nauman_ahmed
ID: 13828008
I am getting this error:

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 dont want to configure the directory for a separate application.  Any other ideas?

Thanks, Nauman.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 35

Expert Comment

by:YZlat
ID: 13832940
otherwise it will not let you set a different authentication mode for that directory.

Open IIS Manager, expand Web Sites, then expand Default web site, find your directory and convert it to virtual directory. There will be no difference in the eprformance, but you will be able to set a different authentication for it
0
 
LVL 25

Author Comment

by:nauman_ahmed
ID: 13837033
I cant do that unfortunately! I am using the user controls in the application and creating that as a virtual directory is giving me error.

-Nauman.
0
 
LVL 35

Expert Comment

by:YZlat
ID: 13837510
I'm not sure I understand what do you mean. and what error are you getting?
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Screencast - Getting to Know the Pipeline

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question