Provide information between ASP.NET applications in the same IIS

I have a solution with more than one ASP.NET web application . Each application has its own virtual directory in the same IIS. One application invokes aspx pages in other applications. How can I share some information (e.g. user / password) between these applications. The only way to use querystrings (in this case I have to encrypt the information). Or are there other possibilities / methods?

+4
source share
1 answer

Perhaps this will help, I asked and answered this question myself

Use a single Asp.net membership database with multiple applications

I had two asp.net applications on the same IIS server. My goal is to make sure that when a user logs into application 1, user credentials are available in application2. Setting up an asp.net membership provider is just one step away from what I was looking for. Even if both applications use the same base database and provider, I still will not authenticate when I click application 2. What I was looking for was a Single Sign On solution.

Once you have both applications pointing to your asp_membership database by placing the following in the system.web section of your web configuration

make sure both have the same property for the application name.

I used IIS 6, so I configured it to auto generate a machine key for both applications. Since both of these applications work on the same machine, the key will be identical, this is a critical part for SSO to work. After configuring IIS, the following was added to my web.config

<machineKey decryptionKey="AutoGenerate" validation="SHA1" validationKey="AutoGenerate" /> 

That's all. Once this is done, I can log into app 1 and then go to app2 and save my security credentials.

Thanks for pushing in the right direction.

+4
source

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


All Articles