html >> url used to call my site

by johnarvy » Thu, 07 Feb 2008 11:27:17 GMT

Hi, I was wondering if this problem has an obvious answer in DW8. Let's say I
have some domains like: TheRedCar.com TheBlueCar.com TheGreenCar.com I
want to point them all to the same web page but have the web page refer to the
domain name from which it was called. For instance entering www.redcar.com in
the browser would bring up: ______________________ This is The Red Car page
Blah blah blah Red ______________________ This page would be generated
to have Blue or Green if the corresponding domain named was called. How can I,
in the code, know what was url was called to change the content, title, mask,
etc.? Thanks in advance for considering this, john



html >> url used to call my site

by Michael Fesser » Thu, 07 Feb 2008 12:34:51 GMT


.oO(johnarvy)


Depends on the used scripting language. In PHP for example the name of
the requested host is stored in $_SERVER['HTTP_HOST']. In other
languages there should be a similar way to access this HTTP header.

Micha



html >> url used to call my site

by johnarvy » Sat, 09 Feb 2008 07:11:36 GMT

Thank you Micha,

This is just what I need to get going. I have begun to touch the level of power of PHP since I read this the night before last.

Thanks again,
John


url used to call my site

by Michael Fesser » Sat, 09 Feb 2008 07:44:58 GMT

.oO(johnarvy)


You're welcome.

Micha


Similar Threads

1. Calling Webservice from ASP using httpGet now breaks calls from .Net code - Asp.Net

2. Passing Quotes in a URL Call

Using ASP 3.0

I want to dynamically build a call to another asp page and include some
parameters as part of the call. The basic format of the call is something
like::

 "<a href='mypage.asp?id=" & theid & "&location='" & thelocation &
"'>GO</a>"

where there is a single quote followed by a double quote following the
..location=... and vica-versa after the variable

My problem is that the variable thelocation can include a single quote or a
double quote. I tried Server.URLEncode and that didn't work. I got a string
that ended up causing a Page Not Found (it encoded the dot in the page name
and that didn't work)

How can I encode the data so that quotes will be accepted in this type of
call?

Wayne


3. call url while keep form parameters - ASP

4. Flash ActionScript 3.0 URL call

5. setting up Contribute site - problem with site root URL - Adobe Dreamweaver

6. webservice call using MSXML2.HTTP

I am almost certain that I could use HTTP Post/Get to submit XML Web Service
call (over SSL as well, if using Version 3 of MSXML2) from an ASP
Application?

However, would I only be able to call web-service in a an asynchronous mode
(with a callback function)?  If so, how?



7. Calling a batch file from IE using asp and vbscript - ASP

8. access denied using a dll that calls a com object

This is the first time I have tried this.  What we have is a com object the 
generates keys.  A developer here wrote a .Net wrapper in C# for this com 
object.  I am trying to call her dll wrapper with my ASP.NET page and I get 
an access denied error.  I can use the test Windows Form just fine, but not 
my ASP.NET form.  This is all local to my machine.  The error is below.  
Thanks.

Vincent

Here is the error that I get:

Server Error in '/LicManage' Application.
--------------------------------------------------------------------------------

Access is denied. 
Description: An unhandled exception occurred during the execution of the 
current web request. Please review the stack trace for more information about 
the error and where it originated in the code. 

Exception Details: System.UnauthorizedAccessException: Access is denied. 

ASP.NET is not authorized to access the requested resource. Consider 
granting access rights to the resource to the ASP.NET request identity. 
ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or 
Network Service on IIS 6) that is used if the application is not 
impersonating. If the application is impersonating via <identity 
impersonate="true"/>, the identity will be the anonymous user (typically 
IUSR_MACHINENAME) or the authenticated request user. 

To grant ASP.NET write access to a file, right-click the file in Explorer, 
choose "Properties" and select the Security tab. Click "Add" to add the 
appropriate user or group. Highlight the ASP.NET account, and check the boxes 
for the desired access.

Source Error: 


Line 25: 			String connectionString = "Persist Security Info=False;User 
ID=sa;Pwd=mtdew;database=vantive;server=crmdev;Connect Timeout=30";
Line 26: 			 
Line 27: 			ActivationCodeLibrary.ActivationCode a = new 
ActivationCodeLibrary.ActivationCode(connectionString);
Line 28: 
Line 29: 			a.AddRegistrationKey(txtRegKey.Text,false);
 

Source File: 
c:\webprojects\vwright_view\web\licmanage\licmanage\test.aspx.cs    Line: 27 

Stack Trace: 


[UnauthorizedAccessException: Access is denied.]
   ActivationCodeLibrary.ActivationCode..ctor(String connectionString)
   LicManage.test.Page_Load(Object sender, EventArgs e) in 
c:\webprojects\vwright_view\web\licmanage\licmanage\test.aspx.cs:27
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Page.ProcessRequestMain() +750

 


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