multi sites in web.config ? mask url to use same app ?

S

Scott

Hi,

I have site1.net as a main site in IIS6 on port 80.

Its uses asp, sql server and a web.config file for connection string.

I have created site2.net :
- DNS for site2.net points to same IP as site1.net
- I have added site2.net to IIS6 using same IP as site1.net
- im using hostheaders (with www.site2.net as my string)
- site2.net also points to same www_root dir as site1.net

So when i load site2.net it looks at the same app as site1.net

When i browse to site2. net - internet explorer displays site2.net in URL
field ... which is what i want.

When i login to the site2.net however i get an aspx script error (access
denied) and my records are not displayed. Rest of the app loads ok its just
calls to the DB (using XML as source).

I assume its because web.config contains site1 reference. Internet explorer
and my cookie will show site2.

Web.config below:

<add key="ServiceURL" value="http://www.site1/service/Service.asmx" />
<add name="ConnectionString" connectionString="Data Source=Server1;Initial
Catalog=db;User Id=user;Password=test;"/>

Connection string will work ok, i guess its a call to service.asmx hosted on
site1.net that does not work because i entered the app from site2.net

Does anyone know how i can get site2 to display site1 applications but still
maintain the URL in internet explorer ?

Can i add an additional connection string to web.config so i can call
service.asmx ?

Thanks for any help
Scott
 
S

Scott

wee update.

Im using AJAX ..... its the AJAX script that is throwing the error.

I can call the web service direct from www.site2/service/service.asmx

Login works and that need to access db table to allow me to login.

Just seems to be AJAX script issue when coming in from site2 when web.config
refers to site1.

thanks for any help.
scott
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top