wiggy353
asked on
.NET 4.0 Framwork problem
I am having problems with code as simple as this:
If I have it on an application pool that uses .NET 2.0, it works fine. If I change the .NET to 4.0 it doesn't work any more.
Please help.
protected void Page_Load(object sender, EventArgs e)
{
Response.Write("Current User: <strong>" + System.Environment.UserName + "</strong><br><br>");
Response.Write("Current User: <strong>" + HttpContext.Current.User.Identity.Name.ToString() + "</strong>");
}
If I have it on an application pool that uses .NET 2.0, it works fine. If I change the .NET to 4.0 it doesn't work any more.
Please help.
what is "doesn't work any more"? errors?
ASKER
I change it to 4.0 application pool and reload the page and get this:
Server Error
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
Server Error
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
ASKER
The only thing I change in IIS is the version of .NET that the application pool is using and then I get the error mentioned above. What could be causing this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I found this answer somewhere else.