473,395 Members | 2,443 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Virtual Directory issue?

23
We have an archive server that stores data from 1998-2009, the server had some hard drives fail and I am trying to get everything set back up. It's a bit difficult as the site was setup before I joined the company.

I was able to get pretty much everything up but what appears to be articles stored within a "/Articles" directory. The new server, including the old hard drives and backup do not contain a physical folder in the root directory called "/Articles."

Is it possible that there was a redirect setup to point to a specific ID? I'm noticing that each article has two different DB ID's.

I am sort of lost as I explained earlier I didn't originally set the site up. It appears all content is available except for any articles that had a URL with "/Articles" included.

Here is an example:
Works Fine - http://archive.frontpagemag.com/readArticle.aspx?ARTID=36430

Broken URL - http://archive.frontpagemag.com/Articles/ReadArticle.asp?ID=19145

The broken URL used to work before the server crashed. And to my knowledge I have restored all databases/website files to the correct locations.

thanks in advance.
Aug 18 '10 #1
1 2197
user65
23
OK, sorry to all I am a beginner on the windows side.

I found a Global.asax file that seems to contain the redirects I am looking for. Does anyone know how to reconnect this file into IIS? Or is that what I would need to do?

Here is the file with the redirects:
Expand|Select|Wrap|Line Numbers
  1. <%@ Application Language="C#" %>
  2.  
  3. <script runat="server">
  4.  
  5.     void Application_Start(object sender, EventArgs e) 
  6.     {
  7.         // Code that runs on application startup
  8.  
  9.     }
  10.  
  11.     void Application_End(object sender, EventArgs e) 
  12.     {
  13.         //  Code that runs on application shutdown
  14.  
  15.     }
  16.  
  17.     void Application_Error(object sender, EventArgs e) 
  18.     {
  19.         // Code that runs when an unhandled error occurs
  20.         Exception objErr = Server.GetLastError().GetBaseException();
  21.         string err = "Error in: " + Request.Url.ToString() +
  22.                           ". Error Message:" + objErr.Message.ToString();
  23.         String myUrl = Request.Url.ToString().ToUpper();
  24.  
  25.         if (myUrl.EndsWith("/ARTICLES")) Response.Redirect("/" + Request.QueryString);
  26.         if (myUrl.EndsWith("/BLOG")) Response.Redirect("/listBlogs.aspx" + Request.QueryString);
  27.         if (myUrl.EndsWith("/CONTACT")) Response.Redirect("/contactUs.aspx" + Request.QueryString);
  28.         if (myUrl.EndsWith("/LINKS")) Response.Redirect("/listLinks.aspx" + Request.QueryString);
  29.         if (myUrl.EndsWith("/SEARCH")) Response.Redirect("/search.aspx" + Request.QueryString);
  30.         if (myUrl.EndsWith("/BOOK")) Response.Redirect("/" + Request.QueryString);
  31.  
  32.         if (myUrl.EndsWith("/ARTICLES/AUTHORSLIST.ASPX")) Response.Redirect("/listAuthors.aspx" + Request.QueryString);
  33.         if (myUrl.Contains("/ARTICLES/READ.ASPX?")) Response.Redirect("/readArticle.aspx?" + Request.QueryString);
  34.         if (myUrl.Contains("/ARTICLES/PRINTABLE.ASPX?")) Response.Redirect("/printable.aspx?" + Request.QueryString);
  35.         if (myUrl.Contains("/ARTICLES/AUTHORS.ASPX?")) Response.Redirect("/bioAuthor.aspx?" + Request.QueryString);
  36.         if (myUrl.Contains("/BLOG/READ.ASPX?")) Response.Redirect("/readBlog.aspx?" + Request.QueryString);
  37.  
  38.         Response.Redirect("errorPage.aspx");
  39.  
  40.     }
  41.  
  42.     void Session_Start(object sender, EventArgs e) 
  43.     {
  44.         // Code that runs when a new session is started
  45.  
  46.     }
  47.  
  48.     void Session_End(object sender, EventArgs e) 
  49.     {
  50.         // Code that runs when a session ends. 
  51.         // Note: The Session_End event is raised only when the sessionstate mode
  52.         // is set to InProc in the Web.config file. If session mode is set to StateServer 
  53.         // or SQLServer, the event is not raised.
  54.  
  55.     }
  56.  
  57. </script>
  58.  
Aug 18 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Leszek | last post by:
Hello, I need to implement form based authentication in my WebForm application. When I deployed it I have received the following the error: ========= Configuration Error Description: An...
10
by: Wm. Scott Miller | last post by:
We have a intranet site that allows one of our departments to search a set of pdfs and then look at them. Only problem is that only they and us geeks should be allowed to see the pdfs. We have it...
0
by: Support | last post by:
I've a problem while creating web setup project using "Setup & Deployment Projects" (for Web projects/Web setup). The following steps I followed while doing so. 1. Created a web setup project...
5
by: Stu Carter | last post by:
Hi, ENV: Windows 2003 Server SP1 (+all updates), VS 2003, .Net 1.1 SP1 We've got an ASP.Net web application using State Service. All is fine until we tried to use the app through a virtual...
16
by: B Letts | last post by:
Hi - I'm currently using the FileUpload control to allow people to upload files to my website. This all works fine, as long as I'm going to a physical path on my server. However, I need to...
0
by: bpssolutions | last post by:
hi- i'm going mad over here. any help would be greatly appreciated. aspnet_wp.exe hangs whenever i browse to the virtual directory in which i am developing, sucking up all CPU time. any...
2
by: BLetts | last post by:
I have an ASP.NET app that must allow users to upload files. The files are stored in a virtual directory. I use Server.MapPath to map from the virtual directory name to a physical path, then the...
1
by: fredfrog22 | last post by:
The following is an extract from a C# console application that creates a Virtual Directory on IIS 5 or 6. This code works on XP, Windows 2003 Server, Windows 2000. It does not work on Windows...
5
by: OK | last post by:
I am using an image control to display some images within a virtual map (ImagesRoot in IIS) outside of the web root in my vb asp.net application. How should I code the imageurl property to have...
6
by: Scott M. | last post by:
I didn't get a resolution to this in my earlier post, so I'll try again: System: Windows XP Pro. (SP2) with IIS installed and running PRIOR to VS 2008 Pro. installation. VS 2008 Pro. (full...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.