Link to home
Start Free TrialLog in
Avatar of IT_Service
IT_ServiceFlag for Canada

asked on

DNS forwarding to 1 IP address with multiple domains

I have an IIS Server with a dedicated IP address. The server currently hosts 1 website on that IP (abc.com)

I have a request to get a 2nd domain (xyz.com) pointing to a different application on that server on port 90.

So basically, instead of them having to enter an IP address in the URL bar of their browser, I want them to be able to use the domain name.

I have control of the DNS.

I don't have a clear idea of what all the steps are required to complete this.

 - update DNS to point the domain to the IP address of the server
   - should the DNS forwarding be with or with out the port :90 included?

- add the site in IIS (xyz.com) to be bound to port 90 on the IP address of the server

Is that correct? Is there anything missing?

Thanks
IT_Service
Avatar of shalabhsharma
shalabhsharma
Flag of India image

update DNS to point the domain to the IP address of the server.

and in IIS create hostheaders for example.
192.168.0.100   90        www.xyz.com
192.168.0.100   90        xyz.com
Avatar of IT_Service

ASKER

Ok, now in the DNS I have www.xyz.com and xyz.com pointing to the Public IP of the webserver.

In IIS, I set up the site bindings for

xyz.com : 90
www.xyz.com : 90

Yet, when I use the URL http://111.111.111.111:90/SearchPortal.aspx?id=OatHbSCh/y8= 

(where 111.111.111.111 is the public IP) it works fine.


But if I try to replace the IP with http://www.xyz.com:90/SearchPortal.aspx?id=OatHbSCh/y8= 

I get this error in my browser:

*********************
Server Error in '/' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>


Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>

*********************

ASKER CERTIFIED SOLUTION
Avatar of tanujchandna
tanujchandna
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Here is the error that is now returned. I don't know what to make of it, but have passed it off to the developers. Any ideas?

Thanks.

***********

Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load file or assembly 'NRwebSearch' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

Source Error:

Line 57:                 <add assembly="System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 58:                 <add assembly="System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 59:                 <add assembly="*"/>
Line 60:                 <add assembly="System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"/>
Line 61:                 <add assembly="System.IdentityModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"/>


Source File: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Config\web.config    Line: 59

Assembly Load Trace: The following information can be helpful to determine why the assembly 'NRwebSearch' could not be loaded.

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Hi,

Now add these assemblies in your web.config file which you recently created. Add all the remaining lines also which you will find in error after adding these lines.

Note: Do not add any other line which is not required by your web.config in error.
I'm not familiar with the web.config file structure... Would the following be correct?
*****************

<?xml version="1.0"?>
<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>

<add assembly="System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<add assembly="System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<add assembly="*"/>
<add assembly="System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"/>
<add assembly="System.IdentityModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"/>

</configuration>

************************

Or do the added assemblies need to be contained in some kind of <section> </section>?

thanks
Hi,

Provide me your complete web.config file, I will modified it and get back to you.
You want the original file ... the one I made a backup of before changing it to what is posted above?
Hi,

Your original backup file.
Here is the complete text ... with of course public key tokens, user names and passwords replaced:
***************************************************
<?xml version="1.0"?>
<configuration>
  <configSections>
    <sectionGroup name="devExpress">
      <section name="settings" type="DevExpress.Web.ASPxClasses.SettingsConfigurationSection, DevExpress.Web.v10.2, Version=10.2.4.0, Culture=neutral, PublicKeyToken=1234567890abcdef" requirePermission="false" />
      <section name="compression" type="DevExpress.Web.ASPxClasses.CompressionConfigurationSection, DevExpress.Web.v10.2, Version=10.2.4.0, Culture=neutral, PublicKeyToken=1234567890abcdef" requirePermission="false" />
      <section name="themes" type="DevExpress.Web.ASPxClasses.ThemesConfigurationSection, DevExpress.Web.v10.2, Version=10.2.4.0, Culture=neutral, PublicKeyToken=1234567890abcdef" requirePermission="false" />
      <section name="errors" type="DevExpress.Web.ASPxClasses.ErrorsConfigurationSection, DevExpress.Web.v10.2, Version=10.2.4.0, Culture=neutral, PublicKeyToken=1234567890abcdef" requirePermission="false" />
      <!--<section name="compression" type="DevExpress.Web.ASPxClasses.CompressionConfigurationSection, DevExpress.Web.v10.2, Version=10.2.4.0, Culture=neutral, PublicKeyToken=1234567890abcdef" requirePermission="false" />-->
      <!--<section name="themes" type="DevExpress.Web.ASPxClasses.ThemesConfigurationSection, DevExpress.Web.v10.2, Version=10.2.4.0, Culture=neutral, PublicKeyToken=1234567890abcdef" requirePermission="false" />-->
      <!--<section name="errors" type="DevExpress.Web.ASPxClasses.ErrorsConfigurationSection, DevExpress.Web.v10.2, Version=10.2.4.0, Culture=neutral, PublicKeyToken=1234567890abcdef" requirePermission="false" />-->
    </sectionGroup>
  </configSections>
  <appSettings />
  <connectionStrings>
    <add name="Search_Con" connectionString="server=.;database=@databasename;Integrated security=false;User Id=User1;password=passwordone;" />
   
  </connectionStrings>
  <system.web>
    <!--
            Set compilation debug="true" to insert debugging
            symbols into the compiled page. Because this
            affects performance, set this value to true only
            during development.
        -->
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.4.0, Culture=neutral, PublicKeyToken=1234567890abcdef" />
        <add assembly="DevExpress.Web.v10.2, Version=10.2.4.0, Culture=neutral, PublicKeyToken=1234567890abcdef" />
        <add assembly="DevExpress.Data.v10.2, Version=10.2.4.0, Culture=neutral, PublicKeyToken=1234567890abcdef" />
        <add assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.4.0, Culture=neutral, PublicKeyToken=1234567890abcdef" />
        <add assembly="DevExpress.Web.ASPxHtmlEditor.v10.2, Version=10.2.4.0, Culture=neutral, PublicKeyToken=1234567890abcdef" />
        <add assembly="DevExpress.Web.ASPxSpellChecker.v10.2, Version=10.2.4.0, Culture=neutral, PublicKeyToken=1234567890abcdef" />
        <!--<add assembly="DevExpress.XtraSpellChecker.v10.2.Core, Version=10.2.4.0, Culture=neutral, PublicKeyToken=1234567890abcdef" />-->
        <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=edcba0987654321" />
        <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=fedcba0987654321" />
        <add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=abcdef1234567890" />
        <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=abcdef1234567890" />
      </assemblies>
    </compilation>
    <!--
            The <authentication> section enables configuration
            of the security authentication mode used by
            ASP.NET to identify an incoming user.
        -->
    <authentication mode="Windows" />
    <!--
            The <customErrors> section enables configuration
            of what to do if/when an unhandled error occurs
            during the execution of a request. Specifically,
            it enables developers to configure html error pages
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
    <httpModules>
     <add type="DevExpress.Web.ASPxClasses.ASPxHttpHandlerModule, DevExpress.Web.v10.2, Version=10.2.4.0, Culture=neutral, PublicKeyToken=1234567890abcdef" name="ASPxHttpHandlerModule" />
    </httpModules>
    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" />
  </system.web>
  <!--
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services 7.0.  It is not necessary for previous version of IIS.
    -->
  <system.webServer>
    <modules>
      <add type="DevExpress.Web.ASPxClasses.ASPxHttpHandlerModule, DevExpress.Web.v10.2, Version=10.2.4.0, Culture=neutral, PublicKeyToken=1234567890abcdef" name="ASPxHttpHandlerModule" />
    </modules>
    <validation validateIntegratedModeConfiguration="false" />
  </system.webServer>
  <devExpress>
    <compression enableHtmlCompression="false" enableCallbackCompression="true" enableResourceCompression="true" enableResourceMerging="false" />
    <themes enableThemesAssembly="true" />
    <errors callbackErrorRedirectUrl="" />
    <settings rightToLeft="false" />
  </devExpress>
