Click here to Skip to main content
12,817,428 members (34,284 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: IIS7 IIS
I am having 2 web application, from that one apllication i hosted as main website on a particular ip address with port 80 on server and i want to host another application on same ip address and port.

Main application is running well but 2nd application throwing following error regarding web.config,

Error Code : 0x800700b7

Error :

Can not add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'CrystalImageHandler.aspx_GET'
Posted 23-Nov-12 1:29am

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

1.) using two seperated web-SITES:
set host name for port-bindings, so that IIS can determine which web-site is requested by analyzing the request URL (rightclick web-SITE and choose "edit bindings"
e.g.:
web-SITE1: binds to hostname app1.example.com, port:80
web-SITE2: binds to hostname app2.example.com, port:80

IIS will then chose the right web-SITE for you. You will then be unable to access your web-SITES using only the IP-Address, as IIS needs the HOSTHEADER (=host name in IIS bindings) to determine the right web-SITE.

2.) alternatively, you can run multiple web-APPLICATIONS under one web-SITE, just right-click on the web-SITE and choose "add Application"...
e.g.:
web-site: binds to hostname app.example.com, port:80
- web-Application1 with alias "app1"
- web-application2 with alias "app2"

Clients can access app1 using Url app.example.com/app1, etc.


don't know which one fits better to your needs...

Edit1:
as you are facing case 2.), i asume that you have a web.config at web-SITE level and one on application-level. check, if there are add-Elements with the same name in it.
  Permalink  
v3
Comments
Pratibha Mhatre 23-Nov-12 6:46am
   
Thanks for reply... I have used second answer only... bt it did'nt worked....It showed same error....!!
Earloc 23-Nov-12 8:02am
   
as you are facing case 2.), i asume that you have a web.config at web-SITE level and one on application-level. check, if there are add-Elements with the same name in it

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.170308.1 | Last Updated 23 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100