ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
VeriSign Code Signing Digital Certificates provides assurance to end users. Read about this and more in the free white paper: “How to Digitally Sign Downloadable Code for Secure Content Transfer.” Learn More!
  #1  
Old June 5th, 2003, 04:17 PM
mstubble mstubble is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 8 mstubble User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ASP and XML question...

Hello,

Good luck on trying to answer this question

I am working with a Windows server using ASP and I need to write an XML doc to handle virtual directory forwarding working a long with my 404.asp error page. I want to include the XML doc as an include to the 404.asp doc. I don’t know how to do it though? I have very little experience with XML.

This is an example of what I want to do:

-User types in whatever.com/directory

-Then IIS sends them to the 404.asp page and the 404.asp page checks with the include XML doc.

-The XML doc checks to see if whatever.com/directory is a valid virtual directory included within the XML doc and if it is valid it sends them to an assigned URL for that virtual directory. (In other words, the directory isn’t a ‘real’ directory it is just a virtual directory that is read and assigned within the XML file which can forward to a specific URL.

If whatever.com/directory cannot be found within the XML include file the person just stays on the 404.asp error page rather than being forwarded somewhere else.

Now, what would the XML look like to accomplish something like this? I don’t know how to do this

Short example

-User types URL: whatever.com/directory
-404.asp loads and asks: Check XML include file
-XML include file looks to see if it should send user from whatever.com/directory to a URL.
-If whatever.com/directory cannot be found in XML the user will stay on the 404.asp error page.


How do I do this? I am at a loss

Reply With Quote
  #2  
Old June 5th, 2003, 04:35 PM
imbrokn imbrokn is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2001
Location: NJ
Posts: 428 imbrokn User rank is Corporal (100 - 500 Reputation Level)imbrokn User rank is Corporal (100 - 500 Reputation Level)imbrokn User rank is Corporal (100 - 500 Reputation Level)imbrokn User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 11 h 34 m 8 sec
Reputation Power: 10
Send a message via AIM to imbrokn
If you want to learn xml then you should get a book and check out w3schools.com and asp101.com. Both sites have a lot of info and tutorials on XML. What you are trying to acheive can easily be done with a dictionary object.

PHP Code:
 dim dict
  set dict 
server.createobject("Scripting.dictionary"
dict.add "OldURL/"dict.add "NewURL"
dict.add "oldURL2/"dict.add "NewURL2" 
...

referer request.servervariables("HTTP_REFERER")

' You'll need to do some string processing here to get to the same level 

if dict.exists(refererthen 
   response
.redirect dict(referer)
end if 

Reply With Quote
  #3  
Old June 5th, 2003, 04:51 PM
mstubble mstubble is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 8 mstubble User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thank you for the help. I am in the process. I have several books on the way. I just have to get this done and don't have time to learn XML in the timeframe that I need to get this accomplished. Could you maybe explain a little bit what you've done in that bit of code above? So I can get a better idea of how it works?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > ASP and XML question...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway