27
Answers

Button not getting disabled after deploying site in IIS 7

Sreenath G

Sreenath G

13y
3.6k
1
 

 

Hi,

I have deployed my site on IIS 7 server. At certain conditions I want to disable one button. This is working at my local but after deploying it in IIS, it is not working. Here is my code.

 

protected void Page_Load(object sender, EventArgs e)

        {

            try

            {

                lFnEnabledisableServiceAuthentication();

            }

            catch (Exception)

            {

 

            }

        }

 

 

  void lFnEnabledisableServiceAuthentication()

        {

            try

            {

                string lStrUsers = "";

                string lStrCurrentUser = "";

 

                lStrUsers = ConfigurationManager.AppSettings["ServiceAuthUsers"].ToString();

                lStrCurrentUser = clsGlobals.Prp_clsGlobals.mFnUpdateHostUser();

 

                if (lStrUsers.Trim().ToLower() == lStrCurrentUser.Trim().ToLower())

                {

                    btnInovisService.Enabled = true;

                }

                else

                {

                    btnInovisService.Enabled = false;

                }

 

 

            }

            catch (Exception)

            {

 

                throw;

            }

        }

 

 

<appSettings >

    <add key="ServiceAuthUsers" value="MyaccountName"/>

  </appSettings>

 

Any suggestions like why this is happening..

Thanks

Sreenath


Answers (27)