区分两个连接字符串 [英] Differentiating between two connection string

查看:75
本文介绍了区分两个连接字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

请帮帮我.

假设有两个人
1在印度
2在德国

并且有两个具有不同数据库名称的连接字符串.
当他们登录印度个人时,应该连接一个connectinstring
和德国人应该能够连接到另一个.连接字符串不应该一个到另一个.

我应该如何在web.config

Hi there,

Please help me.

suppose there are two person
1 in India
2 in Germany

And there are two connection string with different database name.
when they loggin Indian Individual should connect One connectinstring
And german person should be able to connect to another. the connectionstring should not be allowed of one to another.

How should i do there in web.config

推荐答案



这可能不是正确的解决方案.但是我想您可以获取正在访问您的应用程序的系统的IP地址,然后根据国家/地区来动态使用连接字符串.

希望这会有所帮助.
Hi,

This might not be the correct solution.But I guess you can get the IP address of the system thats accessing your application and then based on the country, use the connection string dynamically.

Hope this helps.


这篇关于区分两个连接字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