CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Adding & Reading HTTP Headers (Yet Another Possibly Stupid Question)

Print topic Send  topic

Author Message
Suntower

Posts: 225
Posted: 08/31/2006, 2:19 PM

Hello Again,

The good news is that my first CCS project is currently going well. Hooray!

The bad news is that I've got another roadblock.

In the app we are replacing, many customers would access the same app. Different web sites were set up on the same IIS server and each referred to a separate home directory.

When the user reached the home page URL -before- the HTML was output, the scripting would read in a file to set various parameters. For a number of reasons we'd prefer to avoid this if possible and put everything in the database.

So, we need a way to tell the page, when it loads, which variables to read in. OK, so I thought that I would add a Custom Header to IIS and then use the RequestServerVariables function to read them off the page as it is loaded. And of course, this doesn't work.

So there must be yet another (shocking but true) conceptual problem.

I -thought- adding a Custom Header in IIS would append the 'custom header' to the HTTP variables sent to the user's browser along with the page along with things like USER_AGENT and so on.

What have I got wrong here?

Thanks Yet Again,

---JC
_________________
---On a campaign for more examples and better docs!
View profile  Send private message
Suntower

Posts: 225
Posted: 09/22/2006, 8:30 AM

BUMP!

C'mon. I'm the only one whoever needed to do this?
_________________
---On a campaign for more examples and better docs!
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 09/24/2006, 9:11 AM

Suntower
Have you tried the redirect command ( http://docs.codecharge.com/studio3/html/Components/Vari...P/Redirect.html )??
View profile  Send private message
Suntower

Posts: 225
Posted: 09/26/2006, 8:45 AM

Quote mamboBROWN:
Suntower
Have you tried the redirect command ( http://docs.codecharge.com/studio3/html/Components/Vari...P/Redirect.html )??

I posted a reply to this yesterday and it seems to have vanished.

Oh well...

I don't see how this helps me. I want the ASP to be able to 'see' from the moment the user's browser hits the web site some sort of identifier that says 'this is my domain name or IP or -something-.'

We'll have many users on this application, accessing from a variety of domain names and they all need to have slightly different screens based on that IP. This info can't wait until -after- they log in. IOW: the 'start' page with the login has to be differentiated by IP address.

I thought that putting some Custom Header into each site in IIS would do the trick, but I can't read it through RequestServerVariables.

What have I got wrong?





_________________
---On a campaign for more examples and better docs!
View profile  Send private message
peterr


Posts: 5971
Posted: 09/26/2006, 11:52 AM

I think that you can write a short 5-line ASP script that determines whatever you want it to determine (domain, IP, custom header, etc.), then redirect the user to a CCS page with a URL variable appended to it. Like MyPage.asp?domain=abc
Then you can use the URL parameters as usual.

Or you can such ASP code to the beginning of Common.asp and create a session variable that you can use later as usual.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Suntower

Posts: 225
Posted: 09/27/2006, 8:47 AM

---If it's only 5 lines, could you please post an example?

Thanks,

---JC

Quote peterr:
I think that you can write a short 5-line ASP script that determines whatever you want it to determine (domain, IP, custom header, etc.), then redirect the user to a CCS page with a URL variable appended to it. Like MyPage.asp?domain=abc
Then you can use the URL parameters as usual.

Or you can such ASP code to the beginning of Common.asp and create a session variable that you can use later as usual.

_________________
---On a campaign for more examples and better docs!
View profile  Send private message
peterr


Posts: 5971
Posted: 09/27/2006, 11:41 PM

Oh boy, I don't have any, just expect that there are tons of them on the Internet, ASP documentation, ASP forums, etc. Here is a sample link found after 1 minute:
http://www.w3schools.com/asp/coll_servervariables.asp
It's actually 1 line of code that determines any one of server attributes :-)
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.