Click here to Skip to main content
15,879,474 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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

1 solution

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.
 
Share this answer
 
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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900