Start Free Trial
Reading from web configuration file
I can read connection string from webconfig file from visual studio from the below mentioned code
in login.aspx page
Private constr As String
Private rootWebConfig As System.Configuration.Confi
Private connString As System.Configuration.Conne
rootWebConfig = System.Web.Configuration.W
I") where WEBUI is project folder where webconfig resides.
connString = rootWebConfig.ConnectionSt
constr = connString.ConnectionStrin
I created web deploy package and imported into localhost IIS 7. import application worked fine. when I tried to browse the login.aspx from IIS published folder I get the following msg
Server Error in '/KHWEB' Application. - KHWEB web application name in IIS7
Object reference not set to an instance of an object.
Microsoft IIS Web Server
8/22/2022 - Mon
Can you try with the following change?
ASKER CERTIFIED SOLUTION
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
I could solve the problem by giving my web application name ( "/ App name") hosted in iis in open configuration.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
Plans and Pricing
Certified Expert Program
© 1996-2023 Experts Exchange, LLC. All rights reserved. Covered by US Patent