Windows authentication setting in web.config

M

Matt

The ASP.NET application connects to MS-SQL database, and I already disabled
Anonymous access in IIS, and add ASPNET user in it. When I run the
application, it throws the following error on windows authentication:

Server Error in '/' Application.

Configuration Error
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify your configuration file appropriately.

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.

Source Error:

Line 46: by Microsoft that offers a single logon and core profile
services for member sites.
Line 47: -->
Line 48: <authentication mode="Windows"/> //<====== ERROR!!


Here's the portion of the web.config file that I modified, any ideas what's
the problem here?

<configuration>
<appSettings>
<add key="connString" value="Data Source=127.0.0.1;Integrated
Security=SSPI;Network Library=DBMSSOCN;Initial Catalog=studentdb;"></add>
</appSettings>
<system.web>
<identity impersonate="true" />
//etc...
 
G

Guest

so , you have checked that the virtual directory has been setup properly? Have you put all your file under the virtual directory? A virtual directory is the boundary for asp.net application. Not the root directory as it once was

ht

----- Matt wrote: ----

The ASP.NET application connects to MS-SQL database, and I already disable
Anonymous access in IIS, and add ASPNET user in it. When I run th
application, it throws the following error on windows authentication

Server Error in '/' Application

Configuration Erro
Description: An error occurred during the processing of a configuration fil
required to service this request. Please review the specific error detail
below and modify your configuration file appropriately

Parser Error Message: It is an error to use a section registered a
allowDefinition='MachineToApplication' beyond application level. This erro
can be caused by a virtual directory not being configured as an applicatio
in IIS

Source Error

Line 46: by Microsoft that offers a single logon and core profil
services for member sites
Line 47: --
Line 48: <authentication mode="Windows"/> //<====== ERROR!


Here's the portion of the web.config file that I modified, any ideas what'
the problem here

<configuration><appSettings><add key="connString" value="Data Source=127.0.0.1;Integrate
Security=SSPI;Network Library=DBMSSOCN;Initial Catalog=studentdb;"></add></appSettings><system.web><identity impersonate="true" /
//etc..
 
M

Matt

Yes, I put all files under virtual directory. What do u mean "A virtual
directory is the boundary for asp.net application. Not the root directory as
it once was." Can u explain it more? Thanks!!

one said:
so , you have checked that the virtual directory has been setup properly?
Have you put all your file under the virtual directory? A virtual directory
is the boundary for asp.net application. Not the root directory as it once
was.
 
G

Guest

What I meant was that when you create a new project, and a new directory (and web.config) is created. And the user authentication section (and other contents in that web.config) applies to that directory only

But have you tried putting this line

<identity impersonate="true" /

underneath:

<authentication mode="Windows"/



I think the <identity> element needs to be within the <system.web> element

----- Matt wrote: ----

Yes, I put all files under virtual directory. What do u mean "A virtua
directory is the boundary for asp.net application. Not the root directory a
it once was." Can u explain it more? Thanks!

one said:
so , you have checked that the virtual directory has been setup properly
Have you put all your file under the virtual directory? A virtual director
is the boundary for asp.net application. Not the root directory as it onc
was
 
S

Shaul Feldman

Thanks you!
I'll try that when I'll get back to work...
Where I can get more info about this web.config file configuration?
Thank you again.

--
With the best wishes,
Shaul Feldman

one said:
What I meant was that when you create a new project, and a new directory
(and web.config) is created. And the user authentication section (and other
contents in that web.config) applies to that directory only.
 

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,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top