We have a small ASP.Net app here that has been running fine on a production LAN for a few years, but now needs to be changed. We took the solution files and built it on a standalone machine, thinking that might make a good test environment. It does not
work. The reason is that in the page load event of the Default.aspx, the User property of the Page object is null. Consequently, the app thinks no one is logged on.
I suspect this is an issue with the way IIS is configured on the standalone machine. In IIS, Anonymous Authentication is enabled. In the Web config file of the app, authentication is set to Windows as follows:
<system.web>
<authenticationmode="Windows"
/>
<anonymousIdentificationenabled="false"
/>
<authorization>
<allowusers="*"
/>
</authorization>
<customErrorsmode="Off"
/>
<compilationdebug="true"targetFramework="4.0"
/>
</system.web>
Does
anyone out there have any thoughts on what might be preventing population of the User property? Many thanks in advance.
None
0 Points
1 Post
ASP.Net Page.User property
Dec 18, 2015 05:15 PM|ahohenbr|LINK
We have a small ASP.Net app here that has been running fine on a production LAN for a few years, but now needs to be changed. We took the solution files and built it on a standalone machine, thinking that might make a good test environment. It does not work. The reason is that in the page load event of the Default.aspx, the User property of the Page object is null. Consequently, the app thinks no one is logged on.
I suspect this is an issue with the way IIS is configured on the standalone machine. In IIS, Anonymous Authentication is enabled. In the Web config file of the app, authentication is set to Windows as follows:
<system.web>
<authentication mode="Windows" />
<anonymousIdentification enabled="false" />
<authorization>
<allow users="*" />
</authorization>
<customErrors mode="Off" />
<compilation debug="true" targetFramework="4.0" />
</system.web>
Does anyone out there have any thoughts on what might be preventing population of the User property? Many thanks in advance.
Contributor
4732 Points
1001 Posts
Re: ASP.Net Page.User property
Dec 18, 2015 05:27 PM|ninianne98|LINK
my vote is to disable anon and enable windows auth in IIS.
https://www.iis.net/configreference/system.webserver/security/authentication/anonymousauthentication
do you have access to the old webhost so you can check the IIS settings there?
Mark as Answer if this response was helpful.