Terri Alekzander
asked on
Problem with ASPX files on new intranet server
We recently moved our intranet to a new server in a virtualized environment. The new server is Windows 2012R, iis7 and .net framework 4.0. I created the site folder in iis and then moved the entire folder structure from the old server to the new one. All works fine except any pages with an aspx extension. ASP classic and .html pages are fine.
When trying to navigate to ANY page with an aspx extension, we get "Server Error in '/' Application" error as the page tries to locate /login.aspx. This page does not exist. If we click "back" in the browser and try the link again, it is successful!
And as far as we can tell it isn't being called from any config or aspx page.
I have even tried creating a blank page and naming it .aspx. This page does the same redirection.
I have tried all different authentication modes: anonymous, forms, windows, basic. None work.
Fortunately we only have one page on the site that is affected, but need to figure out the problem before we move forward with more functionality. We have a staff directory built from a database.
Here is the code from the page (I have replaced the IP address for the datasource, the login name and password with x's):
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="Data Source=xxx.xxx.xxx.xxx,153 3;Initial Catalog=xxxxxxxx_hub;Persi st Security Info=True;User ID=agency;Password=xxxxxxx xx"
ProviderName="System.Data. SqlClient"
SelectCommand="SELECT StaffID, Name, Phone, Office, Title, Dept, Email, Extension, { fn LCASE(LEFT (Name, 1)) } AS Letter, Photo FROM [tbl-All-StaffDirectory] ORDER BY Name">
</asp:SqlDataSource>
When trying to navigate to ANY page with an aspx extension, we get "Server Error in '/' Application" error as the page tries to locate /login.aspx. This page does not exist. If we click "back" in the browser and try the link again, it is successful!
And as far as we can tell it isn't being called from any config or aspx page.
I have even tried creating a blank page and naming it .aspx. This page does the same redirection.
I have tried all different authentication modes: anonymous, forms, windows, basic. None work.
Fortunately we only have one page on the site that is affected, but need to figure out the problem before we move forward with more functionality. We have a staff directory built from a database.
Here is the code from the page (I have replaced the IP address for the datasource, the login name and password with x's):
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="Data Source=xxx.xxx.xxx.xxx,153
ProviderName="System.Data.
SelectCommand="SELECT StaffID, Name, Phone, Office, Title, Dept, Email, Extension, { fn LCASE(LEFT (Name, 1)) } AS Letter, Photo FROM [tbl-All-StaffDirectory] ORDER BY Name">
</asp:SqlDataSource>
ASKER
Which folder? The main folder for the website?
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 will try what you suggest. Right now the file that is affected is in the root and is not in a subfolder.
ASKER
Sammy! Thank you so much. Moving the aspx files into a folder and then converting that folder to an application did the trick. I appreciate your help.
Right-click on the folder and click Convert to Application.