Problem with child application paths

I created a new website in IIS called wbsite1. Then I added the application to website1, which is a website called website2. The problem arose when we tried to access the links on the site2. The browser always refers to the root URL and redirects, so we are trying to change all the URLs on the site2. For example, if we have a URL on site2, for example:

<a href='http://localhost:2030/website2/cms/default.aspx...' 

and we click on this link, the browser redirects us to:

 http://localhost:2030/website1/default.aspx 

Why am I getting this behavior? And what is the best workaround for integrating two websites without trying to mess around with all the links on the website? Thank you very much.

enter image description here

We encounter problems when trying to access the page of the child application, which redirects to the default page of the main application and gives an error:

Session state is not available in this context.

+4
source share
1 answer

I found a solution for my question, and this:

  unfortunately i have to "rewrite" all our links in my code. so i created a function which will automatically add prefix to external links, and store base link for other site it configuration. I did such project with success. thank u for all your replies 

I found another solution, and it used a web proxy, but I cannot use it in my script

+1
source

Source: https://habr.com/ru/post/1486219/


All Articles