Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

authentication mode

Status
Not open for further replies.

josie2007

Technical User
Apr 14, 2007
90
US
<authentication mode="Windows"/> Do I need this in my web.config file I am not doing any authentication.

here is my web.config file and could you correct me if you see unnecessary file there. thanks


\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration xmlns=" <connectionStrings>
<add name="ConnectionString" connectionString="Data Source=xxx;Persist Security Info=True;User ID=xxxx;Password=xxxx;Unicode=True" providerName="System.Data.OracleClient"/>
</connectionStrings>

<system.net>
<mailSettings>
<smtp>
<network
host="DOT-GWIA01"
port="25"
userName=""
password="" />
</smtp>
</mailSettings>
</system.net>

<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="error.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true">
<assemblies>
<add assembly="System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->

</system.web>
</configuration>
 
I believe you can also sent authentication to [tt]None[/tt] which might be the better option, so you know it's not defaulting to something you don't want.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
So, I can not remove from my web.config file.Am I going to get an error message if I remove it from the web.config file? thanks
 
You can remove it from your web.config file, but as Jason says, the authentication mode may set itself to a default that you didn't want. His solution is a much better approach.

Also, if you are not sure if you will get an error or not, there's a simple way of finding out...


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244.
 
now I am getting this error message when i run the apps.
Error 1 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 changed the authentication to this
<authentication mode="None"/>
 
josie2007 said:
This error can be caused by a virtual directory not being configured as an application in IIS.
Could this be the problem?


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244.
 
I'm not sure the virtual directory is set up properly.It is set up by server admn. I am just dumping my apps to the folder she set up for me and then the files will transfer to production server by her.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top