Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

AAM not able to read connection from web.config

$
0
0

Hi,

I have defined site url on web.config in app setting like

<appSettings>  
   
<add key="trailed" value="http://test.abc.com:50001"/>
  </appSettings>

and get this connection on c# file , it works well like

string Connnection=System.Configuration.ConfigurationManager.

ConnectionStrings["trailed"].ToString();

my site url after AMM is test.abc.com:50001

Problem:

as I configure AAM in edit binding on iis and set AAM in CA of Sharepoint so site does not work, and if I remove AAM and binding on IIS so it works fine.

observed:

if I get site url on webpart page like spcontext.current.site.url so it works fine even after configure AAM

Solution Required:

please guide how to define site url on web.config so it works fine although I am changing site url accordingly (based on AAM)




Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>