</configuration>
***************************************************
Hi,

Try with following web.config code

<?xml version="1.0"?>
<configuration>
  <configSections>
    <sectionGroup name="devExpress">
      <section name="settings" type="DevExpress.Web.ASPxClasses.SettingsConfigurationSection, DevExpress.Web.v10.2, Version=10.2.4.0, Culture=neutral, PublicKeyToken=1234567890abcdef" requirePermission="false" />
      <section name="compression" type="DevExpress.Web.ASPxClasses.CompressionConfigurationSection, DevExpress.Web.v10.2, Version=10.2.4.0, Culture=neutral, PublicKeyToken=1234567890abcdef" requirePermission="false" />
      <section name="themes" type="DevExpress.Web.ASPxClasses.ThemesConfigurationSection, DevExpress.Web.v10.2, Version=10.2.4.0, Culture=neutral, PublicKeyToken=1234567890abcdef" requirePermission="false" />
      <section name="errors" type="DevExpress.Web.ASPxClasses.ErrorsConfigurationSection, DevExpress.Web.v10.2, Version=10.2.4.0, Culture=neutral, PublicKeyToken=1234567890abcdef" requirePermission="false" />
        </sectionGroup>
  </configSections>
  <appSettings />
  <connectionStrings>
    <add name="Search_Con" connectionString="server=.;database=@databasename;Integrated security=false;User Id=User1;password=passwordone;" />
   
  </connectionStrings>
  <system.web>
        <compilation debug="false" targetFramework="4.0">
      <assemblies>
        <add assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.4.0, Culture=neutral, PublicKeyToken=1234567890abcdef" />
        <add assembly="DevExpress.Web.v10.2, Version=10.2.4.0, Culture=neutral, PublicKeyToken=1234567890abcdef" />
        <add assembly="DevExpress.Data.v10.2, Version=10.2.4.0, Culture=neutral, PublicKeyToken=1234567890abcdef" />
        <add assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.4.0, Culture=neutral, PublicKeyToken=1234567890abcdef" />
        <add assembly="DevExpress.Web.ASPxHtmlEditor.v10.2, Version=10.2.4.0, Culture=neutral, PublicKeyToken=1234567890abcdef" />
        <add assembly="DevExpress.Web.ASPxSpellChecker.v10.2, Version=10.2.4.0, Culture=neutral, PublicKeyToken=1234567890abcdef" />
        <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=edcba0987654321" />
        <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=fedcba0987654321" />
        <add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=abcdef1234567890" />
        <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=abcdef1234567890" />
      </assemblies>
    </compilation>
   
        <customErrors mode="Off" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
     
  <system.webServer>
    <modules>
      <add type="DevExpress.Web.ASPxClasses.ASPxHttpHandlerModule, DevExpress.Web.v10.2, Version=10.2.4.0, Culture=neutral, PublicKeyToken=1234567890abcdef" name="ASPxHttpHandlerModule" />
    </modules>
      </system.webServer>
  <devExpress>
    <compression enableHtmlCompression="false" enableCallbackCompression="true" enableResourceCompression="true" enableResourceMerging="false" />
    <themes enableThemesAssembly="true" />
    <errors callbackErrorRedirectUrl="" />
    <settings rightToLeft="false" />
  </devExpress>
</configuration>
Ok, now I just get this error:

Server Error
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
The developers somehow resolved the issue.

Thanks for you help.
solutions was arrived at with help of others as well as this.