Thursday, March 22, 2012

Strange Issue - Help!

I have a strange problem and am not sure how to fix it so I need input.
I have a web application that was originally designed to have two pieces. An intranet based portion that would allow administration from within our intranet. And an internet portion for external facing customers. The purpose of the application was to simply allow a customer to download reports for viewing.
Initially I set everything up in one project. The intranet portion consisted of one default page with several user controls that would be loaded dynamically according to clicks in the navigation portion of the default page.
The internet portion consisted of a login page that would set a session variable once the user logged in succesfully. Then, once the login was complete, it would do a redirect to the applications main page which would allow the customer to choose various options for downloading their report. This download page would check the session variable to see if they would be able to view reports. While debugging I set the login page as my startup page for my project (b/c I developed the internet portion last, and it was the last part I was testing)
All of this worked fine. Here is the strange part. I decided to split up the project into two separate projects by pulling out all the internet pages and code.Now something is wrong with the intranet portion. When ever I run the intranet portion, it keeps wanting to redirect to the now phantom login.aspx page by redirecting to the following URL even after setting the startup page to the intranet portions default.aspx page. I have deleted the application DLLs, as well as the offline cache in Visual Studio 2003. I have also walked the code, and here is the sequence of events.

1. Application_AuthenticateRequest fires 2 times
2. The application then immediately shows the information below, without even firing the page_load event of the the (now startup page) default.aspx page.

I am stuck on this. Someone please help.

http://localhost/OMSA/login.aspx?ReturnUrl=%2fOMSA%2fdefault.aspx

Server Error in '/OMSA' Application.

The resource cannot be found.

Description:HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested Url:/OMSA/login.aspx

Do you have forms authentication turned on for the internet project?


Yup, that was the problem. Since i was developing both internetand intranet, I completely forgot to change the intranet web.configback to Windows instead of leaving it on Forms.

Ok, I have another issue with this application. Now I am getting the following error. Normally, all I have to do to fix this issue is simply do a delete then rebuild the applicaton DLLs and it usually works. In fact, the problem is that if I bring down all the souce code from source control and compile using Visual Studio 2003, the application works fine. However, we use NANT to build and deploy our application to the UA webservers. Whenever I do that, I get the error down below. Does anyone have any suggestions?

Server Error in '/GSPC_DEV/OMSA' Application.

Parser Error

Description:An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message:Could not load type 'OMSA.Global'.
Source Error:

Line 1: <%@. Application Codebehind="Global.asax.vb" Inherits="OMSA.Global" %>

Source File:E:\Inetpub\wwwroot\GSPC_DEV\OMSA\global.asax Line:1


Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032


fixed it. NANT was assigining the wrong root namespace whenddoing the build. Once that was fixed, everything worked fine.

0 comments:

Post a Comment